Snapshot 1fff8e2b7bbcfdea262d3782d4307ca6437da2a3 from idea/136.1153 of git://git.jetbrains.org/idea/community.git

38fcfd7: try more times to connect.
6ee4e80: Merge remote-tracking branch 'origin/master'
85a331b: Cleanup.
8e1582f: Logging an error in case of absent name.
a33ddd0: Add javadoc for RemoteConnectionType.
c9cea5a9: introduce OrphanGuardian interface
cadf1a7: Revert "hide on UI changes"
62aa21e: avoid status bar update on internal method invoke
c22e314: nashorn conditional breakpoints
f03bc43: cleanup
9372f19: Merge remote-tracking branch 'origin/master'
94f10a8: PY-12367 loop variable should be able to reuse on else clause
1b02460: Merge remote-tracking branch 'origin/master'
c5294ef: hide on UI changes
3259502: fix NavBar blinking and resizing on Color Scheme change due to async tweaking in updateUI
97eddb8: Cosmetic changes
fede9f0: IDEA-122004 Good code red: surefire.forkNumber in pom.xml
ce5b97b: fix UI artifacts after exiting from Presentation Mode
6937b4d: StatusBar doesn't change when perform Prefs -> Appearance -> Custom fonts
30d235a: IdeRepaintManager.checkThreadViolations fix during readExternal()
7346c3a: [log] IDEA-118576 Don't show focus border
cc3e0c5: [log] IDEA-115902 Fix visual artifact on multi-repo indicator
1146cb6: Merge remote-tracking branch 'origin/master'
b991bf2d: PY-11948 Run manage.py Task ignores environment variables defined for Django Console (and Python Console)
4e41daa: IDEA-122035 accept "tip" as a branch name
d8382bb: remove unneeded read actions
d348434: Merge remote-tracking branch 'origin/master'
6248e48: moved unittest tests to env tests
ee3f4a5: IDEA-121966 Multiple-Cursor Jumpy
f8e6cc5: moved doctest tests to env tests
914621c: IDEA-121295 If property part of new property - unable to introduce new property - Maven
db3f6c7: replace tuple with list quick fix for tuple item assignment inspection
e7cd951: Presentation Mode: common font-size fix for all toolwindows with trees
12f048b: Wrap with Exception quick fix for Raising a string exception inspection
0f5ec0d: Propose change signature quick fix for Method signature does not match signature of overridden method inspection
07ecf4d: cleanup
6ac6f4d: IDEA-122049 Mac messages: in some cases parent window is incorrectly detected
5ee2cf2: added remove return statement quick fix for the return from init inspection
1f0a076: IDEA-121995 Code selection is reseted on last line with space if Allow placement of caret inside tabs is enabled
54936df: added rename argument quick fix for the Incorrect call arguments inspection
45020ac: move quick fix to proper place
e909581: IDEA-105935 Facets excluded from detection are still added on maven reimport
57c3cd7: Optimize MavenImporter.getSuitableImporters()
f0d0f8e: do not build VFS for excluded directories
34c32ea: added remove argument quick fix to the Incorrect call arguments inspection
09f5de3: extract variables and method
a145844: EA-54755 - NPE: FoldingUtil.findFoldRegionStartingAtLine
c37d1ba: libs for project templates
f7fad4d: IDEA-88443 (Run Inspection by Name: Inspections with same name are only shown once)
8521b4b: improve description
b65fdb0: show problematic plugins
13cfa13: extract method
06cf300: Merge branch 'master' of git.labs.intellij.net:idea/community
4c2734f: after uninstall of a plugin the button should show "Restart"
1dbe26d: IDEA-121807 - Tomcat Logs doesn't show
02ad525: init nashorn conditional breakpoints
6cd525c: cleanup
1a0161e: cleanup
e939ebe: reverted fix for IDEA-121961 because of failing test
8b32345: after installation of a plugin the button still shows "Install"
e6e0d7d: Merge branch 'master' of git.labs.intellij.net:idea/community
1cb358a: IDEA-85098 Intellij is not supporting groovy-eclipse-compiler
fd27d3b: IDEA-120027 - Import Git-cloud apps from sources - register VCS roots
787d068: filter by custom/bundled
b5950b4: IDEA-120027 - Import Git-cloud apps from sources - single account for all run configurations
53f918f: align text and make header bg match to html bg
cf75116: IDEA-121695 Add managed dependency info on hover over icon
2e5effd: IDEA-121762 Navigate->Select in: for Spring MVC Controller
e301c4e: [log] IDEA-118328 Fix already disposed
5a621a4: updated plugin should have MODIFIED foreground
b46a3bb: hide description on custom plugin panel
f8155ad: add description label
6c9c9f6: added change signature refactoring quick fix to the Incompatible signatures of _new_ and _init_ inspection
bb243be: cleanup
35312e5: Merge remote-tracking branch 'origin/master'
e02ca9c: comment testdata
11cea86: New messages are implemented for jdk7 and latter jdk versions for now.
753497a3: Merge remote-tracking branch 'origin/master'
ec60260: Merge remote-tracking branch 'origin/master'
2a91bce: highlight both incompatible signatures
a314614: Merge remote-tracking branch 'origin/master'
fefdeaf: Merge remote-tracking branch 'origin/master'
4afd85f: Merge branch 'python-fixes'
4b797eb: cleanup
168dbd0: IDEA-117493 Native crash in Mac launcher
88ed475: diff: do not show 'No changes' panel when 'Can not show diff' should be shown
a148809: Merge remote-tracking branch 'origin/master'
88c7d65: lambda completion: strip unnecessary parenthesis, generate parameter names as for override/implement (IDEA-121947)
f738b51: diamonds: incompatible error due to cls class in default package fixed - cls file doesn't process declarations! = need to switch to mirror (IDEA-121866)
2fefd8b: abstract method overrides abstract: distinguish between covariant returns (IDEA-121930)
d851893: testdata for IDEA-121999
b89dc39: testdata for IDEA-121884
7d747c8: new inference: most specific with same functional interface presence
465325a: new inference: nested varargs
144684b: java 8: accept diamonds in method calls
4112118: new inference: choose most specifics between 2 varargs methods
1ee2942: new inference: raw inner class method qualifier fixed (IDEA-121909)
912e13d: add junit4.jar together with hamcrest (IDEA-119626)
10760d9: new inference: process varargs as separate method candidate/separate phase
69c6b7b: java 8 compatibility
62328cf: inspections: completely ignore currently unresolved scopes
fb20169: new inference: reject varargs as method reference target
0f40eb9: new inference: exact method reference is not pertinent to applicability when target type is type parameter
f64d239: rename suggestions: suggest new names for non-variables (IDEA-121982)
05289e4: Guess Python language level from SDKs of opened projects if it's not available for PSI elements
c1346de: codestyle cleanup
ee5f16e: added Add Exception base class quick fix to the Exception doesn't inherit from standard ''Exception'' class inspection
5b8ebf6: EA-54668 - NPE: Breakpoint.setLogEnabled
90c4e07: codestyle cleanup
61b1cb2: do not store reference to PsiElement in qFix, codestyle cleanup, cleanup deprecated method usage
28cc4de: Fix mappings initialization.
41c9f6f: NotNull annotations and checks.
4334ce2: Cleanup (pointless exceptions; field extracted; formatting)
278b8d6: IDEA-121928 Grails 2.3.7 reloading is broken in IntelliJ 13.0.2
bb5986d: IDEA-121938 (serialPersistentFields trips "MismatchedReadAndWriteOfArray" inspection)
93974a3: fix description
58a3377: IDEA-121920 (X/X can be replaced with X - incorrect arithmetic)
7f73d5e: Merge remote-tracking branch 'origin/master'
177f404: Fixed Nullable/NotNull annotations.
f058695: IDEA-54387 (type annotations in introduce parameter)
6bf6d11: Cleanup (pointless exceptions; typos; formatting)
e5fb46b: VcsIntegrationEnablerTest implemented for mock test vcs
c6a1054: IDEA-121990 Filter by old branch fails with exception if full graph is not loaded
7a73eee: IDEA-121961 Debugger: evaluate from variables doesn't include context
e2eaf0d: Support 'overwrite' parameter for maven-resources-plugin.
2acd338: rebase several problems fixed
2ace00e: cleanup deprecated method usage
298c646: @NotNull getStatementList
20269f4: do not store reference to PyFile in add function quickfix
5bd7108: code style cleanup
546c689: get rid of deprecated functions use
85b572b: do not store reference to PsiElement in add field quickfix
a3343a3: Merge remote-tracking branch 'origin/master'
f96d241: turn java messages on
d2d3aa0: IDEA-116134 Inherited maven resource filtering is not applied
532e079: do not suggest python run configuration for scratch files
fc9c134: fix ui under darcula
b00e8a2: [log] IDEA-121992 Recalculate old heads values
813b0dc: Merge remote-tracking branch 'origin/master'
8d41286: Package method for checking version added
4155d62: code style cleanup
757f50b: code style cleanup
f5ac410: cleanup
37c7fca: removed state from add super call quickfix, added tests
08e2f55: refactoring - following CR-IC-4721
c415007: Cleanup (formatting; javadoc)
64c651e: IDEA-54397 (type annotations in override/implement)
3f3e064: IDEA-54396 (type annotations in "Wrap Return Value")
b360456: IDEA-104026 (Java type annotation formatting)
744d7c8: java: "wrap return value" bean formatting fixed
1540e54: Cleanup (pointless exceptions; formatting; nullability)
fb7c097: IDEA-121834 (generic exception substituted)
378b22a: added format specifier quick fix for the python string format inspection
041748c: Package method for checking version addded
35cc71f: eclipse compiler updated to the latest version
7c1a2d6: [git log] Add icon for deep compare function
741e9b9: [log] IDEA-121875 Enable manual commits sorting in VCS that support it
ee27725: make mouse shortcut for adding/removing carets configurable (IDEA-80056)
2ba4ece: Merge remote-tracking branch 'origin/master'
8dd9cc4: added remove dictionary key quick fix for the Dictionary contains duplicate keys inspection
f0a66f7: [log] Fix HashImpl equals
5bd2cdd: [log] HashImpl: remove the caching map
0affa6a: dom: use ReflectionUtil.getClass{Public,Declared}Methods to skip synthetic methods (which change from one java version to another)
aea8f6d: added move except clause quick fix for the Bad except clauses order inspection
39ca570: IDEA-121935 (Inspections: Overloaded variable argument method: every non-problematic method adds a warning)
8d172ac: IDEA-121952 (Java 1.8: "Interface may be annotated with @FunctionalInterface" inspection reports already annotated interfaces)
b1977ea: added Remove assignment quick fix for the Assigning function call that doesn't return anything inspection
81ca41b: test fixed
b6b5a68: fixed PY-11981 "PEP 8 naming convention violation" inspection treats class attributes as function variables
f791db7: fixed PY-10342 Instance attribute defined outside init: detect functions called in init
4d76bdb: Statement list cannot be null
f839260: Merge remote-tracking branch 'origin/master'
6f6d813: fixed PY-12033 PyAbstractClass invalid warning for properties.
85d52dd: IDEA-118296 Impossible to "Prevent App Nap" for the 133.* in MacOSX 10.9 (Mavericks)
c748cef: artwork update for 13.1
2ee2888: attempt to clarify the inspection description
c517b2c: add test
5a0f6fb: Merge remote-tracking branch 'origin/master'
4b96dbf: IDEA-116029 in-place introduce variable name suggestions popup disappears before I can select anything PARTIAL ROLLBACK, fix to be continued...
bd199f1: Merge remote-tracking branch 'origin/master'
b3dfff9: partially reverting 10f6a0f: psi depedent index get buffering status updates because they are applied to unsaved committed documents
255512d: Merge remote-tracking branch 'origin/master'
fa8f612: Move ssh connection provider to remote-run.
1357e2b: use a more memory-efficient structure to hold a long indexed file list
a0885a9: Merge remote-tracking branch 'origin/master'
23b20a8: Merge remote-tracking branch 'origin/master'
69c9865: fix test
bbf4741: - Removed dependency on remote-run in vagrant plugin (PY-12254). - New api for path mappings providers (old left for compatibility with RubyMine and PhpStorm) - Fix launching of Python console for remote interpreter.
e5d9dff: add -> keyword to cpp and make sure it's lexed correctly (IDEA-121906)
5e71180: add a proxy test that fails on java 8
ffa6350: enable new nashorn variables view by default
c60c038: style: remove unnecessary method
965aafa: for unsaved documents with committed state and psi backed index use the same logic as for unsaved documents with plain index
8c56a6b: github tests with wrong notifications fixed
8ce415d: [log] Fix tests. (fix wrong line separators)
ff002de: [log] Remake VcsLogJoiner without recursion.
7ac6e11: [log] IDEA-118947 Implement special highlighting for cherry-pick
881645a: [log] Add ability to listen to possible filter changes
eff05ea: [log] Add ability to reuse branches filter popup
d282a0e: [log] Expose VcsLogRefs into API
3d81303: [log] Expose the VcsLogFilterUi to the API, let set filter value
a54504c: [log] repaint ui after adding highlighter
542550f: [log] make constants final
7066854: [log] Introduce VcsLogDataProvider to the API as part of VcsLogDataHolder
e10b40f: [log] Expose VcsLogUI & DataPack to the vcs-log-api
55c79a0: [log] Make it possible to add VcsLogHighlighters to the log table.
0bca3c6: [log] Remove obsolete CommitCell & its Renderer
61e2ecc: renderValue — add XValue parameter to simplify, why we need to create
b6738e4: Merge branch 'master' of git.labs.intellij.net:idea/community
8e48244: IDEA-119822 - Support Heroku Debug
1052ef2: less garbage
35a1eba: optimisation: use AtomicLazyNullableValue to avoid extra indirection and save memory
cce38ff: cleanup
799041b: notnull
f60abae: NPE protection
e6806dd: remove old code commented code
d7464ee: support run configurations
5717d3a: make public and refactor to make accessible from Search Everywhere
20d9cb0: make public
010566a: IDEA-58818 (SSR: strange highlighting of try-catch in preview pane)
4e1ef49: cleanup
52a92f2: Gradle: detect Scala plugin presence dynamically (to avoid cyclical plugin dependency)
0333bd1: Local History: do not load ignored files and folders into VFS
4fbcf60: cleanup
7a80e9c: fix duplicates and wrong order in search everywhere
48d4765: Platform: check and warn when trying to edit non-project files (do not update notifications, when not necessary)
8358761: IDEA-121898 (Add Don't ignore String for inspection "Number costructor..")
5e097fa: IDEA-121088 (Java Inspections: Type may be weakened readObject() writeObject())
68b7c88: add fourth checkbox to description
cbff651: Platform: check and warn when trying to edit non-project files (disabled in tests)
c0847ee: Merge remote-tracking branch 'origin/master'
590f153: Platform: check and warn when trying to edit non-project files
14a5a6b: gradient colors for buttons
ba067df: initial
774559b: cleanup
9a337d5: IDEA-121494 (Inspection "method overrides private method" can be improved)
cc18c42: add table header with sorters
a4d8900: always use gradient
c559f14: diff: fix UnknownFileType detection
87113dc: re-arrange downloads label
311ff47: github: remove usage of deprecated VcsNotifier API
c3b9b90: [log] IDEA-117553 Optimize details loading: don't parse Changes at once
645caac: 134->136
1168c7b: Cleanup (common method; pointless assertion; formatting)
66eaa91: nashorn: continue variables presentation simplify V8Scope
3627c46: dfa: treat different constants with same values as same (IDEA-121837)
8084cb0: Rebase feature for update project implemented
fc56bcb: Increment hours in comments
044acff: IDEA-121835 "Breakpoints" UI looks clumsy
aa2b1cb: always fold long command line in console (IDEA-121453)
6de56f5: some CharSequence utility methods
defc8ce: IDEA-121800 Live templates are shown in 'Find in Path' dialog if 'autopopup completion' is enabled
dccb826: new inference: cache substitutor for outer call conflict resolution
a5adf26: IDEA-88643 delete item from list of breakpoints by pressing delete key: selection should not return to position 1.
424cffe: [git log] IDEA-121818 Accept HEAD as branch name
a393838: [log] IDEA-121817 Fix keeping selection
70c52ca: [log] Remove the obsolete NoGraphTableModel & simplify the code which used to use it
f41b964: [log] unused
611e758: StringExpressionHelper: JSF->Java-Analysis
54fccb5: IDEA-121828 (Add single member static import intention should be available on incomplete code)
6d2515c: fix IDEA-112499 for single member static imports
811fdf5: fix IDEA-112499 for on demand imports
b52ec5f: IDEA-121784 (Add on demand static import intention not available when single-member static import present)
8853670: IDEA-119908 Smart Step doesn't work for classes generated with java 8
e36425ec: Moved LanguageLevel.forFile() to PyUtil.getLanguageLevelForVirtualFile()
8870abb: Get Python language level from PsiElements where possible instead VirtualFiles
7438ce8: added create property quick fix for the property access inspection
ead71e4: IDEA-121645 Breakpoints conversion: disabled condition is just lost
60fa43c: use constant for history id
15cb81b: continue decouple xdebugger ex ui — XValue/XStackFrame impl
8238972: added Make public quick fix for the protected member access inspection
f471666: fixed NPE in BreakpointManager.getPsiFile
aae9011: Merge branch 'python-fixes'
155f99a: added create property quick fix
d9ae792: IDEA-121806 Breakpoints fail after file modification
e7713c6: test fixed
b5b1518: cleanup
1f2f49e: Platform: do not reverse tabs order on project reopening (IDEA-121816) + new tabs should open on the right (OC-3490)
2b21896: enable multiple carets by default (IDEA-80056)
44646fe: comment added for CPP-147 fix
6da7645: EA-54287 (diagnostic)
eab3611: fixed code style
25c45d1: added rename quick fix to the protected member inspection
d29cdc8: Merge remote-tracking branch 'origin/master'
2527c3a: Merge remote-tracking branch 'origin/master'
6f729cf: EnforcedPlainTextFileTypeManager: pass project as a parameter [CR-IC-4656]
8e176ce: EnforcedPlainTextFileTypeManager: Fix broken file status update sequence (PhpCompletionTest.testExcludedFiles()) [CR-IC-4656]
a5f3040: Use HttpMethod#hasBeenUsed to prevent NPE, if server response was not received
218756a: Merge remote-tracking branch 'origin/master'
3b799e4: filtering templates by frameworks
2670f2d: yellow code
6a440f7: IDEA-121259 Generated toString() placed in incorrect class
3588589: IDEA-121803 (Windows date/time format translation error)
c49bd80: svn: Perform saving all documents during move/rename in SvnFileSystemListener only if operations are related to files under svn - otherwise it could break functionality not related to svn (like renaming file under git) if svn plugin is enabled
b6f778a: disable test navigation outside test roots
43d2b2e: default mapping for SelectAllOccurrences action (IDEA-80056)
da2374a: if facet has associated framework show 'add facet' instead of 'add framework support' dialog in Project Structure (IDEA-120643, IDEA-113833)
594cad9: WEB-10567 Implemented a way to stop run configurations when starting incompatible ones. The idea is that some run configurations may implement CompatibilityAwareRunProfile.isCompatibleWith method and signal that they are not compatible with the run configuration being started so a dialog is displayed to a user and the user can choose to stop incompatible configurations. +review CR-IC
b814f54: IDEA-121403 Live Template: "Surround with tag" should not be applicable while editing XmlAttributeValue
8db0857: better category name
40c45ca: do not add generic builder for "category" templates (e.g. Java FX)
79feee3: EditorActionHandler API cleanup (IDEA-80056)
f4bbcbc: notify listener on task cancellation
a53cccd: IDEA-71048 (test fixed)
4b6b959: system.out removed
3b408e6: Merge remote-tracking branch 'origin/master'
38bdd09: Open terminal in folder that was dragged to it from project view (IDEA-115145).
4586d4a: IDEA-71048 (system date/time formats on Windows)
6a119d1: platform: batch load system date/time formats
c4e7e1f: Cleanup (pointless exceptions; formatting)
177a1d9: drop deprecated stuff
e5740c5: Return true from dispatch in case of event processing.
38764d4: Merge remote-tracking branch 'origin/master'
8f8ef28: IDEA-114457 Undocked 'project' tool window doesn't always automatically hide when I double-click to open a file Animation fix (don't freeze EDT, use Animator), request focus fix.
5ac6d6f: cleanup
e02f4ef: Terminal should override IDE shortcuts by default (IDEA-118837).
fd85821: Merge remote-tracking branch 'origin/master'
026cf99: PY-12022 Clicking "Rerun" button of "Run manage.py Task..." doesn't stop current process
eb2b2db: don't treat live template complete() as second basic completion invocation (HtmlCompletionTest.testXhtmlCompletionInHtml)
6ebe750: dumb-aware actions in the Messages panel
557cca9: IDEA-108072 (Don't suggest to add on-demand static import for the current class)
8d6f72b: IDEA-121756 Don't provide postfix completion options in java string literals
c738a20: IDEA-89020 Disappears value of the variables standing next in Live templates IDEA-121634 Live Template: template is broken with 3+ variables and leading space
31dbd88: use constant empty array (following CR-IC-4606)
8537206: Extract RSS parsing logic and thus remove Atlassian plugin sources completely
1f4a22c: Fix Flex tests + IDEA-121771 <fx:Script> tag autocomplete broken
b08a89d: cache scope attribute keys to reduce daemon garbage
ddd7530: IDEA-121609 Cannot find '+' + using Find in Path
f723320: Merge branch 'master' of git.labs.intellij.net:idea/community
c66ea39: Local History fix: load file children on fileCreated event (second try)
1c7fa2c: IDEA-120027 - Import Git-cloud apps from sources - Heroku
5eab7d1: try single member static import first in live templates
364298f: IDEA-121738 Shift-click in gutter doesn't create 'no suspend' breakpoint anymore
a0a8fe7: fixed editBreakpoint
912e749: diff: do not apply single change multiple times
3403bab: IDEA-12609 diff: do not consider equal changes as conflict
5379407: diff: do not create empty change on applying modified part of 'modified - deleted' conflict
a0c4ea5: diff: rewrite MergeBuilder and MergeList
fc8f64b: merge: rewrite MergeBuilder
90390cf: merge: add test
0adb7cc: @NotNull
bbe7af5: move Inject SQL tip to intelliLang-java
f14856e: speeding up 'Synchronizing output directories': avoid unnecessary rootsChanges events if many output directories were created during compilation (ZD-22766, IDEA-116757)
06b2ee3: fixed PY-11293 namedtuple underscore-methods are not protected
f00ecc2: Merge remote-tracking branch 'origin/master'
2a07097: [git log] don't query ALL when branches to query are specified
397158b: VcsNotifier methods renamed according to their notification groups
24ce9d6: Exception throw  for Unit Test mode removed from GitBranchOperation
6ef9934: CPP-147 PSI is build for files from another project +review CR-IC
64ab58d: nullability
c221e1a: cleanup
0d4f12a: nashorn: initial getReceiverVariable impl
5ab90de: continue nashorn: variables view
c750301: nullability
86d092e: nullability
c97dd80: IDEA-98746 Annoying editor tab tooltips Step 2: clicks will hide tooltips & affect the point below; true "contains" for balloons
060290a0: make carets retain valid positions on Tab width changes, when multiple carets are enabled (IDEA-80056)
7325dffa: Changed default language level to Python 2.7
fd361c4: Merge remote-tracking branch 'origin/master'
1a931f9: lambda: unhandled exceptions inside method body should be treated as those inside anonymous classes (IDEA-121741)
a042720: stream migration inspection: preserve comments (IDEA-121679)
b060c81: stream migration inspection: collapse only primitive new initializers (IDEA-121745)
4d87683: fixed PY-12113 Questionable "access to a protected member of a class" inspection in tests
90d0740: IDEA-98746 Annoying editor tab tooltips Step 1: new setting has been added (Editor -> Editor Tabs -> Show tabs tooltip)
e50b960: [git] remove unused MultipleContentsRevision
70bb70d: [log] Added time measurements to the VCS log
66fb815: renamed resolveWithoutImplicits to getResolveContext (which is more meaningfull)
e1ce2db: [log] Synchonize access to the VcsUserRegistry
a29e2b1: [log] DRY
082b273: [log] prohibit repaint during collapse/expand all branches
6f4a2d5: [log] fireTableStructureChanged if graph changes after some action
23396b0: [log] rename updateUI to repaintUI; unwrap: it shouldn't be executed not from EDT.
347647a: [log] handle answer
a631891: [log] No need to set default cursor
8475418: [log] let handleAnswer be in the single place: VcsLogUI.
43f775c: [log] Add support of getContainingBranches method.
480d1ab: [log] Fix wrong collapse branch nodes.
758c07e: [log] Fix bug related with not load commit node.
a944fe6: [log] Create JumpToNotLoadCommitActionRequest.
610219e: [log] VcsLogSorted fixed.
2d748d6: [log] Disabled selection of relative commits.
03a2a25: [log] Fix performance of collapse all action.
75ff6e6: [log] Add LinearBranchesExpansionAction support. (But collapse all may need more time).
6eaa9bf: [log] Add several debug messages.
45da0e7: [log] Disable draw harmonics in filters.
aeff40e: [log] Add graph for filters.
12bb25e: [log] Don't fail for fresh repositories without commits
bfbc9e4: [log] Don't make graph with always-false filters
33a3bf2: some automatic changes in community modules
ca7f8d3: remove unused
cc1b58a: [log] no filter => null, enable new graph by default, temporary return null if no commits match
c153674: [log] temp diagnostics: why graph sometimes disappear
ab4b7ac: [log] VcsLogSorter stub
8a62c27: [log] temp diagnostics: why graph sometimes disappear
4fd20fc: [log] Fix crash, when mouse over empty row.
8af46ee: [log] Add CollapsedMutableGraph.
6cc0435: [log] Add FragmentGenerator.
0859662: [log] Added highlighting relative commits.
8922251: [log] Extract dfs to DfsUtil.
fe36f19: [log] Simple painter fix.
3e9f31b: [log] Fix not load commit node.
90c7bd1: [log] Fix case when not using new graph for filtering & using old graph facade
b6ed824: [log] IDEA-117157 Filter by multiple branches
eeefcfa: [log] use new graph for filtering commits (disabled by default)
56f381b: [git log] Support filtering by several branches
0cfc872: [log] Fix author column width calculation
20aeb1a: [log] Optimize case with filters: read & store commits without details
01121ba: [log] Add arrow highlighted when mouse over.
4421f12: [log] Add GraphActionDispatcher.
ecdc992: [log] Fix Image overflow.
52db2ef: [log] Fix GraphCellGeneratorImpl.
863d8c7: [log] Fix Branch color.
04a0bc7: [log] Use new GraphFacade
dfc41b0: [log] Temp fix SimpleGraphCellPainter
4f028e7: [log] Copy GraphCellPainter from old log.
62dd4f6: [log] Fix graph, when not all log loaded.
84790b5: [log] Add GraphCellGenerator.
3bf48c4: [log] Add MutableGraph and simple Impl
232fe7f: [log] Add PermanentGraph & Layout
413a6a9: [log] Add GraphFlags
3e4e166: [log] Add IntToIntMap, AbstractIntToIntMap, TreeIntToIntMap and TestTreeIntToIntMap
7642e8a: [log] Get rid of VcsLogDataHolder#getDataPack: pass DataPack manually
435fffb: [log] Explicitly pass VcsLogDataHolder & VcsLogUiProperties
270649b: [log] VcsUserRegistry: return a copy of users map, to avoid CCME
5dd7cd9: [log] Extract graph facade building into separate class
691077d: GraphColorManager initial implementation
a615943: [log] remove no more needed dependencies from vcs-log-graph
be34c32: [log] DataPack: create GraphFacadeImpl instance in build
584e37d: [log] Move GraphFacade implementation to vcs-log-graph module
4e968e1: [log] remove unused stuff from the DataPack.
bfcb3f4: Override paintComponent() instead of paint().
99d52e8: [log] Delegate graph painting to the GraphFacade
c152a29: Move clicks & hovers to the GraphFacade
a00646d: GraphColorManager: more methods + javadocs
98b80a1: rename & check link listener first
54a50ae: GraphAnswer interface
f9b9890: rename to GraphFacade
055f10b: optimize search commit by part of hash
d1b69d1: remove getVisibleCommits since we've got getVisibleCommitCount & getCommitAtRow
411a76f: javadocs
bb8b897: optimize getOneOfHeads: store it in Branch instead of the VirtualFile.
cd4728b: Transition to GraphFacade, step 4: click to row
a74518c: Transition to GraphFacade, step 3: expansion actions
9311f2f: Transition to GraphFacade, step 2: setVisibleBranches
89dd596: Transition to GraphFacade, step 1: getVisibleCommits(), getRoot()
e852593: remove unused methods
8661db5: GraphColorManager
81488e4: some javadocs & GraphInfoProvider extraction
039520b: Graph Black Box refactoring initial step
fce20a5: IDEA-121764 Debugger does not show null values
e14e913: IDEA-121739 Debugger doesn't stop on breakpoints in some anonymous classes
675fa42: fix tests. Rebinding for 'def' reference should do nothing because it references to an inferred variable's type or to a variable itself.
5a54361: IDEA-116134 Inherited maven resource filtering is not applied
1766d06: Groovy: fix parameter info
812d0d6: Groovy: remove redundant GrDefaultAnnotationValue psi.
2bc747e: Groovy: import static intention should be available on argument list
cdfdf8d: IDEA-121662 Unify Groovy and Java Intention behavior
82a4f0d: IDEA-121318 optimizing whether place is child of import statement. Actually place can be a child of an import statement only if it is a GrCodeReferenceElement.
400d1ff: one big comparator for ratings, downloads, updates and status
dbe0372: memory leak fixed
3d017bc: Remove unused SOAP classes generated from WSDL. Leave only basic authorization in legacy connector
d6528d3: vcs notification structure refactored and common integration enabler  provided f or mercurial vcs IDEA-120440
71e985b: IDEA-118548 Fixed locale settings for Mac - so svn launched from IDEA should get correct locale
5f70222: IDEA-121403 Live Template: "Surround with tag" should not be applicable while editing XmlAttributeValue
0e90d93: avoid boxing/unboxing (following CR-IC-4606)
754e7d9: remote table header
99540a3: register all sorters for available plugins table
60861dd: new sorters
ae5ff21: Merge branch 'python-fixes'
455db27: Fixed names of live templates for dict comprehensions (PY-12307)
b2bbf8b: Typo
4569a1c: Don't suggest the initial name if un-pluralization failed (PY-12308)
816b0e4: Don't suggest collection names in live templates that aren't valid Python identifier (PY-12308)
b8412c1: refactor to support multiple sorters
2814c77: Add bundle for common task messages
a4b56a6: java: formatting of type annotations inside type elements
0813c3c: java: type cast intention fixed
37ec0df: update appinfo files
6ff02b1: optimization for breakpoint set in folded code
09c6a8d: method refs: search for potentially applicable members in supers (IDEA-121737)
5412fbc: overload resolution: grab lambda from nested parenthesis as well as conditional expressions
0c7adaa: java: split multi-catch intention simplified; test data made adequate
4969888: java: no annotations needed in type cast
1687a22: Cleanup (unneeded test data)
333e542: Dictionary extended
9da8f7d: IDEA-121384 Breakpoints dialog: for method breakpoint created in dialog new branch is created
20a0571: notnull
dd09f59: notnull
8aab3af: notnull
9e433b6: data race
6c89ea9: cleanup
da637a4: IDEA-84705 Live Template: should be possible to reset the changes made in default templates
ae81974: Merge remote-tracking branch 'origin/master'
f86ac6f: new inference: use equals bounds during incorporation
e07fdee: testdata for IDEA-118965
46112ee: new inference: cache lambda functional type during expression constraints reduction (IDEA-121315)
5029b3f: new inference: do not prefer specifics based on void return type for both void and value compatible lambdas
a70f823: new inference: postpone argument types calculation
2149ea3: Fixed project leak
1608a84: svn: Perform special check if svn repository supports "merge-info" tracking only when corresponding registry key is set
9142df3: classes from old build system API marked as deprecated (to be removed in IDEA 14)
9b4f8c02: svn: Refactored SvnUtil - removed duplicate methods for checking if svn repository supports "merge-info" tracking
d334d41: IDEA-121688 Added CommitEventType.failedOutOfDate; do not fail if could not convert SVNEventAction to CommitEventType (just log warning)
70aed3f: Merge remote-tracking branch 'origin/master'
ba09765: missing test data
76591fd: dfa: comparison with other variables shouldn't affect a variable's nullability status
2c6cea6: IDEA-121698 Automatically make variables accessed from outer scopes final
6166a0e: don't flush fields for pure method and getter calls (IDEA-117449)
80049df: mention method name in edit contract intention text
c1b03f0: dfa: variables shouldn't be marked unknown if they don't have known constant values
1fd57b4: Close terminal tabs with middle click (IDEA-112321).
6ee5d4f: Terminal should sign as xterm-256color (IDEA-118841).
1cd41f0: Merge remote-tracking branch 'origin/master'
8d167c6: Fix the locale on mac only for pycharm processes creation.
96c2016: IDEA-54434 (type annotations in Convert to Atomic/ThreadLocal)
9ae9623: java: formatting of type annotations inside references
50bf5a3: Cleanup (pointless exceptions; formatting)
d44fab7: fix for exception with list of indexed ids merging
39c8f52: Merge remote-tracking branch 'origin/master'
bd3cf45: Launch terminal with fixed locale (IDEA-116401, IDEA-118832, IDEA-120131).
1b0bc5f: fixed regress introduced by c5819e4 : remove stale index data for removed files that were scheduled to update lazily
61d11c8: nashorn: x variables view
a5c886b: cleanup
4433f97: use SingleAlarm
6822332: Fix locale env  vars on mac (IDEA-121713).
8d82a44: IDEA-52034 Implemented option to authenticate svn+ssh repositories using ssh agent (for SVNKit integration) (inspired by @charles-dyfis-net pull request - see issue comments for details)
90b352d: svn: Refactored SSHCredentialsDialog - removed unnecessary code
7f5f956: svn: Updating license info related to svn4idea plugin
cb98865: svn: Upgraded to SVNKit 1.7.11
9d57fb2: Upgraded jna-utils (= platform = jna-platform) to 3.4.0 (now it corresponds to currently used jna 3.4.0) (both jna and jna-utils are downloaded from https://github.com/twall/jna/releases/tag/3.4.0)
d9267b7: Added jsch-agent-proxy library to community
b51333a: IDEA-75033 Implemented feature to automatically switch directory on new branch creation
ee584ce: svn: Refactored AutoSvnUpdater - utility method to run svn updates
97e7ceb: svn: Removed unused classes
d62789b: svn: Refactored SvnConfigurationState - simplify java version checks
7eff048: svn: Make "command line" integration be primary for default svn settings

Change-Id: Idc5975266870a8ad22b9cdd88181a4b53387735f
diff --git a/python/helpers/pydev/pydevd_comm.py b/python/helpers/pydev/pydevd_comm.py
index 376065f..75c857c 100644
--- a/python/helpers/pydev/pydevd_comm.py
+++ b/python/helpers/pydev/pydevd_comm.py
@@ -432,7 +432,7 @@
 
     s = socket(AF_INET, SOCK_STREAM)
 
-    MAX_TRIES = 3
+    MAX_TRIES = 20
     i = 0
     while i<MAX_TRIES:
         try:
diff --git a/python/openapi/src/com/jetbrains/python/packaging/PyPackage.java b/python/openapi/src/com/jetbrains/python/packaging/PyPackage.java
index 18c612f..1e25826 100644
--- a/python/openapi/src/com/jetbrains/python/packaging/PyPackage.java
+++ b/python/openapi/src/com/jetbrains/python/packaging/PyPackage.java
@@ -15,6 +15,7 @@
  */
 package com.jetbrains.python.packaging;
 
+import com.google.common.collect.Lists;
 import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.webcore.packaging.InstalledPackage;
 import org.jetbrains.annotations.NotNull;
@@ -40,6 +41,17 @@
     return myRequirements;
   }
 
+
+  /**
+   * Checks if package meets requirement, descriped in [PEP-0386] format using {@link com.jetbrains.python.packaging.PyRequirement}
+   *
+   * @param requirement to check if package matches
+   * @return true if matches.
+   */
+  public boolean matches(@NotNull final PyRequirement requirement) {
+    return requirement.match(Lists.newArrayList(this)) != null;
+  }
+
   @Nullable
   public String getLocation() {
     return myLocation;
diff --git a/python/openapi/src/com/jetbrains/python/packaging/PyRequirement.java b/python/openapi/src/com/jetbrains/python/packaging/PyRequirement.java
index 3676bab..83ccfa9 100644
--- a/python/openapi/src/com/jetbrains/python/packaging/PyRequirement.java
+++ b/python/openapi/src/com/jetbrains/python/packaging/PyRequirement.java
@@ -34,6 +34,7 @@
 
 /**
  * @author vlan
+ * @see <a href="http://legacy.python.org/dev/peps/pep-0386/">[PEP-0386]</a>
  */
 public class PyRequirement {
   private static final Pattern NAME = Pattern.compile("\\s*(\\w(\\w|[-.])*)\\s*(.*)");
@@ -175,7 +176,8 @@
                                         return spec.toString();
                                       }
                                     },
-                                    ",");
+                                    ","
+    );
   }
 
   @NotNull
@@ -245,6 +247,23 @@
     return null;
   }
 
+  /**
+   * Parses requirement string as described in [pep-0386].
+   * For example: "myPackage&lt;=10.6a3"
+   *
+   * @param line requirement to parse
+   * @return requirement
+   * @throws java.lang.IllegalArgumentException if line can't be parsed
+   */
+  @NotNull
+  public static PyRequirement fromStringGuaranteed(@NotNull final String line) {
+    final PyRequirement requirement = fromString(line);
+    if (requirement == null) {
+      throw new IllegalArgumentException("Failed to parse " + line);
+    }
+    return requirement;
+  }
+
   @Nullable
   public static PyRequirement fromString(@NotNull String line) {
     // TODO: Extras, multi-line requirements '\'
@@ -334,7 +353,6 @@
         if (file != null) {
           return parse(file, visited);
         }
-
       }
     }
     return Collections.emptyList();
diff --git a/python/openapi/src/com/jetbrains/python/psi/RootFileReferenceSet.java b/python/openapi/src/com/jetbrains/python/psi/RootFileReferenceSet.java
index 8fd92a3..a6f1e03 100644
--- a/python/openapi/src/com/jetbrains/python/psi/RootFileReferenceSet.java
+++ b/python/openapi/src/com/jetbrains/python/psi/RootFileReferenceSet.java
@@ -37,7 +37,7 @@
  */
 public class RootFileReferenceSet extends FileReferenceSet {
   public RootFileReferenceSet(String str,
-                              PsiElement element,
+                              @NotNull PsiElement element,
                               int startInElement,
                               PsiReferenceProvider provider,
                               boolean caseSensitive,
@@ -46,7 +46,7 @@
     super(str, element, startInElement, provider, caseSensitive, endingSlashNotAllowed, suitableFileTypes);
   }
 
-  public RootFileReferenceSet(String s, PsiElement element, int offset, PsiReferenceProvider provider, boolean sensitive) {
+  public RootFileReferenceSet(String s, @NotNull PsiElement element, int offset, PsiReferenceProvider provider, boolean sensitive) {
     super(s, element, offset, provider, sensitive);
   }
 
diff --git a/python/openapi/src/com/jetbrains/python/templateLanguages/TemplateFileReferenceSet.java b/python/openapi/src/com/jetbrains/python/templateLanguages/TemplateFileReferenceSet.java
index ae67b46..b914ed0 100644
--- a/python/openapi/src/com/jetbrains/python/templateLanguages/TemplateFileReferenceSet.java
+++ b/python/openapi/src/com/jetbrains/python/templateLanguages/TemplateFileReferenceSet.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,11 +41,11 @@
 public class TemplateFileReferenceSet extends FileReferenceSet {
   private final String mySeparatorString;
 
-  public TemplateFileReferenceSet(PsiElement element, @Nullable PsiReferenceProvider provider) {
+  public TemplateFileReferenceSet(@NotNull PsiElement element, @Nullable PsiReferenceProvider provider) {
     this(str(element), element, provider);
   }
 
-  public TemplateFileReferenceSet(String text, PsiElement element,
+  public TemplateFileReferenceSet(String text, @NotNull PsiElement element,
                                   @Nullable PsiReferenceProvider provider) {
     super(text, element, detectShift(element, text), provider,
           SystemInfo.isFileSystemCaseSensitive);
@@ -53,7 +53,7 @@
     reparse();
   }
 
-  private static String str(PsiElement element) {
+  private static String str(@NotNull PsiElement element) {
     return PythonStringUtil.stripQuotesAroundValue(element.getText());
   }
 
diff --git a/python/pluginResources/META-INF/plugin.xml b/python/pluginResources/META-INF/plugin.xml
index e3aa06f..bd183ec 100644
--- a/python/pluginResources/META-INF/plugin.xml
+++ b/python/pluginResources/META-INF/plugin.xml
@@ -4,9 +4,9 @@
 
   <id>PythonCore</id>
   <name>Python Community Edition</name>
-  <idea-version since-build="134.1007" until-build="134.*"/>
+  <idea-version since-build="134.1007" until-build="136.*"/>
   <description>Smart editing for Python scripts</description>
-  <version>3.1.1.134.@@BUILD_NUMBER@@</version>
+  <version>3.1.1.136.@@BUILD_NUMBER@@</version>
   <depends>com.intellij.modules.java</depends>
 
 
diff --git a/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java b/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java
index abf5114..a09562d 100644
--- a/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java
+++ b/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java
@@ -15,10 +15,7 @@
  */
 package com.jetbrains.python.psi;
 
-import com.intellij.injected.editor.VirtualFileWindow;
-import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.util.Key;
-import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiFile;
 import org.jetbrains.annotations.NotNull;
@@ -37,10 +34,13 @@
   PYTHON33(33, true, false, true, true),
   PYTHON34(34, true, false, true, true);
 
+  private static LanguageLevel DEFAULT2 = PYTHON27;
+  private static LanguageLevel DEFAULT3 = PYTHON33;
+
   public static LanguageLevel FORCE_LANGUAGE_LEVEL = null;
 
   public static LanguageLevel getDefault() {
-    return PYTHON26;
+    return DEFAULT2;
   }
 
   private final int myVersion;
@@ -90,14 +90,20 @@
   }
 
   public static LanguageLevel fromPythonVersion(@NotNull String pythonVersion) {
-    if (pythonVersion.startsWith("2.7")) {
-      return PYTHON27;
-    }
-    if (pythonVersion.startsWith("2.6")) {
-      return PYTHON26;
-    }
-    if (pythonVersion.startsWith("2.5")) {
-      return PYTHON25;
+    if (pythonVersion.startsWith("2")) {
+      if (pythonVersion.startsWith("2.4")) {
+        return PYTHON24;
+      }
+      if (pythonVersion.startsWith("2.5")) {
+        return PYTHON25;
+      }
+      if (pythonVersion.startsWith("2.6")) {
+        return PYTHON26;
+      }
+      if (pythonVersion.startsWith("2.7")) {
+        return PYTHON27;
+      }
+      return DEFAULT2;
     }
     if (pythonVersion.startsWith("3")) {
       if (pythonVersion.startsWith("3.0")) {
@@ -112,42 +118,17 @@
       if (pythonVersion.startsWith("3.3")) {
         return PYTHON33;
       }
-      return PYTHON34;
+      if (pythonVersion.startsWith("3.4")) {
+        return PYTHON34;
+      }
+      return DEFAULT3;
     }
-    return PYTHON24;
+    return getDefault();
   }
 
   public static final Key<LanguageLevel> KEY = new Key<LanguageLevel>("python.language.level");
 
   @NotNull
-  public static LanguageLevel forFile(@NotNull VirtualFile virtualFile) {
-    if (virtualFile instanceof VirtualFileWindow)
-      virtualFile = ((VirtualFileWindow)virtualFile).getDelegate();
-
-    // Most of the cases should be handled by this one, PyLanguageLevelPusher pushes folders only
-    final VirtualFile folder = virtualFile.getParent();
-    if (folder != null) {
-      final LanguageLevel level = folder.getUserData(KEY);
-      if (level != null) return level;
-    }
-    else {
-      // However this allows us to setup language level per file manually
-      // in case when it is LightVirtualFile
-      final LanguageLevel level = virtualFile.getUserData(KEY);
-      if (level != null) return level;
-
-      if (ApplicationManager.getApplication().isUnitTestMode()) {
-        final LanguageLevel languageLevel = FORCE_LANGUAGE_LEVEL;
-        if (languageLevel != null) {
-          return languageLevel;
-        }
-      }
-    }
-
-    return getDefault();
-  }
-
-  @NotNull
   public static LanguageLevel forElement(@NotNull PsiElement element) {
     final PsiFile containingFile = element.getContainingFile();
     if (containingFile instanceof PyFile) {
diff --git a/python/psi-api/src/com/jetbrains/python/psi/PyElementGenerator.java b/python/psi-api/src/com/jetbrains/python/psi/PyElementGenerator.java
index 568cb95..9f6e7c9 100644
--- a/python/psi-api/src/com/jetbrains/python/psi/PyElementGenerator.java
+++ b/python/psi-api/src/com/jetbrains/python/psi/PyElementGenerator.java
@@ -92,6 +92,8 @@
 
   public abstract PyImportElement createImportElement(final LanguageLevel languageLevel, String name);
 
+  public abstract PyFunction createProperty(final LanguageLevel languageLevel, String propertyName, String fieldName, AccessDirection accessDirection);
+
   @NotNull
   public abstract <T> T createFromText(LanguageLevel langLevel, Class<T> aClass, final String text);
 
diff --git a/python/resources/liveTemplates/Python.xml b/python/resources/liveTemplates/Python.xml
index a7e5781..96689b1 100644
--- a/python/resources/liveTemplates/Python.xml
+++ b/python/resources/liveTemplates/Python.xml
@@ -205,7 +205,7 @@
       <option name="OTHER" value="false" />
     </context>
   </template>
-  <template name="compd" value="{$KEY_EXPR$: $VAL_EXPR$ for $VAR$ in $ITERABLE$}" description="Generator comprehension" toReformat="false" toShortenFQNames="true">
+  <template name="compd" value="{$KEY_EXPR$: $VAL_EXPR$ for $VAR$ in $ITERABLE$}" description="Dict comprehension" toReformat="false" toShortenFQNames="true">
     <variable name="ITERABLE" expression="pyIterableVariable()" defaultValue="" alwaysStopAt="true" />
     <variable name="VAR" expression="collectionElementName(ITERABLE)" defaultValue="" alwaysStopAt="true" />
     <variable name="KEY_EXPR" expression="" defaultValue="VAR" alwaysStopAt="true" />
@@ -228,7 +228,7 @@
       <option name="OTHER" value="false" />
     </context>
   </template>
-  <template name="compdi" value="{$KEY_EXPR$: $VAL_EXPR$ for $VAR$ in $ITERABLE$ if $VAR_EXPR_IF$}" description="Generator comprehension with 'if'" toReformat="false" toShortenFQNames="true">
+  <template name="compdi" value="{$KEY_EXPR$: $VAL_EXPR$ for $VAR$ in $ITERABLE$ if $VAR_EXPR_IF$}" description="Dict comprehension with 'if'" toReformat="false" toShortenFQNames="true">
     <variable name="ITERABLE" expression="pyIterableVariable()" defaultValue="" alwaysStopAt="true" />
     <variable name="VAR" expression="collectionElementName(ITERABLE)" defaultValue="" alwaysStopAt="true" />
     <variable name="KEY_EXPR" expression="" defaultValue="VAR" alwaysStopAt="true" />
diff --git a/python/rest/resources/META-INF/plugin.xml b/python/rest/resources/META-INF/plugin.xml
index 76e5727..b10400e 100644
--- a/python/rest/resources/META-INF/plugin.xml
+++ b/python/rest/resources/META-INF/plugin.xml
@@ -3,7 +3,7 @@
   <id>org.jetbrains.plugins.rest</id>
   <description>This plugin enables support for reStructuredText files (*.rst)</description>
   <vendor>JetBrains</vendor>
-  <version>134.SNAPSHOT</version>
+  <version>136.SNAPSHOT</version>
   <idea-version since-build="130.1"/>
   <depends>com.intellij.modules.lang</depends>
 
diff --git a/python/src/META-INF/python-core.xml b/python/src/META-INF/python-core.xml
index 35a7e0b..5cfefea 100644
--- a/python/src/META-INF/python-core.xml
+++ b/python/src/META-INF/python-core.xml
@@ -331,7 +331,7 @@
     <localInspection language="Python" shortName="PyDocstringTypesInspection" bundle="com.jetbrains.python.PyBundle" key="INSP.NAME.docstring.types" groupKey="INSP.GROUP.python" enabledByDefault="true"  level="WEAK WARNING" implementationClass="com.jetbrains.python.inspections.PyDocstringTypesInspection"/>
     <localInspection language="Python" shortName="PyShadowingBuiltinsInspection" displayName="Shadowing built-ins" groupKey="INSP.GROUP.python" enabledByDefault="true"  level="WEAK WARNING" implementationClass="com.jetbrains.python.inspections.PyShadowingBuiltinsInspection"/>
     <localInspection language="Python" shortName="PyShadowingNamesInspection" displayName="Shadowing names from outer scopes" groupKey="INSP.GROUP.python" enabledByDefault="true"  level="WEAK WARNING" implementationClass="com.jetbrains.python.inspections.PyShadowingNamesInspection"/>
-    <localInspection language="Python" shortName="PyAbstractClassInspection" displayName="Class must implement all abstract methods" groupKey="INSP.GROUP.python" enabledByDefault="true"  level="WARNING" implementationClass="com.jetbrains.python.inspections.PyAbstractClassInspection"/>
+    <localInspection language="Python" shortName="PyAbstractClassInspection" displayName="Class must implement all abstract methods" groupKey="INSP.GROUP.python" enabledByDefault="true"  level="WEAK WARNING" implementationClass="com.jetbrains.python.inspections.PyAbstractClassInspection"/>
     <localInspection language="Python" shortName="PyPep8NamingInspection" displayName="PEP 8 naming convention violation" groupKey="INSP.GROUP.python" enabledByDefault="true"  level="WEAK WARNING" implementationClass="com.jetbrains.python.inspections.PyPep8NamingInspection"/>
     <localInspection language="Python" shortName="PyAssignmentToLoopOrWithParameterInspection" displayName="Assignment to 'for' loop or 'with' statement parameter" groupKey="INSP.GROUP.python" enabledByDefault="true"  level="WEAK WARNING" implementationClass="com.jetbrains.python.inspections.PyAssignmentToLoopOrWithParameterInspection"/>
 
diff --git a/python/src/com/jetbrains/python/PyBundle.properties b/python/src/com/jetbrains/python/PyBundle.properties
index 2e280b4..93aa846 100644
--- a/python/src/com/jetbrains/python/PyBundle.properties
+++ b/python/src/com/jetbrains/python/PyBundle.properties
@@ -19,6 +19,13 @@
 QFIX.add.parameter.self=Add parameter ''{0}''
 QFIX.add.super=Add super class call
 
+QFIX.add.property=Add property for the field
+QFIX.use.property=Use property for the field
+
+QFIX.make.public=Make public
+
+QFIX.create.property=Create property
+
 QFIX.add.encoding=Add encoding declaration
 
 QFIX.NAME.parameters=Parameters of functions and methods
@@ -114,6 +121,28 @@
 #PyImplementMethodsQuickFix
 QFIX.NAME.implement.methods=Implement abstract methods
 
+QFIX.NAME.remove.assignment=Remove assignment
+
+QFIX.NAME.remove.statement=Remove statement
+
+QFIX.NAME.move.except.up=Move except clause up
+
+QFIX.NAME.remove.dict.key=Remove this key
+
+QFIX.NAME.add.specifier=Add format specifier character
+
+QFIX.NAME.add.exception.base=Add Exception base class
+
+QFIX.NAME.change.signature=Change signature
+
+QFIX.NAME.remove.argument=Remove argument
+
+QFIX.NAME.rename.argument=Rename argument
+
+QFIX.NAME.wrap.in.exception=Wrap with Exception call
+
+QFIX.NAME.make.list=Replace tuple with list
+
 # Intentions: INTN
 INTN.Family.convert.import.unqualify=Convert 'import module' to 'from module import'
 INTN.Family.convert.import.qualify=Convert 'from module import' to 'import module'
@@ -736,6 +765,7 @@
 # Consoles messages
 python.console=Python Console
 django.console=Django Console
+django.console.and.manage.py=Django Console and manage.py options
 
 # UI messages
 MSG.title.bad.sdk=Invalid Python SDK
@@ -751,6 +781,8 @@
 run.configuration.remote.debug.name=Python Remote Debug
 run.configuration.type.description=Starts server for remote debug
 
+unable.to.stop=Currently running process can't be stopped. Kill it manually first.
+
 #Debug
 
 debug.popup.title.step.into.function=Step Into Function
diff --git a/python/src/com/jetbrains/python/codeInsight/intentions/ConvertFormatOperatorToMethodIntention.java b/python/src/com/jetbrains/python/codeInsight/intentions/ConvertFormatOperatorToMethodIntention.java
index 47c543e..e183aae 100644
--- a/python/src/com/jetbrains/python/codeInsight/intentions/ConvertFormatOperatorToMethodIntention.java
+++ b/python/src/com/jetbrains/python/codeInsight/intentions/ConvertFormatOperatorToMethodIntention.java
@@ -22,7 +22,6 @@
 import com.intellij.openapi.util.Pair;
 import com.intellij.openapi.util.TextRange;
 import com.intellij.openapi.util.text.StringUtil;
-import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiFile;
 import com.intellij.psi.PsiWhiteSpace;
@@ -35,7 +34,10 @@
 import com.jetbrains.python.psi.impl.PyBuiltinCache;
 import com.jetbrains.python.psi.impl.PyPsiUtils;
 import com.jetbrains.python.psi.impl.PyStringLiteralExpressionImpl;
-import com.jetbrains.python.psi.types.*;
+import com.jetbrains.python.psi.types.PyClassType;
+import com.jetbrains.python.psi.types.PyType;
+import com.jetbrains.python.psi.types.PyTypeChecker;
+import com.jetbrains.python.psi.types.TypeEvalContext;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.ArrayList;
@@ -230,11 +232,7 @@
     if (binaryExpression == null) {
       return false;
     }
-    final VirtualFile virtualFile = binaryExpression.getContainingFile().getVirtualFile();
-    if (virtualFile == null) {
-      return false;
-    }
-    final LanguageLevel languageLevel = LanguageLevel.forFile(virtualFile);
+    final LanguageLevel languageLevel = LanguageLevel.forElement(binaryExpression);
     if (languageLevel.isOlderThan(LanguageLevel.PYTHON26)) {
       return false;
     }
diff --git a/python/src/com/jetbrains/python/codeInsight/liveTemplates/CollectionElementNameMacro.java b/python/src/com/jetbrains/python/codeInsight/liveTemplates/CollectionElementNameMacro.java
index 1b8b4ec..7277d83 100644
--- a/python/src/com/jetbrains/python/codeInsight/liveTemplates/CollectionElementNameMacro.java
+++ b/python/src/com/jetbrains/python/codeInsight/liveTemplates/CollectionElementNameMacro.java
@@ -19,6 +19,7 @@
 import com.intellij.codeInsight.lookup.LookupElementBuilder;
 import com.intellij.codeInsight.template.*;
 import com.intellij.openapi.util.text.StringUtil;
+import com.jetbrains.python.psi.PyUtil;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.ArrayList;
@@ -60,16 +61,15 @@
         param = param.substring(0, lastParen);
       }
     }
-    final String result = smartUnpluralize(param);
-    return new TextResult(result);
+    final String result = smartUnPluralize(param);
+    return result != null && PyUtil.isPythonIdentifier(result) ? new TextResult(result) : null;
   }
 
-  private static String smartUnpluralize(String param) {
+  private static String smartUnPluralize(String param) {
     if (param.endsWith("_list")) {
       return param.substring(0, param.length()-5);
     }
-    final String result = StringUtil.unpluralize(param);
-    return result == null ? param : result;
+    return StringUtil.unpluralize(param);
   }
 
   public LookupElement[] calculateLookupItems(@NotNull Expression[] params, ExpressionContext context) {
diff --git a/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsUtil.java b/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsUtil.java
index ea6db07..ef13600 100644
--- a/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsUtil.java
+++ b/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsUtil.java
@@ -129,7 +129,7 @@
         final PsiDirectory psiDirectory = PsiManager.getInstance(project).findDirectory(directory);
         PsiElement fileSkeleton = new QualifiedNameResolverImpl(qName).resolveModuleAt(psiDirectory);
         if (fileSkeleton instanceof PsiDirectory) {
-          fileSkeleton = PyUtil.getPackageElement((PsiDirectory)fileSkeleton);
+          fileSkeleton = PyUtil.getPackageElement((PsiDirectory)fileSkeleton, foothold);
         }
         if (fileSkeleton instanceof PyFile) {
           cache.put(cacheQName, Collections.singletonList(fileSkeleton));
diff --git a/python/src/com/jetbrains/python/console/PydevConsoleRunner.java b/python/src/com/jetbrains/python/console/PydevConsoleRunner.java
index c3f89cd..1520781 100644
--- a/python/src/com/jetbrains/python/console/PydevConsoleRunner.java
+++ b/python/src/com/jetbrains/python/console/PydevConsoleRunner.java
@@ -20,6 +20,7 @@
 import com.intellij.execution.ExecutionException;
 import com.intellij.execution.ExecutionHelper;
 import com.intellij.execution.Executor;
+import com.intellij.execution.configurations.EncodingEnvironmentUtil;
 import com.intellij.execution.configurations.GeneralCommandLine;
 import com.intellij.execution.console.ConsoleHistoryController;
 import com.intellij.execution.console.LanguageConsoleView;
@@ -67,6 +68,7 @@
 import com.jetbrains.python.console.parsing.PythonConsoleData;
 import com.jetbrains.python.console.pydev.ConsoleCommunication;
 import com.jetbrains.python.debugger.PySourcePosition;
+import com.jetbrains.python.remote.PyRemoteSdkAdditionalDataBase;
 import com.jetbrains.python.remote.PythonRemoteInterpreterManager;
 import com.jetbrains.python.run.ProcessRunner;
 import com.jetbrains.python.run.PythonCommandLineState;
@@ -288,8 +290,12 @@
     }
     else {
       myCommandLine = myCommandLineArgumentsProvider.getCommandLineString();
+      Map<String, String> envs = myCommandLineArgumentsProvider.getAdditionalEnvs();
+      if (envs != null) {
+        EncodingEnvironmentUtil.fixDefaultEncodingIfMac(envs, getProject());
+      }
       final Process server = ProcessRunner
-        .createProcess(getWorkingDir(), myCommandLineArgumentsProvider.getAdditionalEnvs(), myCommandLineArgumentsProvider.getArguments());
+        .createProcess(getWorkingDir(), envs, myCommandLineArgumentsProvider.getArguments());
       try {
         myPydevConsoleCommunication = new PydevConsoleCommunication(getProject(), myPorts[0], server, myPorts[1]);
       }
@@ -302,7 +308,7 @@
 
   private Process createRemoteConsoleProcess(PythonRemoteInterpreterManager manager, String[] command, Map<String, String> env)
     throws ExecutionException {
-    RemoteSdkCredentials data = (RemoteSdkCredentials)mySdk.getSdkAdditionalData();
+    PyRemoteSdkAdditionalDataBase data = (PyRemoteSdkAdditionalDataBase)mySdk.getSdkAdditionalData();
     assert data != null;
 
     GeneralCommandLine commandLine = new GeneralCommandLine(command);
@@ -320,18 +326,20 @@
     commandLine.getParametersList().set(3, "0");
 
     myCommandLine = commandLine.getCommandLineString();
-
-    RemoteSshProcess remoteProcess =
-      manager.createRemoteProcess(getProject(), data, commandLine, true);
-
-
-    Pair<Integer, Integer> remotePorts = getRemotePortsFromProcess(remoteProcess);
-
-    remoteProcess.addLocalTunnel(myPorts[0], data.getHost(), remotePorts.first);
-    remoteProcess.addRemoteTunnel(remotePorts.second, "localhost", myPorts[1]);
-
-
+    
     try {
+      RemoteSdkCredentials remoteCredentials = data.getRemoteSdkCredentials();
+      
+      RemoteSshProcess remoteProcess =
+        manager.createRemoteProcess(getProject(), remoteCredentials, commandLine, true);
+
+
+      Pair<Integer, Integer> remotePorts = getRemotePortsFromProcess(remoteProcess);
+
+      remoteProcess.addLocalTunnel(myPorts[0], remoteCredentials.getHost(), remotePorts.first);
+      remoteProcess.addRemoteTunnel(remotePorts.second, "localhost", myPorts[1]);
+
+      
       myPydevConsoleCommunication = new PydevConsoleCommunication(getProject(), myPorts[0], remoteProcess, myPorts[1]);
       return remoteProcess;
     }
@@ -454,7 +462,8 @@
         e.getPresentation().setEnabled(enabled);
       }
     };
-    anAction.registerCustomShortcutSet(KeyEvent.VK_C, InputEvent.CTRL_MASK, getConsoleView().getConsole().getConsoleEditor().getComponent());
+    anAction
+      .registerCustomShortcutSet(KeyEvent.VK_C, InputEvent.CTRL_MASK, getConsoleView().getConsole().getConsoleEditor().getComponent());
     anAction.getTemplatePresentation().setVisible(false);
     return anAction;
   }
diff --git a/python/src/com/jetbrains/python/console/RunPythonConsoleAction.java b/python/src/com/jetbrains/python/console/RunPythonConsoleAction.java
index 728056c..d01159e 100644
--- a/python/src/com/jetbrains/python/console/RunPythonConsoleAction.java
+++ b/python/src/com/jetbrains/python/console/RunPythonConsoleAction.java
@@ -35,7 +35,9 @@
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.util.PathMappingSettings;
 import com.jetbrains.python.buildout.BuildoutFacet;
+import com.jetbrains.python.remote.PyRemoteSdkAdditionalDataBase;
 import com.jetbrains.python.remote.PyRemoteSdkCredentials;
+import com.jetbrains.python.remote.PyRemoteSdkSkeletonsPathAware;
 import com.jetbrains.python.remote.PythonRemoteInterpreterManager;
 import com.jetbrains.python.run.PythonCommandLineState;
 import com.jetbrains.python.sdk.PySdkUtil;
@@ -153,7 +155,7 @@
       PythonRemoteInterpreterManager instance = PythonRemoteInterpreterManager.getInstance();
       if (instance != null) {
         mappingSettings =
-          instance.setupMappings(project, (PyRemoteSdkCredentials)sdk.getSdkAdditionalData(), null);
+          instance.setupMappings(project, (PyRemoteSdkAdditionalDataBase)sdk.getSdkAdditionalData(), null);
       }
     }
     return mappingSettings;
diff --git a/python/src/com/jetbrains/python/highlighting/PySyntaxHighlighterFactory.java b/python/src/com/jetbrains/python/highlighting/PySyntaxHighlighterFactory.java
index 8e9a131..98fbd69 100644
--- a/python/src/com/jetbrains/python/highlighting/PySyntaxHighlighterFactory.java
+++ b/python/src/com/jetbrains/python/highlighting/PySyntaxHighlighterFactory.java
@@ -21,10 +21,11 @@
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.util.containers.FactoryMap;
 import com.jetbrains.python.console.parsing.PyConsoleHighlightingLexer;
-import com.jetbrains.python.console.PydevConsoleRunner;
 import com.jetbrains.python.lexer.PythonHighlightingLexer;
 import com.jetbrains.python.psi.LanguageLevel;
+import com.jetbrains.python.psi.PyUtil;
 import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * @author yole
@@ -51,11 +52,10 @@
     };
 
   @NotNull
-  public SyntaxHighlighter getSyntaxHighlighter(final Project project, final VirtualFile virtualFile) {
-    LanguageLevel languageLevel = virtualFile != null ? LanguageLevel.forFile(virtualFile) : LanguageLevel.getDefault();
-    if (virtualFile != null && PydevConsoleRunner.isInPydevConsole(virtualFile)) {
-      return myConsoleMap.get(languageLevel);
-    }
-    return myMap.get(languageLevel);
+  public SyntaxHighlighter getSyntaxHighlighter(@Nullable final Project project, @Nullable final VirtualFile virtualFile) {
+    final LanguageLevel level = project != null && virtualFile != null ?
+                                PyUtil.getLanguageLevelForVirtualFile(project, virtualFile) :
+                                LanguageLevel.getDefault();
+    return myMap.get(level);
   }
 }
diff --git a/python/src/com/jetbrains/python/inspections/PyAbstractClassInspection.java b/python/src/com/jetbrains/python/inspections/PyAbstractClassInspection.java
index 374f971..3bd8ac1 100644
--- a/python/src/com/jetbrains/python/inspections/PyAbstractClassInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyAbstractClassInspection.java
@@ -16,7 +16,6 @@
 package com.jetbrains.python.inspections;
 
 import com.intellij.codeInspection.LocalInspectionToolSession;
-import com.intellij.codeInspection.ProblemHighlightType;
 import com.intellij.codeInspection.ProblemsHolder;
 import com.intellij.lang.ASTNode;
 import com.intellij.psi.PsiElementVisitor;
@@ -63,14 +62,16 @@
       Set<PyFunction> toBeImplemented = new HashSet<PyFunction>();
       final Collection<PyFunction> functions = PyOverrideImplementUtil.getAllSuperFunctions(node);
       for (PyFunction method : functions) {
-        if (node.findMethodByName(method.getName(), false) == null && PyUtil.isDecoratedAsAbstract(method)) {
+        final String methodName = method.getName();
+        if (methodName != null && PyUtil.isDecoratedAsAbstract(method) &&
+            node.findMethodByName(methodName, false) == null && node.findClassAttribute(methodName, false) == null) {
           toBeImplemented.add(method);
         }
       }
       final ASTNode nameNode = node.getNameNode();
       if (!toBeImplemented.isEmpty() && nameNode != null) {
         registerProblem(nameNode.getPsi(), PyBundle.message("INSP.NAME.abstract.class.$0.must.implement", node.getName()),
-                        ProblemHighlightType.INFO, null, new PyImplementMethodsQuickFix(node, toBeImplemented));
+                        new PyImplementMethodsQuickFix(node, toBeImplemented));
       }
     }
   }
diff --git a/python/src/com/jetbrains/python/inspections/PyArgumentEqualDefaultInspection.java b/python/src/com/jetbrains/python/inspections/PyArgumentEqualDefaultInspection.java
index 9b8b089..2f694b6 100644
--- a/python/src/com/jetbrains/python/inspections/PyArgumentEqualDefaultInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyArgumentEqualDefaultInspection.java
@@ -73,11 +73,11 @@
       if (list == null) {
         return;
       }
-      Callable func = node.resolveCalleeFunction(resolveWithoutImplicits());
+      Callable func = node.resolveCalleeFunction(getResolveContext());
       if (func != null && hasSpecialCasedDefaults(func, node)) {
         return;
       }
-      CallArgumentsMapping result = list.analyzeCall(resolveWithoutImplicits());
+      CallArgumentsMapping result = list.analyzeCall(getResolveContext());
       checkArguments(result, node.getArguments());
     }
 
@@ -141,10 +141,10 @@
       }
       else {
         PsiReference keyRef = key instanceof PyReferenceExpression 
-                              ? ((PyReferenceExpression) key).getReference(resolveWithoutImplicits())
+                              ? ((PyReferenceExpression) key).getReference(getResolveContext())
                               : key.getReference();
         PsiReference defRef = defaultValue instanceof PyReferenceExpression
-                              ? ((PyReferenceExpression) defaultValue).getReference(resolveWithoutImplicits())
+                              ? ((PyReferenceExpression) defaultValue).getReference(getResolveContext())
                               : defaultValue.getReference();
         if (keyRef != null && defRef != null) {
           PsiElement keyResolve = keyRef.resolve();
diff --git a/python/src/com/jetbrains/python/inspections/PyArgumentListInspection.java b/python/src/com/jetbrains/python/inspections/PyArgumentListInspection.java
index 9a87959..dcd6b33 100644
--- a/python/src/com/jetbrains/python/inspections/PyArgumentListInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyArgumentListInspection.java
@@ -15,7 +15,9 @@
  */
 package com.jetbrains.python.inspections;
 
+import com.google.common.collect.Lists;
 import com.intellij.codeInspection.LocalInspectionToolSession;
+import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.ProblemHighlightType;
 import com.intellij.codeInspection.ProblemsHolder;
 import com.intellij.lang.ASTNode;
@@ -24,6 +26,8 @@
 import com.jetbrains.python.PyBundle;
 import com.jetbrains.python.PyNames;
 import com.jetbrains.python.PyTokenTypes;
+import com.jetbrains.python.inspections.quickfix.PyRemoveArgumentQuickFix;
+import com.jetbrains.python.inspections.quickfix.PyRenameArgumentQuickFix;
 import com.jetbrains.python.psi.*;
 import com.jetbrains.python.psi.resolve.PyResolveContext;
 import com.jetbrains.python.psi.types.PyABCUtil;
@@ -33,6 +37,7 @@
 import org.jetbrains.annotations.Nls;
 import org.jetbrains.annotations.NotNull;
 
+import java.util.ArrayList;
 import java.util.EnumSet;
 import java.util.List;
 import java.util.Map;
@@ -71,7 +76,7 @@
       PyDecorator[] decorators = node.getDecorators();
       for (PyDecorator deco : decorators) {
         if (deco.hasArgumentList()) continue;
-        final PyCallExpression.PyMarkedCallee markedCallee = deco.resolveCallee(resolveWithoutImplicits());
+        final PyCallExpression.PyMarkedCallee markedCallee = deco.resolveCallee(getResolveContext());
         if (markedCallee != null && !markedCallee.isImplicitlyResolved()) {
           final Callable callable = markedCallee.getCallable();
           int firstParamOffset =  markedCallee.getImplicitOffset();
@@ -127,19 +132,23 @@
       if (!flags.isEmpty()) { // something's wrong
         PyExpression arg = argEntry.getKey();
         if (flags.contains(CallArgumentsMapping.ArgFlag.IS_DUP)) {
-          holder.registerProblem(arg, PyBundle.message("INSP.duplicate.argument"));
+          holder.registerProblem(arg, PyBundle.message("INSP.duplicate.argument"), new PyRemoveArgumentQuickFix());
         }
         if (flags.contains(CallArgumentsMapping.ArgFlag.IS_DUP_KWD)) {
-          holder.registerProblem(arg, PyBundle.message("INSP.duplicate.doublestar.arg"));
+          holder.registerProblem(arg, PyBundle.message("INSP.duplicate.doublestar.arg"), new PyRemoveArgumentQuickFix());
         }
         if (flags.contains(CallArgumentsMapping.ArgFlag.IS_DUP_TUPLE)) {
-          holder.registerProblem(arg, PyBundle.message("INSP.duplicate.star.arg"));
+          holder.registerProblem(arg, PyBundle.message("INSP.duplicate.star.arg"), new PyRemoveArgumentQuickFix());
         }
         if (flags.contains(CallArgumentsMapping.ArgFlag.IS_POS_PAST_KWD)) {
-          holder.registerProblem(arg, PyBundle.message("INSP.cannot.appear.past.keyword.arg"), ProblemHighlightType.ERROR);
+          holder.registerProblem(arg, PyBundle.message("INSP.cannot.appear.past.keyword.arg"), ProblemHighlightType.ERROR, new PyRemoveArgumentQuickFix());
         }
         if (flags.contains(CallArgumentsMapping.ArgFlag.IS_UNMAPPED)) {
-          holder.registerProblem(arg, PyBundle.message("INSP.unexpected.arg"));
+          ArrayList<LocalQuickFix> quickFixes = Lists.<LocalQuickFix>newArrayList(new PyRemoveArgumentQuickFix());
+          if (arg instanceof PyKeywordArgument) {
+            quickFixes.add(new PyRenameArgumentQuickFix());
+          }
+          holder.registerProblem(arg, PyBundle.message("INSP.unexpected.arg"), quickFixes.toArray(new LocalQuickFix[quickFixes.size()-1]));
         }
         if (flags.contains(CallArgumentsMapping.ArgFlag.IS_TOO_LONG)) {
           final PyCallExpression.PyMarkedCallee markedCallee = result.getMarkedCallee();
diff --git a/python/src/com/jetbrains/python/inspections/PyAssignmentToLoopOrWithParameterInspection.java b/python/src/com/jetbrains/python/inspections/PyAssignmentToLoopOrWithParameterInspection.java
index 2efaf98..e51c2d5 100644
--- a/python/src/com/jetbrains/python/inspections/PyAssignmentToLoopOrWithParameterInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyAssignmentToLoopOrWithParameterInspection.java
@@ -51,23 +51,23 @@
   @NotNull
   @Override
   public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder,
-                                        boolean isOnTheFly,
+                                        final boolean isOnTheFly,
                                         @NotNull final LocalInspectionToolSession session) {
     return new Visitor(holder, session);
   }
 
   private static class Visitor extends PyInspectionVisitor {
-    private Visitor(@Nullable ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {
+    private Visitor(@Nullable final ProblemsHolder holder, @NotNull final LocalInspectionToolSession session) {
       super(holder, session);
     }
 
     @Override
-    public void visitPyWithStatement(PyWithStatement node) {
+    public void visitPyWithStatement(final PyWithStatement node) {
       checkNotReDeclaringUpperLoopOrStatement(node);
     }
 
     @Override
-    public void visitPyForStatement(PyForStatement node) {
+    public void visitPyForStatement(final PyForStatement node) {
       checkNotReDeclaringUpperLoopOrStatement(node);
     }
 
@@ -75,11 +75,15 @@
      * Finds first parent of specific type (See {@link #isRequiredStatement(com.intellij.psi.PsiElement)})
      * that declares one of names, declared in this statement
      */
-    private void checkNotReDeclaringUpperLoopOrStatement(NameDefiner statement) {
-      for (PsiElement declaredVar : statement.iterateNames()) {
-        Filter filter = new Filter(handleSubscriptionsAndResolveSafely(declaredVar));
-        PsiElement firstParent = PsiTreeUtil.findFirstParent(statement, true, filter);
-        if (firstParent != null && isRequiredStatement(firstParent)) {
+    private void checkNotReDeclaringUpperLoopOrStatement(@NotNull final NameDefiner statement) {
+      for (final PsiElement declaredVar : statement.iterateNames()) {
+        final Filter filter = new Filter(handleSubscriptionsAndResolveSafely(declaredVar));
+        final PsiElement firstParent = PsiTreeUtil.findFirstParent(statement, true, filter);
+        if ((firstParent != null) && isRequiredStatement(firstParent)) {
+          // If parent is "for", we need to check that statement not declared in "else": PY-12367
+          if ((firstParent instanceof PyForStatement) && isDeclaredInElse(statement, (PyForStatement)firstParent)) {
+            continue;
+          }
           registerProblem(declaredVar,
                           PyBundle.message("INSP.NAME.assignment.to.loop.or.with.parameter.display.message", declaredVar.getText()));
         }
@@ -88,36 +92,52 @@
   }
 
   /**
-   * Filters list of parents trying to find parent that declares var that refers to {@link #node}
+   * Checks that element is declared in "else" statement of "for" statement
+   *
+   * @param elementToCheck element to check
+   * @param forStatement   statement to obtain "else" part from
+   * @return true if declated in "Else" block
+   */
+  private static boolean isDeclaredInElse(@NotNull final PsiElement elementToCheck, @NotNull final PyForStatement forStatement) {
+    final PyElsePart elsePart = forStatement.getElsePart();
+    if (elsePart != null) {
+      if (PsiTreeUtil.isAncestor(elsePart, elementToCheck, false)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Filters list of parents trying to find parent that declares var that refers to {@link #myNode}
    * Returns {@link com.jetbrains.python.codeInsight.controlflow.ScopeOwner} if nothing found.
    * Returns parent otherwise.
    */
   private static class Filter implements Condition<PsiElement> {
-    private final PsiElement node;
+    private final PsiElement myNode;
 
-    private Filter(PsiElement node) {
-      this.node = node;
+    private Filter(final PsiElement node) {
+      this.myNode = node;
     }
 
     @Override
-    public boolean value(PsiElement psiElement) {
+    public boolean value(final PsiElement psiElement) {
       if (psiElement instanceof ScopeOwner) {
         return true; //Do not go any further
       }
-      if (!(isRequiredStatement(psiElement))) {
+      if (!isRequiredStatement(psiElement)) {
         return false; //Parent has wrong type, skip
       }
-      Iterable<PyElement> varsDeclaredInStatement = ((NameDefiner)psiElement).iterateNames();
-      for (PsiElement varDeclaredInStatement : varsDeclaredInStatement) {
+      final Iterable<PyElement> varsDeclaredInStatement = ((NameDefiner)psiElement).iterateNames();
+      for (final PsiElement varDeclaredInStatement : varsDeclaredInStatement) {
         //For each variable, declared by this parent take first declaration and open subscription list if any
-        PsiReference reference = handleSubscriptionsAndResolveSafely(varDeclaredInStatement).getReference();
-        if (reference != null && reference.isReferenceTo(node)) {
+        final PsiReference reference = handleSubscriptionsAndResolveSafely(varDeclaredInStatement).getReference();
+        if ((reference != null) && reference.isReferenceTo(myNode)) {
           return true; //One of variables declared by this parent refers to node
         }
       }
       return false;
     }
-
   }
 
   /**
@@ -142,8 +162,8 @@
    * @param element to check
    * @return true if inspection should work with this element
    */
-  private static boolean isRequiredStatement(PsiElement element) {
+  private static boolean isRequiredStatement(final PsiElement element) {
     assert element != null;
-    return element instanceof PyWithStatement || element instanceof PyForStatement;
+    return (element instanceof PyWithStatement) || (element instanceof PyForStatement);
   }
 }
diff --git a/python/src/com/jetbrains/python/inspections/PyAttributeOutsideInitInspection.java b/python/src/com/jetbrains/python/inspections/PyAttributeOutsideInitInspection.java
index 791a1b5..76d6a40 100644
--- a/python/src/com/jetbrains/python/inspections/PyAttributeOutsideInitInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyAttributeOutsideInitInspection.java
@@ -67,6 +67,8 @@
     public void visitPyFunction(PyFunction node) {
       final PyClass containingClass = node.getContainingClass();
       if (containingClass == null) return;
+      final String name = node.getName();
+      if (name != null && name.startsWith("_")) return;
       if (!isApplicable(containingClass)) {
         return;
       }
diff --git a/python/src/com/jetbrains/python/inspections/PyCallByClassInspection.java b/python/src/com/jetbrains/python/inspections/PyCallByClassInspection.java
index 3812848..9b05268 100644
--- a/python/src/com/jetbrains/python/inspections/PyCallByClassInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyCallByClassInspection.java
@@ -90,7 +90,7 @@
               PyClass qual_class = qual_class_type.getPyClass();
               final PyArgumentList arglist = call.getArgumentList();
               if (arglist != null) {
-                CallArgumentsMapping analysis = arglist.analyzeCall(resolveWithoutImplicits());
+                CallArgumentsMapping analysis = arglist.analyzeCall(getResolveContext());
                 final PyCallExpression.PyMarkedCallee markedCallee = analysis.getMarkedCallee();
                 if (markedCallee != null  && markedCallee.getModifier() != STATICMETHOD) {
                   final List<PyParameter> params = PyUtil.getParameters(markedCallee.getCallable(), myTypeEvalContext);
diff --git a/python/src/com/jetbrains/python/inspections/PyClassHasNoInitInspection.java b/python/src/com/jetbrains/python/inspections/PyClassHasNoInitInspection.java
index 92ef945..89e8e95 100644
--- a/python/src/com/jetbrains/python/inspections/PyClassHasNoInitInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyClassHasNoInitInspection.java
@@ -27,7 +27,6 @@
 import com.jetbrains.python.psi.PyFunction;
 import com.jetbrains.python.psi.types.PyClassLikeType;
 import com.jetbrains.python.psi.types.PyClassType;
-import com.jetbrains.python.psi.types.PyClassTypeImpl;
 import org.jetbrains.annotations.Nls;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -77,7 +76,7 @@
       final PyFunction init = node.findInitOrNew(true);
       if (init == null) {
         registerProblem(node.getNameIdentifier(), PyBundle.message("INSP.class.has.no.init"),
-                        new AddMethodQuickFix("__init__", new PyClassTypeImpl(node, false), false));
+                        new AddMethodQuickFix("__init__", node.getName(), false));
       }
     }
   }
diff --git a/python/src/com/jetbrains/python/inspections/PyDeprecationInspection.java b/python/src/com/jetbrains/python/inspections/PyDeprecationInspection.java
index 368b893..fc60616 100644
--- a/python/src/com/jetbrains/python/inspections/PyDeprecationInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyDeprecationInspection.java
@@ -58,7 +58,7 @@
         final PyExpression exceptClass = exceptPart.getExceptClass();
         if (exceptClass != null && "ImportError".equals(exceptClass.getText())) return;
       }
-      PsiElement resolveResult = node.getReference(resolveWithoutImplicits()).resolve();
+      PsiElement resolveResult = node.getReference(getResolveContext()).resolve();
       String deprecationMessage = null;
       if (resolveResult instanceof PyFunction) {
         deprecationMessage = ((PyFunction) resolveResult).getDeprecationMessage();
diff --git a/python/src/com/jetbrains/python/inspections/PyDictDuplicateKeysInspection.java b/python/src/com/jetbrains/python/inspections/PyDictDuplicateKeysInspection.java
index 8bcf14f..51784a5 100644
--- a/python/src/com/jetbrains/python/inspections/PyDictDuplicateKeysInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyDictDuplicateKeysInspection.java
@@ -22,6 +22,7 @@
 import com.intellij.psi.PsiElementVisitor;
 import com.intellij.util.containers.HashMap;
 import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.inspections.quickfix.PyRemoveDictKeyQuickFix;
 import com.jetbrains.python.psi.*;
 import org.jetbrains.annotations.Nls;
 import org.jetbrains.annotations.NotNull;
@@ -64,8 +65,8 @@
           if (key instanceof PyNumericLiteralExpression
                   || key instanceof PyStringLiteralExpression || key instanceof PyReferenceExpression) {
             if (map.keySet().contains(key.getText())) {
-              registerProblem(key, "Dictionary contains duplicate keys " + key.getText());
-              registerProblem(map.get(key.getText()), "Dictionary contains duplicate keys " + key.getText());
+              registerProblem(key, "Dictionary contains duplicate keys " + key.getText(), new PyRemoveDictKeyQuickFix());
+              registerProblem(map.get(key.getText()), "Dictionary contains duplicate keys " + key.getText(), new PyRemoveDictKeyQuickFix());
             }
             map.put(key.getText(), key);
           }
diff --git a/python/src/com/jetbrains/python/inspections/PyExceptClausesOrderInspection.java b/python/src/com/jetbrains/python/inspections/PyExceptClausesOrderInspection.java
index 4d8ffa7..043a113 100644
--- a/python/src/com/jetbrains/python/inspections/PyExceptClausesOrderInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyExceptClausesOrderInspection.java
@@ -21,6 +21,7 @@
 import com.intellij.psi.PsiElementVisitor;
 import com.intellij.util.containers.HashSet;
 import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.inspections.quickfix.PyMoveExceptQuickFix;
 import com.jetbrains.python.psi.*;
 import org.jetbrains.annotations.Nls;
 import org.jetbrains.annotations.NotNull;
@@ -58,7 +59,7 @@
         for (PyExceptPart exceptPart : exceptParts) {
           PyExpression exceptClass = exceptPart.getExceptClass();
           if (exceptClass instanceof PyReferenceExpression) {
-            PsiElement element = ((PyReferenceExpression) exceptClass).followAssignmentsChain(resolveWithoutImplicits()).getElement();
+            PsiElement element = ((PyReferenceExpression) exceptClass).followAssignmentsChain(getResolveContext()).getElement();
             if (element instanceof PyClass) {
               PyClass pyClass = (PyClass)element;
               if (exceptClasses.contains(pyClass)) {
@@ -66,7 +67,8 @@
               } else {
                 for (PyClass superClass: pyClass.getSuperClasses()) {
                   if (exceptClasses.contains(superClass)) {
-                    registerProblem(exceptClass, PyBundle.message("INSP.class.$0.superclass.$1.already.caught", superClass.getName(), pyClass.getName()));
+                    registerProblem(exceptClass, PyBundle.message("INSP.class.$0.superclass.$1.already.caught", superClass.getName(), pyClass.getName()),
+                                    new PyMoveExceptQuickFix());
                   }
                 }
               }
diff --git a/python/src/com/jetbrains/python/inspections/PyExceptionInheritInspection.java b/python/src/com/jetbrains/python/inspections/PyExceptionInheritInspection.java
index f89d530..b659cb8 100644
--- a/python/src/com/jetbrains/python/inspections/PyExceptionInheritInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyExceptionInheritInspection.java
@@ -19,7 +19,9 @@
 import com.intellij.codeInspection.ProblemsHolder;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.PsiPolyVariantReference;
 import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.inspections.quickfix.PyAddExceptionSuperClassQuickFix;
 import com.jetbrains.python.psi.*;
 import com.jetbrains.python.psi.types.PyClassLikeType;
 import org.jetbrains.annotations.Nls;
@@ -60,7 +62,9 @@
       if (expression instanceof PyCallExpression) {
         PyExpression callee = ((PyCallExpression)expression).getCallee();
         if (callee instanceof PyReferenceExpression) {
-          PsiElement psiElement = ((PyReferenceExpression)callee).getReference(resolveWithoutImplicits()).resolve();
+          final PsiPolyVariantReference reference = ((PyReferenceExpression)callee).getReference(getResolveContext());
+          if (reference == null) return;
+          PsiElement psiElement = reference.resolve();
           if (psiElement instanceof PyClass) {
             PyClass aClass = (PyClass) psiElement;
             for (PyClassLikeType type : aClass.getAncestorTypes(myTypeEvalContext)) {
@@ -72,7 +76,7 @@
                 return;
               }
             }
-            registerProblem(expression, "Exception doesn't inherit from base \'Exception\' class");
+            registerProblem(expression, "Exception doesn't inherit from base \'Exception\' class", new PyAddExceptionSuperClassQuickFix());
           }
         }
       }
diff --git a/python/src/com/jetbrains/python/inspections/PyInitNewSignatureInspection.java b/python/src/com/jetbrains/python/inspections/PyInitNewSignatureInspection.java
index 694d7ad..fa269da 100644
--- a/python/src/com/jetbrains/python/inspections/PyInitNewSignatureInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyInitNewSignatureInspection.java
@@ -20,6 +20,7 @@
 import com.intellij.psi.PsiElementVisitor;
 import com.jetbrains.python.PyBundle;
 import com.jetbrains.python.PyNames;
+import com.jetbrains.python.inspections.quickfix.PyChangeSignatureQuickFix;
 import com.jetbrains.python.psi.PyClass;
 import com.jetbrains.python.psi.PyFunction;
 import com.jetbrains.python.psi.PyUtil;
@@ -30,6 +31,7 @@
 
 /**
  * Detect and report incompatibilities between __new__ and __init__ signatures.
+ *
  * @author dcheryasov
  */
 public class PyInitNewSignatureInspection extends PyInspection {
@@ -53,24 +55,23 @@
     }
 
     @Override
-    public void visitPyClass(PyClass cls) {
-      if (! cls.isNewStyleClass()) return; // old-style classes don't know about __new__
-      PyFunction init_or_new = cls.findInitOrNew(false); // only local
+    public void visitPyFunction(PyFunction node) {
+      final String functionName = node.getName();
+      if (!PyNames.NEW.equals(functionName) && !PyNames.INIT.equals(functionName)) return;
+      final PyClass cls = node.getContainingClass();
+      if (cls == null) return;
+      if (!cls.isNewStyleClass()) return;
       final PyBuiltinCache builtins = PyBuiltinCache.getInstance(cls);
-      if (init_or_new == null || builtins.isBuiltin(init_or_new.getContainingClass())) return; // nothing is overridden
-      String the_other_name = PyNames.NEW.equals(init_or_new.getName()) ? PyNames.INIT : PyNames.NEW;
-      PyFunction the_other = cls.findMethodByName(the_other_name, true);
-      if (the_other == null || builtins.getClass("object") == the_other.getContainingClass()) return;
-      if (!PyUtil.isSignatureCompatibleTo(the_other, init_or_new, myTypeEvalContext) &&
-          !PyUtil.isSignatureCompatibleTo(init_or_new, the_other, myTypeEvalContext) &&
-          init_or_new.getContainingFile() == cls.getContainingFile()
-      ) {
-        registerProblem(init_or_new.getParameterList(), PyNames.NEW.equals(init_or_new.getName()) ?
-                                     PyBundle.message("INSP.new.incompatible.to.init") :
-                                     PyBundle.message("INSP.init.incompatible.to.new")
-        );
+      final String complementaryName = PyNames.NEW.equals(functionName) ? PyNames.INIT : PyNames.NEW;
+      final PyFunction complementaryMethod = cls.findMethodByName(complementaryName, true);
+      if (complementaryMethod == null || builtins.getClass("object") == complementaryMethod.getContainingClass()) return;
+      if (!PyUtil.isSignatureCompatibleTo(complementaryMethod, node, myTypeEvalContext) &&
+          !PyUtil.isSignatureCompatibleTo(node, complementaryMethod, myTypeEvalContext) &&
+          node.getContainingFile() == cls.getContainingFile()) {
+        registerProblem(node.getParameterList(), PyNames.NEW.equals(node.getName()) ? PyBundle.message("INSP.new.incompatible.to.init") :
+                                                      PyBundle.message("INSP.init.incompatible.to.new"),
+                        new PyChangeSignatureQuickFix(false));
       }
     }
   }
-
 }
\ No newline at end of file
diff --git a/python/src/com/jetbrains/python/inspections/PyInspectionVisitor.java b/python/src/com/jetbrains/python/inspections/PyInspectionVisitor.java
index 3b8d499..4584f06 100644
--- a/python/src/com/jetbrains/python/inspections/PyInspectionVisitor.java
+++ b/python/src/com/jetbrains/python/inspections/PyInspectionVisitor.java
@@ -52,7 +52,7 @@
     myTypeEvalContext = context;
   }
 
-  protected PyResolveContext resolveWithoutImplicits() {
+  protected PyResolveContext getResolveContext() {
     return PyResolveContext.noImplicits().withTypeEvalContext(myTypeEvalContext);
   }
 
diff --git a/python/src/com/jetbrains/python/inspections/PyMethodMayBeStaticInspection.java b/python/src/com/jetbrains/python/inspections/PyMethodMayBeStaticInspection.java
index acf33c5..0c4333a 100644
--- a/python/src/com/jetbrains/python/inspections/PyMethodMayBeStaticInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyMethodMayBeStaticInspection.java
@@ -75,8 +75,6 @@
       if (property != null) return;
 
       final PyStatementList statementList = node.getStatementList();
-      if (statementList == null) return;
-
       final PyStatement[] statements = statementList.getStatements();
 
       if (statements.length == 1 && statements[0] instanceof PyPassStatement) return;
diff --git a/python/src/com/jetbrains/python/inspections/PyMethodOverridingInspection.java b/python/src/com/jetbrains/python/inspections/PyMethodOverridingInspection.java
index 5bb8e69..c817754 100644
--- a/python/src/com/jetbrains/python/inspections/PyMethodOverridingInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyMethodOverridingInspection.java
@@ -21,6 +21,7 @@
 import com.intellij.psi.PsiElementVisitor;
 import com.jetbrains.python.PyBundle;
 import com.jetbrains.python.PyNames;
+import com.jetbrains.python.inspections.quickfix.PyChangeSignatureQuickFix;
 import com.jetbrains.python.psi.PyClass;
 import com.jetbrains.python.psi.PyFunction;
 import com.jetbrains.python.psi.PyUtil;
@@ -68,7 +69,7 @@
             final String msg = PyBundle.message("INSP.signature.mismatch",
                                                 cls.getName() + "." + name + "()",
                                                 baseClass != null ? baseClass.getName() : "");
-            registerProblem(function.getParameterList(), msg);
+            registerProblem(function.getParameterList(), msg, new PyChangeSignatureQuickFix(true));
           }
         }
       }
diff --git a/python/src/com/jetbrains/python/inspections/PyMissingConstructorInspection.java b/python/src/com/jetbrains/python/inspections/PyMissingConstructorInspection.java
index 9087180..c5b5792 100644
--- a/python/src/com/jetbrains/python/inspections/PyMissingConstructorInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyMissingConstructorInspection.java
@@ -70,7 +70,7 @@
         }
         if (superClasses.length == 1 || node.isNewStyleClass())
           registerProblem(initMethod.getNameIdentifier(), PyBundle.message("INSP.missing.super.constructor.message"),
-                          new AddCallSuperQuickFix(node.getSuperClasses()[0], superClasses[0].getText()));
+                          new AddCallSuperQuickFix());
         else
           registerProblem(initMethod.getNameIdentifier(), PyBundle.message("INSP.missing.super.constructor.message"));
       }
diff --git a/python/src/com/jetbrains/python/inspections/PyNoneFunctionAssignmentInspection.java b/python/src/com/jetbrains/python/inspections/PyNoneFunctionAssignmentInspection.java
index 41199d3..2a5a555 100644
--- a/python/src/com/jetbrains/python/inspections/PyNoneFunctionAssignmentInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyNoneFunctionAssignmentInspection.java
@@ -20,6 +20,7 @@
 import com.intellij.psi.PsiElementVisitor;
 import com.intellij.util.containers.hash.HashMap;
 import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.inspections.quickfix.PyRemoveAssignmentQuickFix;
 import com.jetbrains.python.psi.*;
 import com.jetbrains.python.psi.search.PyOverridingMethodsSearch;
 import com.jetbrains.python.psi.types.PyNoneType;
@@ -84,7 +85,7 @@
                 return;
               }
             }
-            registerProblem(node, PyBundle.message("INSP.none.function.assignment", callee.getName()));
+            registerProblem(node, PyBundle.message("INSP.none.function.assignment", callee.getName()), new PyRemoveAssignmentQuickFix());
           }
         }
       }
diff --git a/python/src/com/jetbrains/python/inspections/PyPep8NamingInspection.java b/python/src/com/jetbrains/python/inspections/PyPep8NamingInspection.java
index 1b3dfc6..14b6286 100644
--- a/python/src/com/jetbrains/python/inspections/PyPep8NamingInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyPep8NamingInspection.java
@@ -26,10 +26,9 @@
 import com.intellij.util.containers.hash.HashMap;
 import com.jetbrains.python.codeInsight.controlflow.ControlFlowCache;
 import com.jetbrains.python.codeInsight.dataflow.scope.Scope;
+import com.jetbrains.python.inspections.quickfix.PyRenameElementQuickFix;
 import com.jetbrains.python.psi.*;
 import com.jetbrains.python.psi.search.PySuperMethodsSearch;
-import com.jetbrains.python.psi.types.PyModuleType;
-import com.jetbrains.python.psi.types.PyType;
 import com.jetbrains.python.testing.pytest.PyTestUtil;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -77,8 +76,7 @@
         if (expression instanceof PyTargetExpression) {
           final PyExpression qualifier = ((PyTargetExpression)expression).getQualifier();
           if (qualifier != null) {
-            final PyType type = myTypeEvalContext.getType(qualifier);
-            if (type instanceof PyModuleType) return;
+            return;
           }
         }
         if (!LOWERCASE_REGEX.matcher(name).matches() && !name.startsWith("_")) {
diff --git a/python/src/com/jetbrains/python/inspections/PyPropertyAccessInspection.java b/python/src/com/jetbrains/python/inspections/PyPropertyAccessInspection.java
index 8e48067..4062a69 100644
--- a/python/src/com/jetbrains/python/inspections/PyPropertyAccessInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyPropertyAccessInspection.java
@@ -22,6 +22,7 @@
 import com.intellij.psi.PsiElementVisitor;
 import com.intellij.util.containers.HashMap;
 import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.inspections.quickfix.PyCreatePropertyQuickFix;
 import com.jetbrains.python.psi.*;
 import com.jetbrains.python.psi.types.PyClassType;
 import com.jetbrains.python.psi.types.PyType;
@@ -117,7 +118,7 @@
         else {
           message = PyBundle.message("INSP.property.$0.cant.be.read", name);
         }
-        registerProblem(node, message);
+        registerProblem(node, message, new PyCreatePropertyQuickFix(dir));
       }
     }
 
diff --git a/python/src/com/jetbrains/python/inspections/PyPropertyDefinitionInspection.java b/python/src/com/jetbrains/python/inspections/PyPropertyDefinitionInspection.java
index 27fff56..952c8e2 100644
--- a/python/src/com/jetbrains/python/inspections/PyPropertyDefinitionInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyPropertyDefinitionInspection.java
@@ -21,19 +21,18 @@
 import com.intellij.codeInspection.ProblemsHolder;
 import com.intellij.lang.ASTNode;
 import com.intellij.openapi.util.Comparing;
-import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiElementVisitor;
 import com.intellij.psi.PsiFile;
 import com.intellij.psi.util.PsiElementFilter;
 import com.intellij.psi.util.PsiTreeUtil;
+import com.intellij.psi.util.QualifiedName;
 import com.intellij.util.Processor;
 import com.jetbrains.python.PyBundle;
 import com.jetbrains.python.PyNames;
 import com.jetbrains.python.inspections.quickfix.RenameParameterQuickFix;
 import com.jetbrains.python.psi.*;
 import com.jetbrains.python.psi.impl.PyBuiltinCache;
-import com.intellij.psi.util.QualifiedName;
 import com.jetbrains.python.psi.types.PyClassType;
 import com.jetbrains.python.psi.types.PyNoneType;
 import com.jetbrains.python.psi.types.PyType;
@@ -79,13 +78,7 @@
       super(holder, session);
       PsiFile psiFile = session.getFile();
       // save us continuous checks for level, module, stc
-      LanguageLevel level = null;
-      if (psiFile != null) {
-        VirtualFile vfile = psiFile.getVirtualFile();
-        if (vfile != null) level = LanguageLevel.forFile(vfile);
-      }
-      if (level == null) level = LanguageLevel.getDefault();
-      myLevel = level;
+      myLevel = LanguageLevel.forElement(psiFile);
       // string classes
       final List<PyClass> string_classes = new ArrayList<PyClass>(2);
       final PyBuiltinCache builtins = PyBuiltinCache.getInstance(psiFile);
@@ -124,7 +117,7 @@
             assert call != null : "Property has a null call assigned to it";
             final PyArgumentList arglist = call.getArgumentList();
             assert arglist != null : "Property call has null arglist";
-            CallArgumentsMapping analysis = arglist.analyzeCall(resolveWithoutImplicits());
+            CallArgumentsMapping analysis = arglist.analyzeCall(getResolveContext());
             // we assume fget, fset, fdel, doc names
             for (Map.Entry<PyExpression, PyNamedParameter> entry: analysis.getPlainMappedParams().entrySet()) {
               final String param_name = entry.getValue().getName();
@@ -150,7 +143,7 @@
       assert argument != null : "Parameter mapped to null argument";
       Callable callable = null;
       if (argument instanceof PyReferenceExpression) {
-        PsiElement resolved = ((PyReferenceExpression)argument).getReference(resolveWithoutImplicits()).resolve();
+        PsiElement resolved = ((PyReferenceExpression)argument).getReference(getResolveContext()).resolve();
         if (resolved instanceof Callable) {
           callable = (Callable)resolved;
         }
diff --git a/python/src/com/jetbrains/python/inspections/PyProtectedMemberInspection.java b/python/src/com/jetbrains/python/inspections/PyProtectedMemberInspection.java
index 5277576..ddb14f1 100644
--- a/python/src/com/jetbrains/python/inspections/PyProtectedMemberInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyProtectedMemberInspection.java
@@ -16,7 +16,11 @@
 package com.jetbrains.python.inspections;
 
 import com.intellij.codeInspection.LocalInspectionToolSession;
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemHighlightType;
 import com.intellij.codeInspection.ProblemsHolder;
+import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel;
+import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiElementVisitor;
 import com.intellij.psi.PsiReference;
@@ -24,15 +28,27 @@
 import com.jetbrains.python.PyNames;
 import com.jetbrains.python.codeInsight.controlflow.ScopeOwner;
 import com.jetbrains.python.codeInsight.dataflow.scope.ScopeUtil;
+import com.jetbrains.python.codeInsight.stdlib.PyNamedTupleType;
+import com.jetbrains.python.inspections.quickfix.PyAddPropertyForFieldQuickFix;
+import com.jetbrains.python.inspections.quickfix.PyMakePublicQuickFix;
+import com.jetbrains.python.inspections.quickfix.PyRenameElementQuickFix;
 import com.jetbrains.python.psi.PyClass;
 import com.jetbrains.python.psi.PyExpression;
 import com.jetbrains.python.psi.PyReferenceExpression;
+import com.jetbrains.python.psi.PyTargetExpression;
 import com.jetbrains.python.psi.types.PyModuleType;
 import com.jetbrains.python.psi.types.PyType;
+import com.jetbrains.python.refactoring.PyRefactoringUtil;
+import com.jetbrains.python.testing.pytest.PyTestUtil;
 import org.jetbrains.annotations.Nls;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
+import javax.swing.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
 /**
  * User: ktisha
  *
@@ -41,6 +57,8 @@
  * is access outside the class or a descendant of the class where it's defined.
  */
 public class PyProtectedMemberInspection extends PyInspection {
+  public boolean ignoreTestFunctions = true;
+
   @Nls
   @NotNull
   @Override
@@ -57,7 +75,7 @@
   }
 
 
-  private static class Visitor extends PyInspectionVisitor {
+  private class Visitor extends PyInspectionVisitor {
     public Visitor(@Nullable ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {
       super(holder, session);
     }
@@ -66,16 +84,34 @@
     public void visitPyReferenceExpression(PyReferenceExpression node) {
       final PyExpression qualifier = node.getQualifier();
       if (qualifier == null || PyNames.CANONICAL_SELF.equals(qualifier.getText())) return;
+      if (myTypeEvalContext.getType(qualifier) instanceof PyNamedTupleType) return;
       final String name = node.getName();
+      final List<LocalQuickFix> quickFixes = new ArrayList<LocalQuickFix>();
+      quickFixes.add(new PyRenameElementQuickFix());
+
       if (name != null && name.startsWith("_") && !name.startsWith("__") && !name.endsWith("__")) {
+        final PsiReference reference = node.getReference(getResolveContext());
+        if (reference == null) return;
+        final PsiElement resolvedExpression = reference.resolve();
+        final PyClass resolvedClass = getClassOwner(resolvedExpression);
+        if (resolvedExpression instanceof PyTargetExpression) {
+          final String newName = StringUtil.trimLeading(name, '_');
+          if (resolvedClass != null) {
+            final String qFixName = resolvedClass.getProperties().containsKey(newName) ?
+                              PyBundle.message("QFIX.use.property") : PyBundle.message("QFIX.add.property");
+            quickFixes.add(new PyAddPropertyForFieldQuickFix(qFixName));
+
+            final Collection<String> usedNames = PyRefactoringUtil.collectUsedNames(resolvedClass);
+            if (!usedNames.contains(newName)) {
+              quickFixes.add(new PyMakePublicQuickFix());
+            }
+          }
+        }
+
         final PyClass parentClass = getClassOwner(node);
         if (parentClass != null) {
-          final PsiReference reference = node.getReference(resolveWithoutImplicits());
-          if (reference == null) {
-            return;
-          }
-          final PsiElement resolvedExpression = reference.resolve();
-          final PyClass resolvedClass = getClassOwner(resolvedExpression);
+          if (PyTestUtil.isPyTestClass(parentClass) && ignoreTestFunctions) return;
+          
           if (parentClass.isSubclass(resolvedClass))
             return;
 
@@ -88,15 +124,13 @@
           }
         }
         final PyType type = myTypeEvalContext.getType(qualifier);
-        if (type instanceof PyModuleType)
-          registerProblem(node, PyBundle.message("INSP.protected.member.$0.access.module", name));
-        else
-          registerProblem(node, PyBundle.message("INSP.protected.member.$0.access", name));
+        final String bundleKey = type instanceof PyModuleType ? "INSP.protected.member.$0.access.module" : "INSP.protected.member.$0.access";
+        registerProblem(node, PyBundle.message(bundleKey, name), ProblemHighlightType.GENERIC_ERROR_OR_WARNING,  null, quickFixes.toArray(new LocalQuickFix[quickFixes.size()-1]));
       }
     }
 
     @Nullable
-    private static PyClass getClassOwner(@Nullable PsiElement element) {
+    private PyClass getClassOwner(@Nullable PsiElement element) {
       for (ScopeOwner owner = ScopeUtil.getScopeOwner(element); owner != null; owner = ScopeUtil.getScopeOwner(owner)) {
         if (owner instanceof PyClass) {
           return (PyClass)owner;
@@ -105,4 +139,12 @@
       return null;
     }
   }
+
+  @Nullable
+  @Override
+  public JComponent createOptionsPanel() {
+    MultipleCheckboxOptionsPanel panel = new MultipleCheckboxOptionsPanel(this);
+    panel.addCheckbox("Ignore test functions", "ignoreTestFunctions");
+    return panel;
+  }
 }
diff --git a/python/src/com/jetbrains/python/inspections/PyRaisingNewStyleClassInspection.java b/python/src/com/jetbrains/python/inspections/PyRaisingNewStyleClassInspection.java
index 40adf77..dec714e 100644
--- a/python/src/com/jetbrains/python/inspections/PyRaisingNewStyleClassInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyRaisingNewStyleClassInspection.java
@@ -17,7 +17,6 @@
 
 import com.intellij.codeInspection.LocalInspectionToolSession;
 import com.intellij.codeInspection.ProblemsHolder;
-import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiElementVisitor;
 import com.jetbrains.python.PyBundle;
@@ -52,11 +51,7 @@
 
     @Override
     public void visitPyRaiseStatement(PyRaiseStatement node) {
-      final VirtualFile virtualFile = node.getContainingFile().getVirtualFile();
-      if (virtualFile == null) {
-        return;
-      }
-      if (LanguageLevel.forFile(virtualFile).isAtLeast(LanguageLevel.PYTHON25)) {
+      if (LanguageLevel.forElement(node).isAtLeast(LanguageLevel.PYTHON25)) {
         return;
       }
       final PyExpression[] expressions = node.getExpressions();
@@ -67,7 +62,7 @@
       if (expression instanceof PyCallExpression) {
         final PyExpression callee = ((PyCallExpression)expression).getCallee();
         if (callee instanceof PyReferenceExpression) {
-          final PsiElement psiElement = ((PyReferenceExpression)callee).getReference(resolveWithoutImplicits()).resolve();
+          final PsiElement psiElement = ((PyReferenceExpression)callee).getReference(getResolveContext()).resolve();
           if (psiElement instanceof PyClass) {
             if (((PyClass)psiElement).isNewStyleClass()) {
               registerProblem(expression, "Raising a new style class");
diff --git a/python/src/com/jetbrains/python/inspections/PyRedeclarationInspection.java b/python/src/com/jetbrains/python/inspections/PyRedeclarationInspection.java
index 3b3229c..08a8f41 100644
--- a/python/src/com/jetbrains/python/inspections/PyRedeclarationInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyRedeclarationInspection.java
@@ -33,6 +33,7 @@
 import com.jetbrains.python.codeInsight.controlflow.ReadWriteInstruction;
 import com.jetbrains.python.codeInsight.controlflow.ScopeOwner;
 import com.jetbrains.python.codeInsight.dataflow.scope.ScopeUtil;
+import com.jetbrains.python.inspections.quickfix.PyRenameElementQuickFix;
 import com.jetbrains.python.psi.*;
 import org.jetbrains.annotations.Nls;
 import org.jetbrains.annotations.NotNull;
diff --git a/python/src/com/jetbrains/python/inspections/PyReturnFromInitInspection.java b/python/src/com/jetbrains/python/inspections/PyReturnFromInitInspection.java
index e531875..9ac4413 100644
--- a/python/src/com/jetbrains/python/inspections/PyReturnFromInitInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyReturnFromInitInspection.java
@@ -21,6 +21,7 @@
 import com.intellij.psi.PsiElementVisitor;
 import com.jetbrains.python.PyBundle;
 import com.jetbrains.python.PyNames;
+import com.jetbrains.python.inspections.quickfix.PyRemoveStatementQuickFix;
 import com.jetbrains.python.psi.PyClass;
 import com.jetbrains.python.psi.PyFunction;
 import com.jetbrains.python.psi.PyReturnStatement;
@@ -61,7 +62,7 @@
         Collection<PsiElement> offenders = new ArrayList<PsiElement>();
         findReturnValueInside(function, offenders);
         for (PsiElement offender : offenders) {
-          registerProblem(offender, PyBundle.message("INSP.cant.return.value.from.init"));
+          registerProblem(offender, PyBundle.message("INSP.cant.return.value.from.init"), new PyRemoveStatementQuickFix());
         }
       }
     }
diff --git a/python/src/com/jetbrains/python/inspections/PyShadowingBuiltinsInspection.java b/python/src/com/jetbrains/python/inspections/PyShadowingBuiltinsInspection.java
index fa7a1b9..fa077bf 100644
--- a/python/src/com/jetbrains/python/inspections/PyShadowingBuiltinsInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyShadowingBuiltinsInspection.java
@@ -27,6 +27,7 @@
 import com.intellij.util.Consumer;
 import com.jetbrains.python.codeInsight.controlflow.ScopeOwner;
 import com.jetbrains.python.codeInsight.dataflow.scope.ScopeUtil;
+import com.jetbrains.python.inspections.quickfix.PyRenameElementQuickFix;
 import com.jetbrains.python.psi.*;
 import com.jetbrains.python.psi.impl.PyBuiltinCache;
 import org.jetbrains.annotations.NotNull;
diff --git a/python/src/com/jetbrains/python/inspections/PyShadowingNamesInspection.java b/python/src/com/jetbrains/python/inspections/PyShadowingNamesInspection.java
index 07f92ff..8b6143f 100644
--- a/python/src/com/jetbrains/python/inspections/PyShadowingNamesInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyShadowingNamesInspection.java
@@ -26,6 +26,7 @@
 import com.jetbrains.python.codeInsight.controlflow.ScopeOwner;
 import com.jetbrains.python.codeInsight.dataflow.scope.Scope;
 import com.jetbrains.python.codeInsight.dataflow.scope.ScopeUtil;
+import com.jetbrains.python.inspections.quickfix.PyRenameElementQuickFix;
 import com.jetbrains.python.psi.*;
 import com.jetbrains.python.psi.resolve.PyResolveUtil;
 import com.jetbrains.python.psi.resolve.ResolveProcessor;
diff --git a/python/src/com/jetbrains/python/inspections/PyStatementEffectInspection.java b/python/src/com/jetbrains/python/inspections/PyStatementEffectInspection.java
index a72ec9e..0cc7a4a 100644
--- a/python/src/com/jetbrains/python/inspections/PyStatementEffectInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyStatementEffectInspection.java
@@ -112,14 +112,14 @@
           PyType type = myTypeEvalContext.getType(leftExpression);
           if (type != null &&
               !type.isBuiltin() &&
-              type.resolveMember(method, null, AccessDirection.READ, resolveWithoutImplicits()) != null) {
+              type.resolveMember(method, null, AccessDirection.READ, getResolveContext()) != null) {
             return true;
           }
           if (rightExpression != null) {
             type = myTypeEvalContext.getType(rightExpression);
             if (type != null) {
               String rmethod = "__r" + method.substring(2); // __add__ -> __radd__
-              if (!type.isBuiltin() && type.resolveMember(rmethod, null, AccessDirection.READ, resolveWithoutImplicits()) != null) {
+              if (!type.isBuiltin() && type.resolveMember(rmethod, null, AccessDirection.READ, getResolveContext()) != null) {
                 return true;
               }
             }
@@ -136,7 +136,7 @@
       }
       else if (expression instanceof PyReferenceExpression) {
         PyReferenceExpression referenceExpression = (PyReferenceExpression)expression;
-        ResolveResult[] results = referenceExpression.getReference(resolveWithoutImplicits()).multiResolve(true);
+        ResolveResult[] results = referenceExpression.getReference(getResolveContext()).multiResolve(true);
         for (ResolveResult res : results) {
           if (res.getElement() instanceof PyFunction) {
             registerProblem(expression, "Statement seems to have no effect and can be replaced with function call to have effect", new StatementEffectFunctionCallQuickFix());
diff --git a/python/src/com/jetbrains/python/inspections/PyStringExceptionInspection.java b/python/src/com/jetbrains/python/inspections/PyStringExceptionInspection.java
index aa52440..ca9e656 100644
--- a/python/src/com/jetbrains/python/inspections/PyStringExceptionInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyStringExceptionInspection.java
@@ -19,6 +19,7 @@
 import com.intellij.codeInspection.ProblemsHolder;
 import com.intellij.psi.PsiElementVisitor;
 import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.inspections.quickfix.PyWrapInExceptionQuickFix;
 import com.jetbrains.python.psi.PyExpression;
 import com.jetbrains.python.psi.PyRaiseStatement;
 import com.jetbrains.python.psi.PyStringLiteralExpression;
@@ -56,7 +57,7 @@
       if (expressions.length > 0) {
         PyExpression expression = expressions[0];
         if (expression instanceof PyStringLiteralExpression) {
-          registerProblem(expression, "Raising a string exception");
+          registerProblem(expression, "Raising a string exception", new PyWrapInExceptionQuickFix());
         }
       }
     }
diff --git a/python/src/com/jetbrains/python/inspections/PyStringFormatInspection.java b/python/src/com/jetbrains/python/inspections/PyStringFormatInspection.java
index 280822b..162fa0b 100644
--- a/python/src/com/jetbrains/python/inspections/PyStringFormatInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyStringFormatInspection.java
@@ -17,8 +17,8 @@
 
 import com.google.common.collect.ImmutableMap;
 import com.intellij.codeInspection.LocalInspectionToolSession;
+import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.ProblemsHolder;
-import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiElementVisitor;
 import com.intellij.psi.PsiFile;
@@ -26,6 +26,7 @@
 import com.jetbrains.python.PyBundle;
 import com.jetbrains.python.PyNames;
 import com.jetbrains.python.PyTokenTypes;
+import com.jetbrains.python.inspections.quickfix.PyAddSpecifierToFormatQuickFix;
 import com.jetbrains.python.psi.*;
 import com.jetbrains.python.psi.impl.PyBuiltinCache;
 import com.jetbrains.python.psi.resolve.PyResolveContext;
@@ -45,7 +46,6 @@
  * @author Alexey.Ivanov
  */
 public class PyStringFormatInspection extends PyInspection {
-  private static final Logger LOG = Logger.getInstance("#com.jetbrains.python.inspections.PyStringFormatInspection");
 
   @Nls
   @NotNull
@@ -110,7 +110,10 @@
             PyParenthesizedExpression parenthesizedExpression = (PyParenthesizedExpression)binaryExpression.getLeftExpression();
             if (parenthesizedExpression.getContainedExpression() instanceof PyTupleExpression) {
               PyExpression[] tupleElements = ((PyTupleExpression)parenthesizedExpression.getContainedExpression()).getElements();
-              return ((PyNumericLiteralExpression)((PyBinaryExpression)rightExpression).getRightExpression()).getBigIntegerValue().intValue() * tupleElements.length;
+              final PyExpression expression = ((PyBinaryExpression)rightExpression).getRightExpression();
+              if (expression != null) {
+                return ((PyNumericLiteralExpression)expression).getBigIntegerValue().intValue() * tupleElements.length;
+              }
             }
           }
         }
@@ -150,11 +153,8 @@
         else if (rightExpression instanceof PyCallExpression) {
           final Callable callable = ((PyCallExpression)rightExpression).resolveCalleeFunction(resolveContext);
           // TODO: Switch to Callable.getCallType()
-          if (callable instanceof PyFunction && myTypeEvalContext.maySwitchToAST((PyFunction) callable)) {
+          if (callable instanceof PyFunction && myTypeEvalContext.maySwitchToAST(callable)) {
             PyStatementList statementList = ((PyFunction)callable).getStatementList();
-            if (statementList == null) {
-              return -1;
-            }
             PyReturnStatement[] returnStatements = PyUtil.getAllChildrenOfType(statementList, PyReturnStatement.class);
             int expressionsSize = -1;
             for (PyReturnStatement returnStatement : returnStatements) {
@@ -272,7 +272,7 @@
           additionalExpressions = new HashMap<PyExpression,PyExpression>();
           pyElement = rightExpression;
         }
-
+        if (pyElement == null) return 0;
         final PyKeyValueExpression[] expressions = ((PyDictLiteralExpression)pyElement).getElements();
         if (myUsedMappingKeys.isEmpty()) {
           if (myExpectedArguments > 0) {
@@ -325,6 +325,11 @@
         return (expressions.length + additionalExpressions.size());
       }
 
+      private void registerProblem(@NotNull PsiElement problemTarget, @NotNull final String message, @NotNull LocalQuickFix quickFix) {
+        myProblemRegister = true;
+        myVisitor.registerProblem(problemTarget, message, quickFix);
+      }
+
       private void registerProblem(@NotNull PsiElement problemTarget, @NotNull final String message) {
         myProblemRegister = true;
         myVisitor.registerProblem(problemTarget, message);
@@ -385,7 +390,8 @@
             myFormatSpec.put(mappingKey, FORMAT_CONVERSIONS.get(chunk.getConversionType()));
             continue;
           }
-          registerProblem(formatExpression, PyBundle.message("INSP.no.format.specifier.char"));
+          registerProblem(formatExpression, PyBundle.message("INSP.no.format.specifier.char"), new PyAddSpecifierToFormatQuickFix());
+          return;
         }
       }
 
diff --git a/python/src/com/jetbrains/python/inspections/PyStringFormatParser.java b/python/src/com/jetbrains/python/inspections/PyStringFormatParser.java
index 158206c..9d6a9e8 100644
--- a/python/src/com/jetbrains/python/inspections/PyStringFormatParser.java
+++ b/python/src/com/jetbrains/python/inspections/PyStringFormatParser.java
@@ -181,10 +181,7 @@
       final String group = matcher.group();
       final int start = matcher.start();
       final int end = matcher.end();
-      if ("{{".equals(group)) {
-        results.add(new ConstantChunk(start, end));
-      }
-      else if ("}}".equals(group)) {
+      if ("{{".equals(group) || "}}".equals(group)) {
         results.add(new ConstantChunk(start, end));
       }
       else if (group.startsWith("{") && group.endsWith("}")) {
@@ -303,6 +300,7 @@
     return results;
   }
 
+  @SuppressWarnings("UnusedDeclaration")
   @NotNull
   public static List<SubstitutionChunk> getPositionalSubstitutions(@NotNull List<SubstitutionChunk> substitutions) {
     final ArrayList<SubstitutionChunk> result = new ArrayList<SubstitutionChunk>();
@@ -314,6 +312,7 @@
     return result;
   }
 
+  @SuppressWarnings("UnusedDeclaration")
   @NotNull
   public static Map<String, SubstitutionChunk> getKeywordSubstitutions(@NotNull List<SubstitutionChunk> substitutions) {
     final Map<String, SubstitutionChunk> result = new HashMap<String, SubstitutionChunk>();
diff --git a/python/src/com/jetbrains/python/inspections/PySuperArgumentsInspection.java b/python/src/com/jetbrains/python/inspections/PySuperArgumentsInspection.java
index b476507..c5dbb79 100644
--- a/python/src/com/jetbrains/python/inspections/PySuperArgumentsInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PySuperArgumentsInspection.java
@@ -81,7 +81,7 @@
 
     @Nullable
     private PyClass findClassOf(PyExpression argument) {
-      PsiElement firstElement = ((PyReferenceExpression)argument).followAssignmentsChain(resolveWithoutImplicits()).getElement();
+      PsiElement firstElement = ((PyReferenceExpression)argument).followAssignmentsChain(getResolveContext()).getElement();
       PyClass firstClass = null;
       if (firstElement instanceof PyClass) firstClass = (PyClass)firstElement;
       else if (firstElement instanceof PyExpression) {
diff --git a/python/src/com/jetbrains/python/inspections/PyTupleAssignmentBalanceInspection.java b/python/src/com/jetbrains/python/inspections/PyTupleAssignmentBalanceInspection.java
index fab0efb..18e2409 100644
--- a/python/src/com/jetbrains/python/inspections/PyTupleAssignmentBalanceInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyTupleAssignmentBalanceInspection.java
@@ -17,7 +17,6 @@
 
 import com.intellij.codeInspection.LocalInspectionToolSession;
 import com.intellij.codeInspection.ProblemsHolder;
-import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElementVisitor;
 import com.jetbrains.python.PyBundle;
 import com.jetbrains.python.psi.*;
@@ -67,8 +66,7 @@
         PyExpression[] elements = ((PyTupleExpression) lhsExpression).getElements();
 
         boolean containsStarExpression = false;
-        VirtualFile virtualFile = node.getContainingFile().getVirtualFile();
-        if (virtualFile != null && LanguageLevel.forFile(virtualFile).isPy3K()) {
+        if (LanguageLevel.forElement(node).isPy3K()) {
           for (PyExpression target: elements) {
             if (target instanceof PyStarExpression) {
               if (containsStarExpression) {
diff --git a/python/src/com/jetbrains/python/inspections/PyTupleItemAssignmentInspection.java b/python/src/com/jetbrains/python/inspections/PyTupleItemAssignmentInspection.java
index 2567833..79613f0 100644
--- a/python/src/com/jetbrains/python/inspections/PyTupleItemAssignmentInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyTupleItemAssignmentInspection.java
@@ -20,6 +20,7 @@
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiElementVisitor;
 import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.inspections.quickfix.PyReplaceTupleWithListQuickFix;
 import com.jetbrains.python.psi.PyAssignmentStatement;
 import com.jetbrains.python.psi.PyExpression;
 import com.jetbrains.python.psi.PyReferenceExpression;
@@ -59,12 +60,12 @@
         PySubscriptionExpression subscriptionExpression = (PySubscriptionExpression)targets[0];
         if (subscriptionExpression.getOperand() instanceof PyReferenceExpression) {
           PyReferenceExpression referenceExpression = (PyReferenceExpression)subscriptionExpression.getOperand();
-          PsiElement element = referenceExpression.followAssignmentsChain(resolveWithoutImplicits()).getElement();
+          PsiElement element = referenceExpression.followAssignmentsChain(getResolveContext()).getElement();
           if (element instanceof PyExpression) {
             PyExpression expression = (PyExpression)element;
             PyType type = myTypeEvalContext.getType(expression);
             if (type instanceof PyTupleType) {
-              registerProblem(node, PyBundle.message("INSP.tuples.never.assign.items")); 
+              registerProblem(node, PyBundle.message("INSP.tuples.never.assign.items"), new PyReplaceTupleWithListQuickFix());
             }
           }
         }
diff --git a/python/src/com/jetbrains/python/inspections/PyUnboundLocalVariableInspection.java b/python/src/com/jetbrains/python/inspections/PyUnboundLocalVariableInspection.java
index 9e0031a..a3411f3 100644
--- a/python/src/com/jetbrains/python/inspections/PyUnboundLocalVariableInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyUnboundLocalVariableInspection.java
@@ -127,7 +127,7 @@
         if (!isFirstUnboundRead(node, owner)) {
           return;
         }
-        final PsiPolyVariantReference ref = node.getReference(resolveWithoutImplicits());
+        final PsiPolyVariantReference ref = node.getReference(getResolveContext());
         if (ref == null) {
           return;
         }
diff --git a/python/src/com/jetbrains/python/inspections/PyUnresolvedReferencesInspection.java b/python/src/com/jetbrains/python/inspections/PyUnresolvedReferencesInspection.java
index 2e33a1f..eee1e9c 100644
--- a/python/src/com/jetbrains/python/inspections/PyUnresolvedReferencesInspection.java
+++ b/python/src/com/jetbrains/python/inspections/PyUnresolvedReferencesInspection.java
@@ -421,13 +421,13 @@
       String description = null;
       final String text = reference.getElement().getText();
       TextRange rangeInElement = reference.getRangeInElement();
-      String ref_text = text;  // text of the part we're working with
+      String refText = text;  // text of the part we're working with
       if (rangeInElement.getStartOffset() > 0 && rangeInElement.getEndOffset() > 0) {
-        ref_text = rangeInElement.substring(text);
+        refText = rangeInElement.substring(text);
       }
       final PsiElement element = reference.getElement();
       final List<LocalQuickFix> actions = new ArrayList<LocalQuickFix>(2);
-      final String refName = (element instanceof PyQualifiedExpression) ? ((PyQualifiedExpression)element).getReferencedName() : ref_text;
+      final String refName = (element instanceof PyQualifiedExpression) ? ((PyQualifiedExpression)element).getReferencedName() : refText;
       // Empty text, nothing to highlight
       if (refName == null || refName.length() <= 0) {
         return;
@@ -471,7 +471,7 @@
               actions.add(new UnresolvedRefAddFutureImportQuickFix());
             }
           }
-          if (ref_text.equals("true") || ref_text.equals("false")) {
+          if (refText.equals("true") || refText.equals("false")) {
             actions.add(new UnresolvedRefTrueFalseQuickFix(element));
           }
           addAddSelfFix(node, expr, actions);
@@ -498,7 +498,7 @@
           ) != null
         )) {
           severity = HighlightSeverity.WEAK_WARNING;
-          description = PyBundle.message("INSP.module.$0.not.found", ref_text);
+          description = PyBundle.message("INSP.module.$0.not.found", refText);
           // TODO: mark the node so that future references pointing to it won't result in a error, but in a warning
         }
       }
@@ -506,11 +506,11 @@
         description = ((PsiReferenceEx)reference).getUnresolvedDescription();
       }
       if (description == null) {
-        boolean marked_qualified = false;
+        boolean markedQualified = false;
         if (element instanceof PyQualifiedExpression) {
           // TODO: Add __qualname__ for Python 3.3 to the skeleton of <class 'object'>, introduce a pseudo-class skeleton for
           // <class 'function'>
-          if ("__qualname__".equals(ref_text) && LanguageLevel.forElement(element).isAtLeast(LanguageLevel.PYTHON33)) {
+          if ("__qualname__".equals(refText) && LanguageLevel.forElement(element).isAtLeast(LanguageLevel.PYTHON33)) {
             return;
           }
           final PyQualifiedExpression expr = (PyQualifiedExpression)element;
@@ -524,7 +524,7 @@
               if (ignoreUnresolvedMemberForType(type, reference, refName)) {
                 return;
               }
-              addCreateMemberFromUsageFixes(type, reference, ref_text, actions);
+              addCreateMemberFromUsageFixes(type, reference, refText, actions);
               if (type instanceof PyClassTypeImpl) {
                 if (reference instanceof PyOperatorReference) {
                   description = PyBundle.message("INSP.unresolved.operator.ref",
@@ -532,26 +532,26 @@
                                                  ((PyOperatorReference)reference).getReadableOperatorName());
                 }
                 else {
-                  description = PyBundle.message("INSP.unresolved.ref.$0.for.class.$1", ref_text, type.getName());
+                  description = PyBundle.message("INSP.unresolved.ref.$0.for.class.$1", refText, type.getName());
                 }
-                marked_qualified = true;
+                markedQualified = true;
               }
               else {
-                description = PyBundle.message("INSP.cannot.find.$0.in.$1", ref_text, type.getName());
-                marked_qualified = true;
+                description = PyBundle.message("INSP.cannot.find.$0.in.$1", refText, type.getName());
+                markedQualified = true;
               }
             }
           }
         }
-        if (!marked_qualified) {
-          description = PyBundle.message("INSP.unresolved.ref.$0", ref_text);
+        if (!markedQualified) {
+          description = PyBundle.message("INSP.unresolved.ref.$0", refText);
 
           // look in other imported modules for this whole name
           if (PythonReferenceImporter.isImportable(element)) {
             addAutoImportFix(node, reference, actions);
           }
 
-          addCreateClassFix(ref_text, element, actions);
+          addCreateClassFix(refText, element, actions);
         }
       }
       ProblemHighlightType hl_type;
@@ -751,16 +751,16 @@
         PyClass cls = ((PyClassType)type).getPyClass();
         if (!PyBuiltinCache.getInstance(element).isBuiltin(cls)) {
           if (element.getParent() instanceof PyCallExpression) {
-            actions.add(new AddMethodQuickFix(refText, (PyClassType)type, true));
+            actions.add(new AddMethodQuickFix(refText, cls.getName(), true));
           }
           else if (!(reference instanceof PyOperatorReference)) {
-            actions.add(new AddFieldQuickFix(refText, (PyClassType)type, "None"));
+            actions.add(new AddFieldQuickFix(refText, "None", type.getName()));
           }
         }
       }
       else if (type instanceof PyModuleType) {
         PyFile file = ((PyModuleType)type).getModule();
-        actions.add(new AddFunctionQuickFix(refText, file));
+        actions.add(new AddFunctionQuickFix(refText, file.getName()));
       }
     }
 
diff --git a/python/src/com/jetbrains/python/inspections/PyUnusedLocalInspectionVisitor.java b/python/src/com/jetbrains/python/inspections/PyUnusedLocalInspectionVisitor.java
index 3dc4205..756ae14 100644
--- a/python/src/com/jetbrains/python/inspections/PyUnusedLocalInspectionVisitor.java
+++ b/python/src/com/jetbrains/python/inspections/PyUnusedLocalInspectionVisitor.java
@@ -42,7 +42,6 @@
 import com.jetbrains.python.psi.resolve.PyResolveContext;
 import com.jetbrains.python.psi.search.PyOverridingMethodsSearch;
 import com.jetbrains.python.psi.search.PySuperMethodsSearch;
-import com.jetbrains.python.psi.types.PyClassTypeImpl;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.*;
@@ -297,7 +296,7 @@
             }
           }
           final LocalQuickFix[] fixes = mayBeField
-                                  ? new LocalQuickFix[] { new AddFieldQuickFix(name, new PyClassTypeImpl(containingClass, false), name) }
+                                  ? new LocalQuickFix[] { new AddFieldQuickFix(name, name, containingClass.getName()) }
                                   : LocalQuickFix.EMPTY_ARRAY;
           registerWarning(element, PyBundle.message("INSP.unused.locals.parameter.isnot.used", name), fixes);
         }
@@ -416,9 +415,6 @@
 
   private static boolean isEmptyFunction(@NotNull PyFunction f) {
     final PyStatementList statementList = f.getStatementList();
-    if (statementList == null) {
-      return true;
-    }
     final PyStatement[] statements = statementList.getStatements();
     if (statements.length == 0) {
       return true;
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/AddCallSuperQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/AddCallSuperQuickFix.java
index 2306a47..27134f1 100644
--- a/python/src/com/jetbrains/python/inspections/quickfix/AddCallSuperQuickFix.java
+++ b/python/src/com/jetbrains/python/inspections/quickfix/AddCallSuperQuickFix.java
@@ -38,13 +38,6 @@
  * User: catherine
  */
 public class AddCallSuperQuickFix implements LocalQuickFix {
-  private final PyClass mySuper;
-  private String mySuperName;
-
-  public AddCallSuperQuickFix(PyClass superClass, String superName) {
-    mySuper = superClass;
-    mySuperName = superName;
-  }
 
   @NotNull
   public String getName() {
@@ -60,12 +53,17 @@
   public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
     PyFunction problemFunction = PsiTreeUtil.getParentOfType(descriptor.getPsiElement(), PyFunction.class);
     if (problemFunction == null) return;
-    PyFunction superInit = mySuper.findMethodByName(PyNames.INIT, true);
+    final StringBuilder superCall = new StringBuilder();
+    final PyClass klass = problemFunction.getContainingClass();
+    if (klass == null) return;
+    final PyClass[] superClasses = klass.getSuperClasses();
+    if (superClasses.length == 0) return;
+
+    final PyClass superClass = superClasses[0];
+    final PyFunction superInit = superClass.findMethodByName(PyNames.INIT, true);
     if (superInit == null) return;
-    StringBuilder superCall = new StringBuilder();
-    PyClass klass = problemFunction.getContainingClass();
     boolean addComma = true;
-    if (klass != null && klass.isNewStyleClass()) {
+    if (klass.isNewStyleClass()) {
       addComma = false;
       if (LanguageLevel.forElement(klass).isPy3K())
         superCall.append("super().__init__(");
@@ -73,7 +71,7 @@
         superCall.append("super(").append(klass.getName()).append(", self).__init__(");
     }
     else {
-      superCall.append(mySuperName);
+      superCall.append(superClass.getName());
       superCall.append(".__init__(self");
     }
     StringBuilder newFunction = new StringBuilder("def __init__(self");
@@ -83,7 +81,7 @@
     superCall.append(")");
     final PyStatementList statementList = problemFunction.getStatementList();
     PyExpression docstring = null;
-    final PyStatement[] statements = statementList == null ? new PyStatement[0] : statementList.getStatements();
+    final PyStatement[] statements = statementList.getStatements();
     if (statements.length != 0 && statements[0] instanceof PyExpressionStatement) {
       PyExpressionStatement st = (PyExpressionStatement)statements[0];
       if (st.getExpression() instanceof PyStringLiteralExpression)
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/AddFieldQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/AddFieldQuickFix.java
index 89de355..c0de485 100644
--- a/python/src/com/jetbrains/python/inspections/quickfix/AddFieldQuickFix.java
+++ b/python/src/com/jetbrains/python/inspections/quickfix/AddFieldQuickFix.java
@@ -21,9 +21,15 @@
 import com.intellij.codeInsight.template.TemplateBuilderFactory;
 import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.editor.Editor;
+import com.intellij.openapi.fileEditor.FileEditorManager;
+import com.intellij.openapi.fileEditor.OpenFileDescriptor;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.ui.MessageType;
+import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiFile;
+import com.intellij.psi.util.PsiTreeUtil;
 import com.intellij.util.Function;
 import com.jetbrains.python.PyBundle;
 import com.jetbrains.python.PyNames;
@@ -31,6 +37,9 @@
 import com.jetbrains.python.psi.impl.PyBuiltinCache;
 import com.jetbrains.python.psi.impl.PyPsiUtils;
 import com.jetbrains.python.psi.types.PyClassType;
+import com.jetbrains.python.psi.types.PyClassTypeImpl;
+import com.jetbrains.python.psi.types.PyType;
+import com.jetbrains.python.psi.types.TypeEvalContext;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -43,19 +52,19 @@
  */
 public class AddFieldQuickFix implements LocalQuickFix {
 
-  private PyClassType myQualifierType;
   private final String myInitializer;
+  private final String myClassName;
   private String myIdentifier;
 
-  public AddFieldQuickFix(String identifier, PyClassType qualifierType, String initializer) {
+  public AddFieldQuickFix(@NotNull final String identifier, @NotNull final String initializer, final String className) {
     myIdentifier = identifier;
-    myQualifierType = qualifierType;
     myInitializer = initializer;
+    myClassName = className;
   }
 
   @NotNull
   public String getName() {
-    return PyBundle.message("QFIX.NAME.add.field.$0.to.class.$1", myIdentifier, myQualifierType.getName());
+    return PyBundle.message("QFIX.NAME.add.field.$0.to.class.$1", myIdentifier, myClassName);
   }
 
   @NotNull
@@ -67,7 +76,6 @@
   public static PsiElement appendToMethod(PyFunction init, Function<String, PyStatement> callback) {
     // add this field as the last stmt of the constructor
     final PyStatementList statementList = init.getStatementList();
-    assert statementList != null;
     // name of 'self' may be different for fancier styles
     PyParameter[] params = init.getParameterList().getParameters();
     String selfName = PyNames.CANONICAL_SELF;
@@ -83,9 +91,12 @@
 
   public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
     // expect the descriptor to point to the unresolved identifier.
-    PyClass cls = myQualifierType.getPyClass();
+    final PsiElement element = descriptor.getPsiElement();
+    final PyClassType type = getClassType(element);
+    if (type == null) return;
+    final PyClass cls = type.getPyClass();
     PsiElement initStatement;
-    if (!myQualifierType.isDefinition()) {
+    if (!type.isDefinition()) {
       initStatement = addFieldToInit(project, cls, myIdentifier, new CreateFieldCallback(project, myIdentifier, myInitializer));
     }
     else {
@@ -94,21 +105,37 @@
       initStatement = PyUtil.addElementToStatementList(field, cls.getStatementList(), true);
     }
     if (initStatement != null) {
-      showTemplateBuilder(initStatement);
+      showTemplateBuilder(initStatement, cls.getContainingFile());
       return;
     }
     // somehow we failed. tell about this
     PyUtil.showBalloon(project, PyBundle.message("QFIX.failed.to.add.field"), MessageType.ERROR);
   }
 
-  private void showTemplateBuilder(PsiElement initStatement) {
+  private static PyClassType getClassType(@NotNull final PsiElement element) {
+    if (element instanceof PyQualifiedExpression) {
+      final PyExpression qualifier = ((PyQualifiedExpression)element).getQualifier();
+      if (qualifier == null) return null;
+      final PyType type = TypeEvalContext.userInitiated(element.getContainingFile()).getType(qualifier);
+      return type instanceof PyClassType ? (PyClassType)type : null;
+    }
+    final PyClass aClass = PsiTreeUtil.getParentOfType(element, PyClass.class);
+    return aClass != null ? new PyClassTypeImpl(aClass, false) : null;
+  }
+
+  private void showTemplateBuilder(PsiElement initStatement, @NotNull final PsiFile file) {
     initStatement = CodeInsightUtilCore.forcePsiPostprocessAndRestoreElement(initStatement);
     if (initStatement instanceof PyAssignmentStatement) {
       final TemplateBuilder builder = TemplateBuilderFactory.getInstance().createTemplateBuilder(initStatement);
       final PyExpression assignedValue = ((PyAssignmentStatement)initStatement).getAssignedValue();
       if (assignedValue != null) {
         builder.replaceElement(assignedValue, myInitializer);
-        builder.run();
+        final VirtualFile virtualFile = file.getVirtualFile();
+        if (virtualFile == null) return;
+        final Editor editor = FileEditorManager.getInstance(file.getProject()).openTextEditor(
+                  new OpenFileDescriptor(file.getProject(), virtualFile), true);
+        if (editor == null) return;
+        builder.run(editor, false);
       }
     }
   }
@@ -140,9 +167,8 @@
 
         PyUtil.showBalloon(project, PyBundle.message("QFIX.added.constructor.$0.for.field.$1", cls.getName(), itemName), MessageType.INFO);
         final PyStatementList statementList = newInit.getStatementList();
-        assert statementList != null;
-        return statementList.getStatements()[0];
-        //else  // well, that can't be
+        final PyStatement[] statements = statementList.getStatements();
+        return statements.length != 0 ? statements[0] : null;
       }
     }
     return null;
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/AddFunctionQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/AddFunctionQuickFix.java
index 4d71b42..69106cc 100644
--- a/python/src/com/jetbrains/python/inspections/quickfix/AddFunctionQuickFix.java
+++ b/python/src/com/jetbrains/python/inspections/quickfix/AddFunctionQuickFix.java
@@ -21,16 +21,24 @@
 import com.intellij.codeInsight.template.TemplateBuilderFactory;
 import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.editor.Editor;
 import com.intellij.openapi.extensions.Extensions;
+import com.intellij.openapi.fileEditor.FileEditorManager;
+import com.intellij.openapi.fileEditor.OpenFileDescriptor;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.ui.MessageType;
+import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiFile;
 import com.intellij.util.IncorrectOperationException;
 import com.jetbrains.python.PyBundle;
 import com.jetbrains.python.inspections.PyInspectionExtension;
 import com.jetbrains.python.psi.*;
 import com.jetbrains.python.psi.impl.ParamHelper;
 import com.jetbrains.python.psi.impl.PyFunctionBuilder;
+import com.jetbrains.python.psi.types.PyModuleType;
+import com.jetbrains.python.psi.types.PyType;
+import com.jetbrains.python.psi.types.TypeEvalContext;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.List;
@@ -47,16 +55,16 @@
 public class AddFunctionQuickFix  implements LocalQuickFix {
 
   private final String myIdentifier;
-  private PyFile myPyFile;
+  private final String myModuleName;
 
-  public AddFunctionQuickFix(@NotNull String identifier, PyFile module) {
+  public AddFunctionQuickFix(@NotNull String identifier, String moduleName) {
     myIdentifier = identifier;
-    myPyFile = module;
+    myModuleName = moduleName;
   }
 
   @NotNull
   public String getName() {
-    return PyBundle.message("QFIX.NAME.add.function.$0.to.module.$1", myIdentifier, myPyFile.getName());
+    return PyBundle.message("QFIX.NAME.add.function.$0.to.module.$1", myIdentifier, myModuleName);
   }
 
   @NotNull
@@ -66,16 +74,22 @@
 
   public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
     try {
-      final PsiElement problem_elt = descriptor.getPsiElement();
-      sure(myPyFile);
-      sure(FileModificationService.getInstance().preparePsiElementForWrite(myPyFile));
+      final PsiElement problemElement = descriptor.getPsiElement();
+      if (!(problemElement instanceof PyQualifiedExpression)) return;
+      final PyExpression qualifier = ((PyQualifiedExpression)problemElement).getQualifier();
+      if (qualifier == null) return;
+      final PyType type = TypeEvalContext.userInitiated(problemElement.getContainingFile()).getType(qualifier);
+      if (!(type instanceof PyModuleType)) return;
+      final PyFile file = ((PyModuleType)type).getModule();
+      sure(file);
+      sure(FileModificationService.getInstance().preparePsiElementForWrite(file));
       // try to at least match parameter count
       // TODO: get parameter style from code style
       PyFunctionBuilder builder = new PyFunctionBuilder(myIdentifier);
-      PsiElement problemParent = problem_elt.getParent();
+      PsiElement problemParent = problemElement.getParent();
       if (problemParent instanceof PyCallExpression) {
         PyArgumentList arglist = ((PyCallExpression)problemParent).getArgumentList();
-        sure(arglist);
+        if (arglist == null) return;
         final PyExpression[] args = arglist.getArguments();
         for (PyExpression arg : args) {
           if (arg instanceof PyKeywordArgument) { // foo(bar) -> def foo(bar_1)
@@ -92,7 +106,7 @@
       }
       else if (problemParent != null) {
         for (PyInspectionExtension extension : Extensions.getExtensions(PyInspectionExtension.EP_NAME)) {
-          List<String> params = extension.getFunctionParametersFromUsage(problem_elt);
+          List<String> params = extension.getFunctionParametersFromUsage(problemElement);
           if (params != null) {
             for (String param : params) {
               builder.parameter(param);
@@ -102,11 +116,11 @@
         }
       }
       // else: no arglist, use empty args
-      PyFunction function = builder.buildFunction(project, LanguageLevel.forFile(myPyFile.getVirtualFile()));
+      PyFunction function = builder.buildFunction(project, LanguageLevel.forElement(file));
 
       // add to the bottom
-      function = (PyFunction) myPyFile.add(function);
-      showTemplateBuilder(function);
+      function = (PyFunction) file.add(function);
+      showTemplateBuilder(function, file);
     }
     catch (IncorrectOperationException ignored) {
       // we failed. tell about this
@@ -114,7 +128,7 @@
     }
   }
 
-  private static void showTemplateBuilder(PyFunction method) {
+  private static void showTemplateBuilder(PyFunction method, @NotNull final PsiFile file) {
     method = CodeInsightUtilCore.forcePsiPostprocessAndRestoreElement(method);
 
     final TemplateBuilder builder = TemplateBuilderFactory.getInstance().createTemplateBuilder(method);
@@ -129,7 +143,11 @@
 
     // TODO: detect expected return type from call site context: PY-1863
     builder.replaceElement(method.getStatementList(), "return None");
-
-    builder.run();
+    final VirtualFile virtualFile = file.getVirtualFile();
+    if (virtualFile == null) return;
+    final Editor editor = FileEditorManager.getInstance(file.getProject()).openTextEditor(
+      new OpenFileDescriptor(file.getProject(), virtualFile), true);
+    if (editor == null) return;
+    builder.run(editor, false);
   }
 }
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/AddGlobalQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/AddGlobalQuickFix.java
index 9bf3df0..349a911 100644
--- a/python/src/com/jetbrains/python/inspections/quickfix/AddGlobalQuickFix.java
+++ b/python/src/com/jetbrains/python/inspections/quickfix/AddGlobalQuickFix.java
@@ -80,7 +80,6 @@
         statementList = ((PyFunction)owner).getStatementList();
         if (((PyFunction)owner).getDocStringExpression() != null) hasDocString = true;
       }
-      assert statementList != null;
       PyStatement first = statementList.getStatements()[0];
       if (hasDocString)
         first = statementList.getStatements()[1];
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/AddIgnoredIdentifierQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/AddIgnoredIdentifierQuickFix.java
index 8ce476b..23e0b2e 100644
--- a/python/src/com/jetbrains/python/inspections/quickfix/AddIgnoredIdentifierQuickFix.java
+++ b/python/src/com/jetbrains/python/inspections/quickfix/AddIgnoredIdentifierQuickFix.java
@@ -59,7 +59,7 @@
   @Override
   public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
     final PsiElement context = descriptor.getPsiElement();
-    InspectionProfile profile = InspectionProjectProfileManager.getInstance(project).getInspectionProfile(context);
+    InspectionProfile profile = InspectionProjectProfileManager.getInstance(project).getInspectionProfile();
     profile.modifyProfile(new Consumer<ModifiableModel>() {
       @Override
       public void consume(ModifiableModel model) {
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/AddMethodQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/AddMethodQuickFix.java
index 30d9910..a138555 100644
--- a/python/src/com/jetbrains/python/inspections/quickfix/AddMethodQuickFix.java
+++ b/python/src/com/jetbrains/python/inspections/quickfix/AddMethodQuickFix.java
@@ -21,9 +21,15 @@
 import com.intellij.codeInsight.template.TemplateBuilderFactory;
 import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.editor.Editor;
+import com.intellij.openapi.fileEditor.FileEditorManager;
+import com.intellij.openapi.fileEditor.OpenFileDescriptor;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.ui.MessageType;
+import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiFile;
+import com.intellij.psi.util.PsiTreeUtil;
 import com.intellij.util.IncorrectOperationException;
 import com.jetbrains.python.PyBundle;
 import com.jetbrains.python.PyNames;
@@ -31,6 +37,7 @@
 import com.jetbrains.python.psi.impl.ParamHelper;
 import com.jetbrains.python.psi.impl.PyFunctionBuilder;
 import com.jetbrains.python.psi.types.PyClassType;
+import com.jetbrains.python.psi.types.PyClassTypeImpl;
 import com.jetbrains.python.psi.types.PyType;
 import com.jetbrains.python.psi.types.TypeEvalContext;
 import org.jetbrains.annotations.NotNull;
@@ -44,20 +51,20 @@
  */
 public class AddMethodQuickFix implements LocalQuickFix {
 
-  private PyClassType myQualifierType;
+  private final String myClassName;
   private final boolean myReplaceUsage;
   private String myIdentifier;
 
-  public AddMethodQuickFix(String identifier, PyClassType qualifierType,
+  public AddMethodQuickFix(String identifier, String className,
                            boolean replaceUsage) {
     myIdentifier = identifier;
-    myQualifierType = qualifierType;
+    myClassName = className;
     myReplaceUsage = replaceUsage;
   }
 
   @NotNull
   public String getName() {
-    return PyBundle.message("QFIX.NAME.add.method.$0.to.class.$1", myIdentifier, myQualifierType.getName());
+    return PyBundle.message("QFIX.NAME.add.method.$0.to.class.$1", myIdentifier, myClassName);
   }
 
   @NotNull
@@ -68,46 +75,46 @@
   public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
     try {
       // there can be no name clash, else the name would have resolved, and it hasn't.
-      PsiElement problem_elt = descriptor.getPsiElement();
-      PyClass cls = myQualifierType.getPyClass();
-      boolean call_by_class = myQualifierType.isDefinition();
-      String item_name = myIdentifier;
-      sure(item_name);
-      PyStatementList cls_stmt_list = cls.getStatementList();
-      sure(FileModificationService.getInstance().preparePsiElementForWrite(cls_stmt_list));
+      final PsiElement problemElement = descriptor.getPsiElement();
+      final PyClassType type = getClassType(problemElement);
+      if (type == null) return;
+      final PyClass cls = type.getPyClass();
+      boolean callByClass = type.isDefinition();
+      PyStatementList clsStmtList = cls.getStatementList();
+      sure(FileModificationService.getInstance().preparePsiElementForWrite(clsStmtList));
       // try to at least match parameter count
       // TODO: get parameter style from code style
-      PyFunctionBuilder builder = new PyFunctionBuilder(item_name);
-      PsiElement pe = problem_elt.getParent();
-      String deco_name = null; // set to non-null to add a decorator
+      PyFunctionBuilder builder = new PyFunctionBuilder(myIdentifier);
+      PsiElement pe = problemElement.getParent();
+      String decoratorName = null; // set to non-null to add a decorator
       PyExpression[] args = new PyExpression[0];
       if (pe instanceof PyCallExpression) {
         PyArgumentList arglist = ((PyCallExpression)pe).getArgumentList();
-        sure(arglist);
+        if (arglist == null) return;
         args = arglist.getArguments();
       }
-      boolean made_instance = false;
-      if (call_by_class) {
+      boolean madeInstance = false;
+      if (callByClass) {
         if (args.length > 0) {
-          PyType first_arg_type = TypeEvalContext.userInitiated(cls.getContainingFile()).getType(args[0]);
-          if (first_arg_type instanceof PyClassType && ((PyClassType)first_arg_type).getPyClass().isSubclass(cls)) {
+          PyType firstArgType = TypeEvalContext.userInitiated(cls.getContainingFile()).getType(args[0]);
+          if (firstArgType instanceof PyClassType && ((PyClassType)firstArgType).getPyClass().isSubclass(cls)) {
             // class, first arg ok: instance method
             builder.parameter("self"); // NOTE: might use a name other than 'self', according to code style.
-            made_instance = true;
+            madeInstance = true;
           }
         }
-        if (! made_instance) { // class, first arg absent or of different type: classmethod
+        if (!madeInstance) { // class, first arg absent or of different type: classmethod
           builder.parameter("cls"); // NOTE: might use a name other than 'cls', according to code style.
-          deco_name = PyNames.CLASSMETHOD;
+          decoratorName = PyNames.CLASSMETHOD;
         }
       }
       else { // instance method
         builder.parameter("self"); // NOTE: might use a name other than 'self', according to code style.
       }
-      boolean skip_first = call_by_class && made_instance; // ClassFoo.meth(foo_instance)
+      boolean skipFirst = callByClass && madeInstance; // ClassFoo.meth(foo_instance)
       for (PyExpression arg : args) {
-        if (skip_first) {
-          skip_first = false;
+        if (skipFirst) {
+          skipFirst = false;
           continue;
         }
         if (arg instanceof PyKeywordArgument) { // foo(bar) -> def foo(self, bar_1)
@@ -121,16 +128,18 @@
           builder.parameter("param");
         }
       }
-      PyFunction meth = builder.buildFunction(project, LanguageLevel.getDefault());
-      if (deco_name != null) {
+      PyFunction method = builder.buildFunction(project, LanguageLevel.getDefault());
+      if (decoratorName != null) {
         PyElementGenerator generator = PyElementGenerator.getInstance(project);
-        PyDecoratorList deco_list = generator.createFromText(LanguageLevel.getDefault(), PyDecoratorList.class, "@" + deco_name + "\ndef foo(): pass", new int[]{0, 0});
-        meth.addBefore(deco_list, meth.getFirstChild()); // in the very beginning
+        PyDecoratorList decoratorList = generator
+          .createFromText(LanguageLevel.getDefault(), PyDecoratorList.class, "@" + decoratorName + "\ndef foo(): pass", new int[]{0, 0});
+        method.addBefore(decoratorList, method.getFirstChild()); // in the very beginning
       }
 
-      meth = (PyFunction)PyUtil.addElementToStatementList(meth, cls_stmt_list, PyNames.INIT.equals(meth.getName()));
-      if (myReplaceUsage)
-        showTemplateBuilder(meth);
+      method = (PyFunction)PyUtil.addElementToStatementList(method, clsStmtList, PyNames.INIT.equals(method.getName()));
+      if (myReplaceUsage) {
+        showTemplateBuilder(method, problemElement.getContainingFile());
+      }
     }
     catch (IncorrectOperationException ignored) {
       // we failed. tell about this
@@ -138,7 +147,18 @@
     }
   }
 
-  private static void showTemplateBuilder(PyFunction method) {
+  private static PyClassType getClassType(@NotNull final PsiElement problemElement) {
+    if ((problemElement instanceof PyQualifiedExpression)) {
+      final PyExpression qualifier = ((PyQualifiedExpression)problemElement).getQualifier();
+      if (qualifier == null) return null;
+      final PyType type = TypeEvalContext.userInitiated(problemElement.getContainingFile()).getType(qualifier);
+      return type instanceof PyClassType ? (PyClassType)type : null;
+    }
+    final PyClass pyClass = PsiTreeUtil.getParentOfType(problemElement, PyClass.class);
+    return pyClass != null ? new PyClassTypeImpl(pyClass, false) : null;
+  }
+
+  private static void showTemplateBuilder(PyFunction method, PsiFile file) {
     method = CodeInsightUtilCore.forcePsiPostprocessAndRestoreElement(method);
 
     final TemplateBuilder builder = TemplateBuilderFactory.getInstance().createTemplateBuilder(method);
@@ -152,9 +172,13 @@
     );
 
     final PyStatementList statementList = method.getStatementList();
-    if (statementList == null) return;
     builder.replaceElement(statementList, PyNames.PASS);
 
-    builder.run();
+    final VirtualFile virtualFile = file.getVirtualFile();
+    if (virtualFile == null) return;
+    final Editor editor = FileEditorManager.getInstance(file.getProject()).openTextEditor(
+      new OpenFileDescriptor(file.getProject(), virtualFile), true);
+    if (editor == null) return;
+    builder.run(editor, false);
   }
 }
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/AddSelfQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/AddSelfQuickFix.java
index 07b85ac..5e1e5f8 100644
--- a/python/src/com/jetbrains/python/inspections/quickfix/AddSelfQuickFix.java
+++ b/python/src/com/jetbrains/python/inspections/quickfix/AddSelfQuickFix.java
@@ -51,14 +51,14 @@
   }
 
   public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
-    PsiElement problem_elt = descriptor.getPsiElement();
-    if (problem_elt instanceof PyParameterList) {
-      final PyParameterList param_list = (PyParameterList)problem_elt;
-      if (!FileModificationService.getInstance().preparePsiElementForWrite(problem_elt)) {
+    PsiElement element = descriptor.getPsiElement();
+    if (element instanceof PyParameterList) {
+      final PyParameterList parameterList = (PyParameterList)element;
+      if (!FileModificationService.getInstance().preparePsiElementForWrite(element)) {
         return;
       }
-      PyNamedParameter new_param = PyElementGenerator.getInstance(project).createParameter(myParamName);
-      param_list.addParameter(new_param);
+      PyNamedParameter newParameter = PyElementGenerator.getInstance(project).createParameter(myParamName);
+      parameterList.addParameter(newParameter);
     }
   }
 }
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyAddExceptionSuperClassQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyAddExceptionSuperClassQuickFix.java
new file mode 100644
index 0000000..00d1f6d
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyAddExceptionSuperClassQuickFix.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.lang.ASTNode;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiPolyVariantReference;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.psi.*;
+import org.jetbrains.annotations.NotNull;
+
+public class PyAddExceptionSuperClassQuickFix implements LocalQuickFix {
+
+  @NotNull
+  public String getName() {
+    return PyBundle.message("QFIX.NAME.add.exception.base");
+  }
+
+  @NotNull
+  public String getFamilyName() {
+    return getName();
+  }
+
+  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
+    final PsiElement element = descriptor.getPsiElement();
+    if (element instanceof PyCallExpression) {
+      PyExpression callee = ((PyCallExpression)element).getCallee();
+      if (callee instanceof PyReferenceExpression) {
+        final PsiPolyVariantReference reference = ((PyReferenceExpression)callee).getReference();
+        PsiElement psiElement = reference.resolve();
+        if (psiElement instanceof PyClass) {
+          final PyElementGenerator generator = PyElementGenerator.getInstance(project);
+          final PyArgumentList list = ((PyClass)psiElement).getSuperClassExpressionList();
+          if (list != null) {
+            final PyExpression exception =
+              generator.createExpressionFromText(LanguageLevel.forElement(element), "Exception");
+            list.addArgument(exception);
+          }
+          else {
+            final PyArgumentList expressionList = generator.createFromText(
+              LanguageLevel.forElement(element), PyClass.class, "class A(Exception): pass").getSuperClassExpressionList();
+            assert expressionList != null;
+            final ASTNode nameNode = ((PyClass)psiElement).getNameNode();
+            assert nameNode != null;
+            psiElement.addAfter(expressionList, nameNode.getPsi());
+          }
+        }
+      }
+    }
+  }
+
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyAddPropertyForFieldQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyAddPropertyForFieldQuickFix.java
new file mode 100644
index 0000000..ec316d2
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyAddPropertyForFieldQuickFix.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiReference;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.psi.*;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.Map;
+
+public class PyAddPropertyForFieldQuickFix implements LocalQuickFix {
+  private String myName = PyBundle.message("QFIX.add.property");
+
+  public PyAddPropertyForFieldQuickFix(String name) {
+    myName = name;
+  }
+
+  @NotNull
+  public String getName() {
+    return myName;
+  }
+
+  @NonNls
+  @NotNull
+  public String getFamilyName() {
+    return getName();
+  }
+
+  public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
+    final PsiElement element = descriptor.getPsiElement();
+    if (element instanceof PyReferenceExpression) {
+      final PsiReference reference = element.getReference();
+      if (reference == null) return;
+      final PsiElement resolved = reference.resolve();
+      if (resolved instanceof PyTargetExpression) {
+        PyTargetExpression target = (PyTargetExpression)resolved;
+        final PyClass containingClass = target.getContainingClass();
+        if (containingClass != null) {
+          final String name = target.getName();
+          if (name == null) return;
+          String propertyName = StringUtil.trimStart(name, "_");
+          final Map<String,Property> properties = containingClass.getProperties();
+          final PyElementGenerator generator = PyElementGenerator.getInstance(project);
+          if (!properties.containsKey(propertyName)) {
+            final PyFunction property = generator.createProperty(LanguageLevel.forElement(containingClass), propertyName, name, AccessDirection.READ);
+            PyUtil.addElementToStatementList(property, containingClass.getStatementList(), false);
+          }
+          final PyExpression qualifier = ((PyReferenceExpression)element).getQualifier();
+          if (qualifier != null) {
+            String newElementText = qualifier.getText() + "." + propertyName;
+            final PyExpression newElement = generator.createExpressionFromText(LanguageLevel.forElement(containingClass), newElementText);
+            element.replace(newElement);
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyAddSpecifierToFormatQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyAddSpecifierToFormatQuickFix.java
new file mode 100644
index 0000000..6d40f31
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyAddSpecifierToFormatQuickFix.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.editor.Document;
+import com.intellij.openapi.fileEditor.FileDocumentManager;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiFile;
+import com.intellij.psi.util.PsiTreeUtil;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.inspections.PyStringFormatParser;
+import com.jetbrains.python.psi.*;
+import com.jetbrains.python.psi.impl.PyBuiltinCache;
+import com.jetbrains.python.psi.types.PyClassType;
+import com.jetbrains.python.psi.types.PyType;
+import com.jetbrains.python.psi.types.PyTypeChecker;
+import com.jetbrains.python.psi.types.TypeEvalContext;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.List;
+
+import static com.jetbrains.python.inspections.PyStringFormatParser.filterSubstitutions;
+import static com.jetbrains.python.inspections.PyStringFormatParser.parsePercentFormat;
+
+public class PyAddSpecifierToFormatQuickFix implements LocalQuickFix {
+  @NotNull
+  public String getName() {
+    return PyBundle.message("QFIX.NAME.add.specifier");
+  }
+
+  @NonNls
+  @NotNull
+  public String getFamilyName() {
+    return getName();
+  }
+
+  public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
+    final PsiElement element = descriptor.getPsiElement();
+    final PyBinaryExpression expression = PsiTreeUtil.getParentOfType(element, PyBinaryExpression.class);
+    if (expression == null) return;
+    PyExpression rightExpression = expression.getRightExpression();
+    if (rightExpression instanceof PyParenthesizedExpression) {
+      rightExpression = ((PyParenthesizedExpression)rightExpression).getContainedExpression();
+    }
+    if (rightExpression == null) return;
+
+    final PsiFile file = element.getContainingFile();
+    final Document document = FileDocumentManager.getInstance().getDocument(file.getVirtualFile());
+    if (document == null) return;
+    final int offset = element.getTextOffset();
+    final TypeEvalContext context = TypeEvalContext.userInitiated(file);
+
+    final PyClassType strType = PyBuiltinCache.getInstance(element).getStrType();
+    final PyClassType floatType = PyBuiltinCache.getInstance(element).getFloatType();
+    final PyClassType intType = PyBuiltinCache.getInstance(element).getIntType();
+
+    final PyExpression leftExpression = expression.getLeftExpression();
+    if (leftExpression instanceof PyStringLiteralExpression) {
+      final List<PyStringFormatParser.SubstitutionChunk> chunks =
+        filterSubstitutions(parsePercentFormat(((PyStringLiteralExpression)leftExpression).getStringValue()));
+      PyExpression[] elements;
+      if (rightExpression instanceof PyTupleExpression) {
+        elements = ((PyTupleExpression)rightExpression).getElements();
+      }
+      else {
+        elements = new PyExpression[]{rightExpression};
+      }
+
+      int shift = 2;
+      for (int i = 0; i < chunks.size(); i++) {
+        final PyStringFormatParser.SubstitutionChunk chunk = chunks.get(i);
+        if (elements.length <= i) return;
+        final PyType type = context.getType(elements[i]);
+        final char conversionType = chunk.getConversionType();
+        if (conversionType == '\u0000') {
+          final int insertOffset = offset + chunk.getStartIndex() + shift;
+          if (insertOffset > leftExpression.getTextRange().getEndOffset()) return;
+          if (PyTypeChecker.match(strType, type, context)) {
+            document.insertString(insertOffset, "s");
+            shift += 1;
+          }
+          if (PyTypeChecker.match(intType, type, context) || PyTypeChecker.match(floatType, type, context)) {
+            document.insertString(insertOffset, "d");
+            shift += 1;
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyChangeSignatureQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyChangeSignatureQuickFix.java
new file mode 100644
index 0000000..049159c
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyChangeSignatureQuickFix.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.util.PsiTreeUtil;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyNames;
+import com.jetbrains.python.psi.PyClass;
+import com.jetbrains.python.psi.PyFunction;
+import com.jetbrains.python.psi.search.PySuperMethodsSearch;
+import com.jetbrains.python.refactoring.changeSignature.PyChangeSignatureDialog;
+import com.jetbrains.python.refactoring.changeSignature.PyMethodDescriptor;
+import com.jetbrains.python.refactoring.changeSignature.PyParameterInfo;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.List;
+
+public class PyChangeSignatureQuickFix implements LocalQuickFix {
+
+  private final boolean myOverridenMethod;
+
+  public PyChangeSignatureQuickFix(boolean overriddenMethod) {
+    myOverridenMethod = overriddenMethod;
+  }
+
+  @NotNull
+  public String getName() {
+    return PyBundle.message("QFIX.NAME.change.signature");
+  }
+
+  @NonNls
+  @NotNull
+  public String getFamilyName() {
+    return getName();
+  }
+
+  public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
+    final PyFunction function = PsiTreeUtil.getParentOfType(descriptor.getPsiElement(), PyFunction.class);
+    if (function == null) return;
+    final PyClass cls = function.getContainingClass();
+    assert cls != null;
+    final String functionName = function.getName();
+    final String complementaryName = PyNames.NEW.equals(functionName) ? PyNames.INIT : PyNames.NEW;
+    final PyFunction complementaryMethod = myOverridenMethod ? (PyFunction)PySuperMethodsSearch.search(function).findFirst()
+                                                             : cls.findMethodByName(complementaryName, true);
+
+    assert complementaryMethod != null;
+    final PyMethodDescriptor methodDescriptor = new PyMethodDescriptor(function) {
+      @Override
+      public List<PyParameterInfo> getParameters() {
+        final List<PyParameterInfo> parameterInfos = super.getParameters();
+        final int paramLength = function.getParameterList().getParameters().length;
+        final int complementaryParamLength = complementaryMethod.getParameterList().getParameters().length;
+        if (complementaryParamLength > paramLength)
+          parameterInfos.add(new PyParameterInfo(-1, "**kwargs", "", false));
+        return parameterInfos;
+      }
+    };
+    final PyChangeSignatureDialog dialog = new PyChangeSignatureDialog(project, methodDescriptor);
+    dialog.show();
+  }
+
+
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyCreatePropertyQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyCreatePropertyQuickFix.java
new file mode 100644
index 0000000..f88652a
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyCreatePropertyQuickFix.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiElement;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.psi.*;
+import com.jetbrains.python.psi.types.PyClassType;
+import com.jetbrains.python.psi.types.PyType;
+import com.jetbrains.python.psi.types.TypeEvalContext;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+
+public class PyCreatePropertyQuickFix implements LocalQuickFix {
+  private final AccessDirection myAccessDirection;
+
+  public PyCreatePropertyQuickFix(AccessDirection dir) {
+    myAccessDirection = dir;
+  }
+
+  @NotNull
+  public String getName() {
+    return PyBundle.message("QFIX.create.property");
+  }
+
+  @NonNls
+  @NotNull
+  public String getFamilyName() {
+    return getName();
+  }
+
+  public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
+    final PsiElement element = descriptor.getPsiElement();
+    if (element instanceof PyQualifiedExpression) {
+      final PyExpression qualifier = ((PyQualifiedExpression)element).getQualifier();
+      if (qualifier != null) {
+        final PyType type = TypeEvalContext.codeAnalysis(element.getContainingFile()).getType(qualifier);
+        if (type instanceof PyClassType) {
+          final PyClass cls = ((PyClassType)type).getPyClass();
+          final String propertyName = ((PyQualifiedExpression)element).getName();
+          if (propertyName == null) return;
+          final String fieldName = "_" + propertyName;
+          final PyElementGenerator generator = PyElementGenerator.getInstance(project);
+          final PyFunction property = generator.createProperty(LanguageLevel.forElement(cls), propertyName, fieldName, myAccessDirection);
+          PyUtil.addElementToStatementList(property, cls.getStatementList(), myAccessDirection == AccessDirection.READ);
+        }
+      }
+    }
+  }
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyDefaultArgumentQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyDefaultArgumentQuickFix.java
index 1ae1bf4..31723d3 100644
--- a/python/src/com/jetbrains/python/inspections/quickfix/PyDefaultArgumentQuickFix.java
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyDefaultArgumentQuickFix.java
@@ -52,39 +52,38 @@
   @Override
   public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
     PsiElement defaultValue = descriptor.getPsiElement();
-    PsiElement param = PsiTreeUtil.getParentOfType(defaultValue, PyNamedParameter.class);
+    PyNamedParameter param = PsiTreeUtil.getParentOfType(defaultValue, PyNamedParameter.class);
     PyFunction function = PsiTreeUtil.getParentOfType(defaultValue, PyFunction.class);
-    String defName = PsiTreeUtil.getParentOfType(defaultValue, PyNamedParameter.class).getName();
+    assert param != null;
+    String defName = param.getName();
     if (function != null) {
       PyElementGenerator elementGenerator = PyElementGenerator.getInstance(project);
       PyStatementList list = function.getStatementList();
-      if (list != null) {
-        PyParameterList paramList = function.getParameterList();
+      PyParameterList paramList = function.getParameterList();
 
-        StringBuilder str = new StringBuilder("def foo(");
-        int size = paramList.getParameters().length;
-        for (int i = 0; i != size; ++i) {
-          PyParameter p = paramList.getParameters()[i];
-          if (p == param)
-            str.append(defName).append("=None");
-          else
-            str.append(p.getText());
-          if (i != size-1)
-            str.append(", ");
-        }
-        str.append("):\n\tpass");
-        PyIfStatement ifStatement = elementGenerator.createFromText(LanguageLevel.forElement(function), PyIfStatement.class,
-                                                  "if not " + defName + ": " + defName + " = " + defaultValue.getText());
-
-        PyStatement firstStatement = list.getStatements()[0];
-        PyStringLiteralExpression docString = function.getDocStringExpression();
-        if (docString != null)
-          list.addAfter(ifStatement, firstStatement);
+      StringBuilder str = new StringBuilder("def foo(");
+      int size = paramList.getParameters().length;
+      for (int i = 0; i != size; ++i) {
+        PyParameter p = paramList.getParameters()[i];
+        if (p == param)
+          str.append(defName).append("=None");
         else
-          list.addBefore(ifStatement, firstStatement);
-        paramList.replace(elementGenerator.createFromText(LanguageLevel.forElement(defaultValue),
-                                                                   PyFunction.class, str.toString()).getParameterList());
+          str.append(p.getText());
+        if (i != size-1)
+          str.append(", ");
       }
+      str.append("):\n\tpass");
+      PyIfStatement ifStatement = elementGenerator.createFromText(LanguageLevel.forElement(function), PyIfStatement.class,
+                                                "if not " + defName + ": " + defName + " = " + defaultValue.getText());
+
+      PyStatement firstStatement = list.getStatements()[0];
+      PyStringLiteralExpression docString = function.getDocStringExpression();
+      if (docString != null)
+        list.addAfter(ifStatement, firstStatement);
+      else
+        list.addBefore(ifStatement, firstStatement);
+      paramList.replace(elementGenerator.createFromText(LanguageLevel.forElement(defaultValue),
+                                                                 PyFunction.class, str.toString()).getParameterList());
     }
   }
 }
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyMakePublicQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyMakePublicQuickFix.java
new file mode 100644
index 0000000..33ab125
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyMakePublicQuickFix.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiReference;
+import com.intellij.refactoring.rename.RenameProcessor;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.psi.PyReferenceExpression;
+import com.jetbrains.python.psi.PyTargetExpression;
+import org.jetbrains.annotations.NotNull;
+
+public class PyMakePublicQuickFix implements LocalQuickFix {
+  @NotNull
+  @Override
+  public String getName() {
+    return PyBundle.message("QFIX.make.public");
+  }
+
+  @NotNull
+  @Override
+  public String getFamilyName() {
+    return PyBundle.message("QFIX.make.public");
+  }
+
+  @Override
+  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
+    PsiElement element = descriptor.getPsiElement();
+    if (element instanceof PyReferenceExpression) {
+      final PsiReference reference = element.getReference();
+      if (reference == null) return;
+      element = reference.resolve();
+    }
+    if (element instanceof PyTargetExpression) {
+      final String name = ((PyTargetExpression)element).getName();
+      if (name == null) return;
+      final VirtualFile virtualFile = element.getContainingFile().getVirtualFile();
+      if (virtualFile != null) {
+        final String publicName = StringUtil.trimLeading(name, '_');
+        new RenameProcessor(project, element, publicName, false, false).run();
+      }
+    }
+  }
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyMoveExceptQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyMoveExceptQuickFix.java
new file mode 100644
index 0000000..1fa4050
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyMoveExceptQuickFix.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.google.common.collect.Lists;
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.util.PsiTreeUtil;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.psi.*;
+import com.jetbrains.python.psi.resolve.PyResolveContext;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.ArrayList;
+
+public class PyMoveExceptQuickFix implements LocalQuickFix {
+
+  @NotNull
+  public String getName() {
+    return PyBundle.message("QFIX.NAME.move.except.up");
+  }
+
+  @NonNls
+  @NotNull
+  public String getFamilyName() {
+    return getName();
+  }
+
+  public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
+    final PsiElement element = descriptor.getPsiElement();
+    final PyExceptPart part = PsiTreeUtil.getParentOfType(element, PyExceptPart.class);
+    if (part == null) return;
+    final PyExpression exceptClassExpression = part.getExceptClass();
+    if (exceptClassExpression == null) return;
+
+    final PsiElement exceptClass = ((PyReferenceExpression)exceptClassExpression).followAssignmentsChain(PyResolveContext.noImplicits()).getElement();
+    if (exceptClass instanceof PyClass) {
+      final PyTryExceptStatement statement = PsiTreeUtil.getParentOfType(part, PyTryExceptStatement.class);
+      if (statement == null) return;
+
+      PyExceptPart prevExceptPart = PsiTreeUtil.getPrevSiblingOfType(part, PyExceptPart.class);
+      final ArrayList<PyClass> superClasses = Lists.newArrayList(((PyClass)exceptClass).getSuperClasses());
+      while (prevExceptPart != null) {
+        final PyExpression classExpression = prevExceptPart.getExceptClass();
+        if (classExpression == null) return;
+        final PsiElement aClass = ((PyReferenceExpression)classExpression).followAssignmentsChain(PyResolveContext.noImplicits()).getElement();
+        if (aClass instanceof PyClass) {
+          if (superClasses.contains(aClass)) {
+            statement.addBefore(part, prevExceptPart);
+            part.delete();
+            return;
+          }
+        }
+        prevExceptPart = PsiTreeUtil.getPrevSiblingOfType(prevExceptPart, PyExceptPart.class);
+      }
+    }
+  }
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveArgumentQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveArgumentQuickFix.java
new file mode 100644
index 0000000..0ae7ac1
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveArgumentQuickFix.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiWhiteSpace;
+import com.intellij.psi.util.PsiTreeUtil;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyTokenTypes;
+import com.jetbrains.python.psi.PyExpression;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+
+public class PyRemoveArgumentQuickFix implements LocalQuickFix {
+
+  @NotNull
+  public String getName() {
+    return PyBundle.message("QFIX.NAME.remove.argument");
+  }
+
+  @NonNls
+  @NotNull
+  public String getFamilyName() {
+    return getName();
+  }
+
+  public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
+    final PsiElement element = descriptor.getPsiElement();
+    if (!(element instanceof PyExpression)) return;
+    final PyExpression expression = (PyExpression)element;
+    final PsiElement nextSibling = PsiTreeUtil.skipSiblingsForward(expression, PsiWhiteSpace.class);
+    final PsiElement prevSibling = PsiTreeUtil.skipSiblingsBackward(expression, PsiWhiteSpace.class);
+    expression.delete();
+    if (nextSibling != null && nextSibling.getNode().getElementType().equals(PyTokenTypes.COMMA)) {
+      nextSibling.delete();
+      return;
+    }
+    if (prevSibling != null && prevSibling.getNode().getElementType().equals(PyTokenTypes.COMMA)) {
+      prevSibling.delete();
+    }
+  }
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveAssignmentQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveAssignmentQuickFix.java
new file mode 100644
index 0000000..5422de2
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveAssignmentQuickFix.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiElement;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.psi.PyAssignmentStatement;
+import com.jetbrains.python.psi.PyExpression;
+import org.jetbrains.annotations.NotNull;
+
+public class PyRemoveAssignmentQuickFix implements LocalQuickFix {
+  @NotNull
+  @Override
+  public String getName() {
+    return PyBundle.message("QFIX.NAME.remove.assignment");
+  }
+
+  @NotNull
+  public String getFamilyName() {
+    return getName();
+  }
+
+  @Override
+  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
+    final PsiElement assignment = descriptor.getPsiElement();
+    if (assignment instanceof PyAssignmentStatement) {
+      final PyExpression value = ((PyAssignmentStatement)assignment).getAssignedValue();
+      if (value != null) {
+        assignment.replace(value);
+      }
+    }
+  }
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveDictKeyQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveDictKeyQuickFix.java
new file mode 100644
index 0000000..759ebaa
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveDictKeyQuickFix.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiWhiteSpace;
+import com.intellij.psi.util.PsiTreeUtil;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyTokenTypes;
+import com.jetbrains.python.psi.PyKeyValueExpression;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+
+public class PyRemoveDictKeyQuickFix implements LocalQuickFix {
+
+  @NotNull
+  public String getName() {
+    return PyBundle.message("QFIX.NAME.remove.dict.key");
+  }
+
+  @NonNls
+  @NotNull
+  public String getFamilyName() {
+    return getName();
+  }
+
+  public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
+    final PsiElement element = descriptor.getPsiElement();
+    final PyKeyValueExpression expression = PsiTreeUtil.getParentOfType(element, PyKeyValueExpression.class);
+    if (expression == null) return;
+    final PsiElement nextSibling = PsiTreeUtil.skipSiblingsForward(expression, PsiWhiteSpace.class);
+    final PsiElement prevSibling = PsiTreeUtil.skipSiblingsBackward(expression, PsiWhiteSpace.class);
+    expression.delete();
+    if (nextSibling != null && nextSibling.getNode().getElementType().equals(PyTokenTypes.COMMA)) {
+      nextSibling.delete();
+      return;
+    }
+    if (prevSibling != null && prevSibling.getNode().getElementType().equals(PyTokenTypes.COMMA)) {
+      prevSibling.delete();
+    }
+  }
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveStatementQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveStatementQuickFix.java
new file mode 100644
index 0000000..0099a4e
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyRemoveStatementQuickFix.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.util.PsiTreeUtil;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.psi.PyElementGenerator;
+import com.jetbrains.python.psi.PyPassStatement;
+import com.jetbrains.python.psi.PyStatement;
+import com.jetbrains.python.psi.PyStatementList;
+import org.jetbrains.annotations.NotNull;
+
+public class PyRemoveStatementQuickFix implements LocalQuickFix {
+  @NotNull
+  @Override
+  public String getName() {
+    return PyBundle.message("QFIX.NAME.remove.statement");
+  }
+
+  @NotNull
+  public String getFamilyName() {
+    return getName();
+  }
+
+  @Override
+  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
+    final PsiElement statement = descriptor.getPsiElement();
+    if (statement instanceof PyStatement) {
+      final PyStatementList statementList = PsiTreeUtil.getParentOfType(statement, PyStatementList.class);
+      if (statementList != null) {
+        if (statementList.getStatements().length == 1) {
+          final PyPassStatement passStatement = PyElementGenerator.getInstance(project).createPassStatement();
+          statementList.addBefore(passStatement, statement);
+        }
+      }
+      statement.delete();
+    }
+  }
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyRenameArgumentQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyRenameArgumentQuickFix.java
new file mode 100644
index 0000000..0bf2b20
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyRenameArgumentQuickFix.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInsight.template.TemplateBuilderImpl;
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.editor.Editor;
+import com.intellij.openapi.fileEditor.FileEditorManager;
+import com.intellij.openapi.fileEditor.OpenFileDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.openapi.util.TextRange;
+import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiNamedElement;
+import com.jetbrains.python.PyBundle;
+import org.jetbrains.annotations.NotNull;
+
+public class PyRenameArgumentQuickFix implements LocalQuickFix {
+  @NotNull
+  @Override
+  public String getName() {
+    return PyBundle.message("QFIX.NAME.rename.argument");
+  }
+
+  @NotNull
+  @Override
+  public String getFamilyName() {
+    return getName();
+  }
+
+  @Override
+  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
+    final PsiElement element = descriptor.getPsiElement();
+    if (!(element instanceof PsiNamedElement)) return;
+    final VirtualFile virtualFile = element.getContainingFile().getVirtualFile();
+    if (virtualFile != null) {
+      final Editor editor = FileEditorManager.getInstance(project).openTextEditor(new OpenFileDescriptor(project, virtualFile), true);
+      final TemplateBuilderImpl builder = new TemplateBuilderImpl(element);
+      final String name = ((PsiNamedElement)element).getName();
+      assert name != null;
+      assert editor != null;
+      builder.replaceElement(element, TextRange.create(0, name.length()), name);
+      builder.run(editor, false);
+    }
+  }
+
+}
diff --git a/python/src/com/jetbrains/python/inspections/PyRenameElementQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyRenameElementQuickFix.java
similarity index 91%
rename from python/src/com/jetbrains/python/inspections/PyRenameElementQuickFix.java
rename to python/src/com/jetbrains/python/inspections/quickfix/PyRenameElementQuickFix.java
index b136b45..85ae4d8 100644
--- a/python/src/com/jetbrains/python/inspections/PyRenameElementQuickFix.java
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyRenameElementQuickFix.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.jetbrains.python.inspections;
+package com.jetbrains.python.inspections.quickfix;
 
 import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.ProblemDescriptor;
@@ -25,6 +25,7 @@
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiNameIdentifierOwner;
+import com.intellij.psi.PsiReference;
 import com.intellij.psi.search.LocalSearchScope;
 import com.intellij.psi.search.PsiSearchHelper;
 import com.intellij.psi.search.SearchScope;
@@ -35,6 +36,7 @@
 import com.intellij.refactoring.rename.inplace.VariableInplaceRenamer;
 import com.jetbrains.python.codeInsight.dataflow.scope.ScopeUtil;
 import com.jetbrains.python.psi.PyNamedParameter;
+import com.jetbrains.python.psi.PyReferenceExpression;
 import com.jetbrains.python.psi.PyTargetExpression;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -57,7 +59,12 @@
 
   @Override
   public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
-    final PsiElement element = descriptor.getPsiElement();
+    PsiElement element = descriptor.getPsiElement();
+    if (element instanceof PyReferenceExpression) {
+      final PsiReference reference = element.getReference();
+      if (reference == null) return;
+      element = reference.resolve();
+    }
     final PsiNameIdentifierOwner nameOwner = element instanceof PsiNameIdentifierOwner ?
                                              (PsiNameIdentifierOwner)element :
                                              PsiTreeUtil.getParentOfType(element, PsiNameIdentifierOwner.class, true);
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyRenameUnresolvedRefQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyRenameUnresolvedRefQuickFix.java
index ec198aa..2003d9a 100644
--- a/python/src/com/jetbrains/python/inspections/quickfix/PyRenameUnresolvedRefQuickFix.java
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyRenameUnresolvedRefQuickFix.java
@@ -128,12 +128,9 @@
   @Nullable
   private static Editor getEditor(@NotNull final Project project, @NotNull final PsiFile file, int offset) {
     final VirtualFile virtualFile = file.getVirtualFile();
-    if (virtualFile != null) {
-    return FileEditorManager.getInstance(project).openTextEditor(
+    return virtualFile != null ? FileEditorManager.getInstance(project).openTextEditor(
       new OpenFileDescriptor(project, virtualFile, offset), true
-    );
-    }
-    return null;
+    ) : null;
   }
 
   private static LookupElement[] collectLookupItems(@NotNull final ScopeOwner parentScope) {
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyReplaceTupleWithListQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyReplaceTupleWithListQuickFix.java
new file mode 100644
index 0000000..ecb22c1
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyReplaceTupleWithListQuickFix.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiElement;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.psi.*;
+import com.jetbrains.python.psi.resolve.PyResolveContext;
+import org.jetbrains.annotations.NotNull;
+
+public class PyReplaceTupleWithListQuickFix implements LocalQuickFix {
+  @NotNull
+  @Override
+  public String getName() {
+    return PyBundle.message("QFIX.NAME.make.list");
+  }
+
+  @NotNull
+  @Override
+  public String getFamilyName() {
+    return getName();
+  }
+
+  @Override
+  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
+    PsiElement element = descriptor.getPsiElement();
+    assert element instanceof PyAssignmentStatement;
+    PyExpression[] targets = ((PyAssignmentStatement)element).getTargets();
+    if (targets.length == 1 && targets[0] instanceof PySubscriptionExpression) {
+      PySubscriptionExpression subscriptionExpression = (PySubscriptionExpression)targets[0];
+      if (subscriptionExpression.getOperand() instanceof PyReferenceExpression) {
+        PyReferenceExpression referenceExpression = (PyReferenceExpression)subscriptionExpression.getOperand();
+        element = referenceExpression.followAssignmentsChain(PyResolveContext.defaultContext()).getElement();
+        if (element instanceof PyParenthesizedExpression) {
+          final PyExpression expression = ((PyParenthesizedExpression)element).getContainedExpression();
+          replaceWithListLiteral(element, (PyTupleExpression)expression);
+        }
+        else if (element instanceof PyTupleExpression) {
+          replaceWithListLiteral(element, (PyTupleExpression)element);
+        }
+      }
+    }
+  }
+
+  private static void replaceWithListLiteral(PsiElement element, PyTupleExpression expression) {
+    final String expressionText = expression.getElements().length == 0 ? "" :expression.getText();
+    final PyExpression literal = PyElementGenerator.getInstance(element.getProject()).
+      createExpressionFromText(LanguageLevel.forElement(element),
+                               "[" + expressionText + "]");
+    element.replace(literal);
+  }
+}
diff --git a/python/src/com/jetbrains/python/inspections/quickfix/PyWrapInExceptionQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/PyWrapInExceptionQuickFix.java
new file mode 100644
index 0000000..ae037a2
--- /dev/null
+++ b/python/src/com/jetbrains/python/inspections/quickfix/PyWrapInExceptionQuickFix.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections.quickfix;
+
+import com.intellij.codeInspection.LocalQuickFix;
+import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiElement;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.psi.*;
+import org.jetbrains.annotations.NotNull;
+
+public class PyWrapInExceptionQuickFix implements LocalQuickFix {
+  @NotNull
+  @Override
+  public String getName() {
+    return PyBundle.message("QFIX.NAME.wrap.in.exception");
+  }
+
+  @NotNull
+  public String getFamilyName() {
+    return getName();
+  }
+
+  @Override
+  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
+    final PsiElement string = descriptor.getPsiElement();
+    if (string instanceof PyStringLiteralExpression) {
+      final PyCallExpression callExpression =
+        PyElementGenerator.getInstance(project).createCallExpression(LanguageLevel.forElement(string), "Exception");
+      final PyArgumentList list = callExpression.getArgumentList();
+      assert list != null;
+      list.addArgument((PyExpression)string);
+      string.replace(callExpression);
+    }
+  }
+}
diff --git a/python/src/com/jetbrains/python/packaging/setupPy/SetupTaskChooserAction.java b/python/src/com/jetbrains/python/packaging/setupPy/SetupTaskChooserAction.java
index 972ea05..82f84de 100644
--- a/python/src/com/jetbrains/python/packaging/setupPy/SetupTaskChooserAction.java
+++ b/python/src/com/jetbrains/python/packaging/setupPy/SetupTaskChooserAction.java
@@ -106,7 +106,7 @@
           LocalFileSystem.getInstance().refresh(true);
         }
       });
-      task.run();
+      task.run(null);
     }
     catch (ExecutionException ee) {
       Messages.showErrorDialog(module.getProject(), "Failed to run task: " + ee.getMessage(), taskName);
diff --git a/python/src/com/jetbrains/python/psi/PyUtil.java b/python/src/com/jetbrains/python/psi/PyUtil.java
index 97b380b..2c06bfd 100644
--- a/python/src/com/jetbrains/python/psi/PyUtil.java
+++ b/python/src/com/jetbrains/python/psi/PyUtil.java
@@ -23,13 +23,17 @@
 import com.intellij.codeInsight.lookup.LookupElementBuilder;
 import com.intellij.ide.fileTemplates.FileTemplate;
 import com.intellij.ide.fileTemplates.FileTemplateManager;
+import com.intellij.injected.editor.VirtualFileWindow;
 import com.intellij.lang.ASTFactory;
 import com.intellij.lang.ASTNode;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.editor.Document;
 import com.intellij.openapi.extensions.Extensions;
 import com.intellij.openapi.module.Module;
+import com.intellij.openapi.module.ModuleManager;
 import com.intellij.openapi.module.ModuleUtilCore;
 import com.intellij.openapi.project.Project;
+import com.intellij.openapi.projectRoots.Sdk;
 import com.intellij.openapi.roots.ModuleRootManager;
 import com.intellij.openapi.ui.MessageType;
 import com.intellij.openapi.ui.popup.Balloon;
@@ -66,6 +70,7 @@
 import com.jetbrains.python.refactoring.classes.PyDependenciesComparator;
 import com.jetbrains.python.refactoring.classes.extractSuperclass.PyExtractSuperclassHelper;
 import com.jetbrains.python.refactoring.classes.membersManager.PyMemberInfo;
+import com.jetbrains.python.sdk.PythonSdkType;
 import org.jetbrains.annotations.NonNls;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -733,6 +738,52 @@
     return pyClass.findMethodByName(PyNames.INIT, false);
   }
 
+  /**
+   * Returns Python language level for a virtual file.
+   *
+   * @see {@link LanguageLevel#forElement}
+   */
+  @NotNull
+  public static LanguageLevel getLanguageLevelForVirtualFile(@NotNull Project project,
+                                                             @NotNull VirtualFile virtualFile) {
+    if (virtualFile instanceof VirtualFileWindow)
+      virtualFile = ((VirtualFileWindow)virtualFile).getDelegate();
+
+    // Most of the cases should be handled by this one, PyLanguageLevelPusher pushes folders only
+    final VirtualFile folder = virtualFile.getParent();
+    if (folder != null) {
+      final LanguageLevel level = folder.getUserData(LanguageLevel.KEY);
+      if (level != null) return level;
+    }
+    else {
+      // However this allows us to setup language level per file manually
+      // in case when it is LightVirtualFile
+      final LanguageLevel level = virtualFile.getUserData(LanguageLevel.KEY);
+      if (level != null) return level;
+
+      if (ApplicationManager.getApplication().isUnitTestMode()) {
+        final LanguageLevel languageLevel = LanguageLevel.FORCE_LANGUAGE_LEVEL;
+        if (languageLevel != null) {
+          return languageLevel;
+        }
+      }
+    }
+    return guessLanguageLevel(project);
+  }
+
+  private static LanguageLevel guessLanguageLevel(@NotNull Project project) {
+    final ModuleManager moduleManager = ModuleManager.getInstance(project);
+    if (moduleManager != null) {
+      for (Module projectModule : moduleManager.getModules()) {
+        final Sdk sdk = PythonSdkType.findPythonSdk(projectModule);
+        if (sdk != null) {
+          return PythonSdkType.getLanguageLevelForSdk(sdk);
+        }
+      }
+    }
+    return LanguageLevel.getDefault();
+  }
+
   public static class KnownDecoratorProviderHolder {
     public static PyKnownDecoratorProvider[] KNOWN_DECORATOR_PROVIDERS = Extensions.getExtensions(PyKnownDecoratorProvider.EP_NAME);
 
@@ -793,11 +844,14 @@
     return target;
   }
 
-  public static boolean isPackage(@NotNull PsiDirectory directory) {
+  public static boolean isPackage(@NotNull PsiDirectory directory, @Nullable PsiElement anchor) {
     if (turnDirIntoInit(directory) != null) {
       return true;
     }
-    if (LanguageLevel.forFile(directory.getVirtualFile()).isAtLeast(LanguageLevel.PYTHON33)) {
+    final LanguageLevel level = anchor != null ?
+                                LanguageLevel.forElement(anchor) :
+                                getLanguageLevelForVirtualFile(directory.getProject(), directory.getVirtualFile());
+    if (level.isAtLeast(LanguageLevel.PYTHON33)) {
       return true;
     }
     return hasNamespacePackageFile(directory);
@@ -808,8 +862,8 @@
   }
 
   @Nullable
-  public static PsiElement getPackageElement(@NotNull PsiDirectory directory) {
-    if (isPackage(directory)) {
+  public static PsiElement getPackageElement(@NotNull PsiDirectory directory, @Nullable PsiElement anchor) {
+    if (isPackage(directory, anchor)) {
       final PsiElement init = turnDirIntoInit(directory);
       if (init != null) {
         return init;
diff --git a/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java b/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java
index eaa480b..7538fba 100644
--- a/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java
+++ b/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java
@@ -663,10 +663,7 @@
     // EA-32381: A tree-based instance may not have a parent element somehow, so getContainingFile() may be not appropriate
     final PsiFile file = getParentByStub() != null ? getContainingFile() : null;
     if (file != null) {
-      final VirtualFile vfile = file.getVirtualFile();
-      if (vfile != null) {
-        level = LanguageLevel.forFile(vfile);
-      }
+      level = LanguageLevel.forElement(file);
     }
     final boolean useAdvancedSyntax = level.isAtLeast(LanguageLevel.PYTHON26);
     final Property local = processPropertiesInClass(name, filter, useAdvancedSyntax);
@@ -968,20 +965,18 @@
     else {
       final PyStatementList statementList = function.getStatementList();
       final List<PyTargetExpression> result = new ArrayList<PyTargetExpression>();
-      if (statementList != null) {
-        statementList.accept(new PyRecursiveElementVisitor() {
-          @Override
-          public void visitPyClass(PyClass node) {}
+      statementList.accept(new PyRecursiveElementVisitor() {
+        @Override
+        public void visitPyClass(PyClass node) {}
 
-          public void visitPyAssignmentStatement(final PyAssignmentStatement node) {
-            for (PyExpression expression : node.getTargets()) {
-              if (expression instanceof PyTargetExpression) {
-                result.add((PyTargetExpression)expression);
-              }
+        public void visitPyAssignmentStatement(final PyAssignmentStatement node) {
+          for (PyExpression expression : node.getTargets()) {
+            if (expression instanceof PyTargetExpression) {
+              result.add((PyTargetExpression)expression);
             }
           }
-        });
-      }
+        }
+      });
       return result;
     }
   }
diff --git a/python/src/com/jetbrains/python/psi/impl/PyElementGeneratorImpl.java b/python/src/com/jetbrains/python/psi/impl/PyElementGeneratorImpl.java
index c306116..744dc97 100644
--- a/python/src/com/jetbrains/python/psi/impl/PyElementGeneratorImpl.java
+++ b/python/src/com/jetbrains/python/psi/impl/PyElementGeneratorImpl.java
@@ -42,7 +42,6 @@
 import java.nio.charset.Charset;
 import java.nio.charset.CharsetEncoder;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Deque;
 import java.util.Formatter;
 
@@ -291,6 +290,24 @@
     return createFromText(languageLevel, PyImportElement.class, "from foo import " + name, new int[]{0, 6});
   }
 
+  @Override
+  public PyFunction createProperty(LanguageLevel languageLevel,
+                                   String propertyName,
+                                   String fieldName,
+                                   AccessDirection accessDirection) {
+    String propertyText;
+    if (accessDirection == AccessDirection.DELETE) {
+      propertyText = "@" + propertyName +".deleter\ndef " + propertyName + "(self):\n  del self." + fieldName;
+    }
+    else if (accessDirection == AccessDirection.WRITE) {
+      propertyText = "@" + propertyName + ".setter\ndef " + propertyName + "(self, value):\n  self." + fieldName + " = value";
+    }
+    else {
+      propertyText = "@property\ndef " + propertyName + "(self):\n  return self." + fieldName;
+    }
+    return createFromText(languageLevel, PyFunction.class, propertyText);
+  }
+
   static final int[] FROM_ROOT = new int[]{0};
 
   @NotNull
diff --git a/python/src/com/jetbrains/python/psi/impl/PyFileImpl.java b/python/src/com/jetbrains/python/psi/impl/PyFileImpl.java
index c1aa84c..4976dd0 100644
--- a/python/src/com/jetbrains/python/psi/impl/PyFileImpl.java
+++ b/python/src/com/jetbrains/python/psi/impl/PyFileImpl.java
@@ -294,7 +294,7 @@
     if (virtualFile == null) {
       virtualFile = getViewProvider().getVirtualFile();
     }
-    return LanguageLevel.forFile(virtualFile);
+    return PyUtil.getLanguageLevelForVirtualFile(getProject(), virtualFile);
   }
 
   public Icon getIcon(int flags) {
diff --git a/python/src/com/jetbrains/python/psi/impl/PyImportedModule.java b/python/src/com/jetbrains/python/psi/impl/PyImportedModule.java
index d035888..cba0bf2 100644
--- a/python/src/com/jetbrains/python/psi/impl/PyImportedModule.java
+++ b/python/src/com/jetbrains/python/psi/impl/PyImportedModule.java
@@ -143,7 +143,7 @@
       element = ResolveImportUtil.resolveModuleInRoots(getImportedPrefix(), getContainingFile());
     }
     if (element instanceof PsiDirectory) {
-      return PyUtil.getPackageElement((PsiDirectory)element);
+      return PyUtil.getPackageElement((PsiDirectory)element, this);
     }
     return element;
   }
diff --git a/python/src/com/jetbrains/python/psi/impl/references/PyReferenceImpl.java b/python/src/com/jetbrains/python/psi/impl/references/PyReferenceImpl.java
index df4fb34..c66cf5f 100644
--- a/python/src/com/jetbrains/python/psi/impl/references/PyReferenceImpl.java
+++ b/python/src/com/jetbrains/python/psi/impl/references/PyReferenceImpl.java
@@ -427,7 +427,7 @@
         }
         else if (resolveResult instanceof PsiDirectory) {
           final PsiDirectory directory = (PsiDirectory)resolveResult;
-          if (PyUtil.isPackage(directory) && directory == element) {
+          if (PyUtil.isPackage(directory, null) && directory == element) {
             return true;
           }
         }
diff --git a/python/src/com/jetbrains/python/psi/resolve/ResolveImportUtil.java b/python/src/com/jetbrains/python/psi/resolve/ResolveImportUtil.java
index 6a80851..2f866a2 100644
--- a/python/src/com/jetbrains/python/psi/resolve/ResolveImportUtil.java
+++ b/python/src/com/jetbrains/python/psi/resolve/ResolveImportUtil.java
@@ -132,7 +132,7 @@
         throw new PsiInvalidElementAccessException(candidate, "Got an invalid candidate from resolveImportSourceCandidates(): " + candidate.getClass());
       }
       if (candidate instanceof PsiDirectory) {
-        candidate = PyUtil.getPackageElement((PsiDirectory)candidate);
+        candidate = PyUtil.getPackageElement((PsiDirectory)candidate, importStatement);
       }
       PsiElement result = resolveChild(candidate, name, file, false, true);
       if (result != null) {
@@ -326,7 +326,7 @@
     if (referencedName == null) return null;
 
     final PsiDirectory subdir = dir.findSubdirectory(referencedName);
-    if (subdir != null && (!checkForPackage || PyUtil.isPackage(subdir))) {
+    if (subdir != null && (!checkForPackage || PyUtil.isPackage(subdir, containingFile))) {
       return subdir;
     }
 
@@ -358,7 +358,7 @@
     ResolveResultList ret = new ResolveResultList();
     for (PsiElement target : targets) {
       if (target instanceof PsiDirectory) {
-        target = PyUtil.getPackageElement((PsiDirectory)target);
+        target = PyUtil.getPackageElement((PsiDirectory)target, null);
       }
       if (target != null) {   // Ignore non-package dirs, worthless
         int rate = RatedResolveResult.RATE_HIGH;
diff --git a/python/src/com/jetbrains/python/psi/types/PyTypeParser.java b/python/src/com/jetbrains/python/psi/types/PyTypeParser.java
index e064ac3..9e192321 100644
--- a/python/src/com/jetbrains/python/psi/types/PyTypeParser.java
+++ b/python/src/com/jetbrains/python/psi/types/PyTypeParser.java
@@ -450,7 +450,7 @@
             break;
           }
           if (module instanceof PsiDirectory) {
-            module = PyUtil.getPackageElement((PsiDirectory)module);
+            module = PyUtil.getPackageElement((PsiDirectory)module, myAnchor);
           }
           if (module instanceof PyTypedElement) {
             final PyType moduleType = context.getType((PyTypedElement)module);
diff --git a/python/src/com/jetbrains/python/refactoring/changeSignature/PyMethodDescriptor.java b/python/src/com/jetbrains/python/refactoring/changeSignature/PyMethodDescriptor.java
index bcf5f2a..aeebd8f 100644
--- a/python/src/com/jetbrains/python/refactoring/changeSignature/PyMethodDescriptor.java
+++ b/python/src/com/jetbrains/python/refactoring/changeSignature/PyMethodDescriptor.java
@@ -17,8 +17,10 @@
 
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.refactoring.changeSignature.MethodDescriptor;
-import com.jetbrains.python.psi.*;
-import com.jetbrains.python.psi.impl.PyNamedParameterImpl;
+import com.jetbrains.python.psi.PyExpression;
+import com.jetbrains.python.psi.PyFunction;
+import com.jetbrains.python.psi.PyNamedParameter;
+import com.jetbrains.python.psi.PyParameter;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -46,9 +48,8 @@
     for (int i = 0; i < parameters.length; i++) {
       PyParameter parameter = parameters[i];
       final PyExpression defaultValue = parameter.getDefaultValue();
-      String name = parameter instanceof PySingleStarParameter || parameter instanceof PyTupleParameter ||
-                    ((PyNamedParameterImpl)parameter).isPositionalContainer() ||
-                    ((PyNamedParameterImpl)parameter).isKeywordContainer()? parameter.getText() : parameter.getName();
+      final String name = parameter instanceof PyNamedParameter && !((PyNamedParameter)parameter).isPositionalContainer() &&
+                          !((PyNamedParameter)parameter).isKeywordContainer() ? parameter.getName() : parameter.getText();
       parameterInfos.add(new PyParameterInfo(i, name, defaultValue == null? null : defaultValue.getText(),
                                              defaultValue != null && !StringUtil.isEmptyOrSpaces(defaultValue.getText())));
     }
diff --git a/python/src/com/jetbrains/python/remote/PyRemoteSdkAdditionalDataBase.java b/python/src/com/jetbrains/python/remote/PyRemoteSdkAdditionalDataBase.java
index 66cceb1..e1514ba 100644
--- a/python/src/com/jetbrains/python/remote/PyRemoteSdkAdditionalDataBase.java
+++ b/python/src/com/jetbrains/python/remote/PyRemoteSdkAdditionalDataBase.java
@@ -20,5 +20,5 @@
 /**
  * @author traff
  */
-public interface PyRemoteSdkAdditionalDataBase extends RemoteSdkAdditionalData<PyRemoteSdkCredentials>, PySkeletonsPathAware {
+public interface PyRemoteSdkAdditionalDataBase extends RemoteSdkAdditionalData<PyRemoteSdkCredentials>, PyRemoteSdkSkeletonsPathAware {
 }
diff --git a/python/src/com/jetbrains/python/remote/PyRemoteSdkSkeletonsPathAware.java b/python/src/com/jetbrains/python/remote/PyRemoteSdkSkeletonsPathAware.java
new file mode 100644
index 0000000..f49fed5
--- /dev/null
+++ b/python/src/com/jetbrains/python/remote/PyRemoteSdkSkeletonsPathAware.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2000-2014 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.remote;
+
+import com.intellij.remote.RemoteSdkProperties;
+
+/**
+ * @author traff
+ */
+public interface PyRemoteSdkSkeletonsPathAware extends PySkeletonsPathAware, RemoteSdkProperties{
+}
diff --git a/python/src/com/jetbrains/python/remote/PythonRemoteInterpreterManager.java b/python/src/com/jetbrains/python/remote/PythonRemoteInterpreterManager.java
index 4276ed8..d326dd9 100644
--- a/python/src/com/jetbrains/python/remote/PythonRemoteInterpreterManager.java
+++ b/python/src/com/jetbrains/python/remote/PythonRemoteInterpreterManager.java
@@ -53,14 +53,14 @@
   public abstract ProcessHandler startRemoteProcess(@Nullable Project project,
                                                     @NotNull PyRemoteSdkCredentials data,
                                                     @NotNull GeneralCommandLine commandLine,
-                                                    @Nullable
+                                                    @NotNull
                                                     PathMappingSettings mappingSettings)
     throws RemoteSdkException;
 
   public abstract ProcessHandler startRemoteProcessWithPid(@Nullable Project project,
                                                            @NotNull PyRemoteSdkCredentials data,
                                                            @NotNull GeneralCommandLine commandLine,
-                                                           @Nullable
+                                                           @NotNull
                                                            PathMappingSettings mappingSettings)
     throws RemoteSdkException;
 
@@ -126,15 +126,16 @@
     return FileUtil.toSystemIndependentName(path).replace('/', separator);
   }
 
-  public static void addHelpersMapping(@NotNull RemoteSdkCredentials data, @Nullable PathMappingSettings newMappingSettings) {
+  public static void addHelpersMapping(@NotNull RemoteSdkProperties data, @Nullable PathMappingSettings newMappingSettings) {
     if (newMappingSettings == null) {
       newMappingSettings = new PathMappingSettings();
     }
     newMappingSettings.addMapping(PythonHelpersLocator.getHelpersRoot().getPath(), data.getHelpersPath());
   }
 
+  @NotNull
   public abstract PathMappingSettings setupMappings(@Nullable Project project,
-                                                    @NotNull PyRemoteSdkCredentials data,
+                                                    @NotNull PyRemoteSdkAdditionalDataBase data,
                                                     @Nullable PathMappingSettings mappingSettings);
 
   public abstract SdkAdditionalData loadRemoteSdkData(Sdk sdk, Element additional);
diff --git a/python/src/com/jetbrains/python/run/PyRemoteProcessStarter.java b/python/src/com/jetbrains/python/run/PyRemoteProcessStarter.java
index 673b87d..d5ba031 100644
--- a/python/src/com/jetbrains/python/run/PyRemoteProcessStarter.java
+++ b/python/src/com/jetbrains/python/run/PyRemoteProcessStarter.java
@@ -70,8 +70,11 @@
 
     SdkAdditionalData data = sdk.getSdkAdditionalData();
     assert data instanceof PyRemoteSdkAdditionalDataBase;
+    PyRemoteSdkAdditionalDataBase pyRemoteSdkAdditionalDataBase = (PyRemoteSdkAdditionalDataBase)data;
     try {
-      return manager.startRemoteProcess(project, ((PyRemoteSdkAdditionalDataBase)data).getRemoteSdkCredentials(), commandLine,
+      settings = manager.setupMappings(project, pyRemoteSdkAdditionalDataBase, settings);
+
+      return manager.startRemoteProcess(project, pyRemoteSdkAdditionalDataBase.getRemoteSdkCredentials(), commandLine,
                                         settings);
     }
     catch (InterruptedException e) {
diff --git a/python/src/com/jetbrains/python/run/PythonCommandLineState.java b/python/src/com/jetbrains/python/run/PythonCommandLineState.java
index 7869eca..58a3e83 100644
--- a/python/src/com/jetbrains/python/run/PythonCommandLineState.java
+++ b/python/src/com/jetbrains/python/run/PythonCommandLineState.java
@@ -21,10 +21,7 @@
 import com.intellij.execution.ExecutionException;
 import com.intellij.execution.ExecutionResult;
 import com.intellij.execution.Executor;
-import com.intellij.execution.configurations.CommandLineState;
-import com.intellij.execution.configurations.GeneralCommandLine;
-import com.intellij.execution.configurations.ParametersList;
-import com.intellij.execution.configurations.RunnerSettings;
+import com.intellij.execution.configurations.*;
 import com.intellij.execution.filters.Filter;
 import com.intellij.execution.filters.TextConsoleBuilder;
 import com.intellij.execution.filters.TextConsoleBuilderFactory;
@@ -179,6 +176,7 @@
         createRemoteProcessStarter().startRemoteProcess(sdk, commandLine, myConfig.getProject(), myConfig.getMappingSettings());
     }
     else {
+      EncodingEnvironmentUtil.fixDefaultEncodingIfMac(commandLine, myConfig.getProject());
       processHandler = doCreateProcess(commandLine);
       ProcessTerminatedListener.attach(processHandler);
     }
diff --git a/python/src/com/jetbrains/python/run/PythonRunConfigurationProducer.java b/python/src/com/jetbrains/python/run/PythonRunConfigurationProducer.java
index 5817768..6aedaf1 100644
--- a/python/src/com/jetbrains/python/run/PythonRunConfigurationProducer.java
+++ b/python/src/com/jetbrains/python/run/PythonRunConfigurationProducer.java
@@ -19,6 +19,7 @@
 import com.intellij.execution.actions.ConfigurationContext;
 import com.intellij.execution.actions.ConfigurationFromContext;
 import com.intellij.execution.actions.RunConfigurationProducer;
+import com.intellij.ide.scratch.ScratchpadManager;
 import com.intellij.openapi.extensions.Extensions;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.module.ModuleUtilCore;
@@ -75,6 +76,7 @@
     if (!isAvailable(location, script)) return false;
     final VirtualFile virtualFile = script.getVirtualFile();
     if (virtualFile == null) return false;
+    if (ScratchpadManager.getInstance(configuration.getProject()).isScratchFile(virtualFile)) return false;
     final String workingDirectory = configuration.getWorkingDirectory();
     final String scriptName = configuration.getScriptName();
     final String path = virtualFile.getPath();
diff --git a/python/src/com/jetbrains/python/run/PythonTask.java b/python/src/com/jetbrains/python/run/PythonTask.java
index 4861e0c..6f0275e 100644
--- a/python/src/com/jetbrains/python/run/PythonTask.java
+++ b/python/src/com/jetbrains/python/run/PythonTask.java
@@ -18,6 +18,7 @@
 import com.google.common.collect.Lists;
 import com.intellij.execution.ExecutionException;
 import com.intellij.execution.RunContentExecutor;
+import com.intellij.execution.configurations.EncodingEnvironmentUtil;
 import com.intellij.execution.configurations.GeneralCommandLine;
 import com.intellij.execution.configurations.ParamsGroup;
 import com.intellij.execution.process.ProcessHandler;
@@ -31,6 +32,7 @@
 import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.util.NotNullFunction;
+import com.jetbrains.python.PyBundle;
 import com.jetbrains.python.buildout.BuildoutFacet;
 import com.jetbrains.python.sdk.PySdkUtil;
 import com.jetbrains.python.sdk.PythonEnvUtil;
@@ -42,11 +44,16 @@
 import java.util.Map;
 
 /**
+ * TODO: Use {@link com.jetbrains.python.run.PythonRunner} instead of this class? At already supports rerun and other things
  * Base class for tasks which are run from PyCharm with results displayed in a toolwindow (manage.py, setup.py, Sphinx etc).
  *
  * @author yole
  */
 public class PythonTask {
+  /**
+   * Mils we wait to process to be stopped when "rerun" called
+   */
+  private static final long TIME_TO_WAIT_PROCESS_STOP = 2000L;
   protected final Module myModule;
   private final Sdk mySdk;
   private String myWorkingDirectory;
@@ -93,8 +100,14 @@
     myAfterCompletion = afterCompletion;
   }
 
-  public ProcessHandler createProcess() throws ExecutionException {
-    GeneralCommandLine commandLine = createCommandLine();
+  /**
+   * @param env environment variables to be passed to process or null if nothing should be passed
+   */
+  public ProcessHandler createProcess(@Nullable final Map<String, String> env) throws ExecutionException {
+    final GeneralCommandLine commandLine = createCommandLine();
+    if (env != null) {
+       commandLine.getEnvironment().putAll(env);
+    }
 
     ProcessHandler handler;
     if (PySdkUtil.isRemote(mySdk)) {
@@ -102,6 +115,7 @@
       handler = new PyRemoteProcessStarter().startRemoteProcess(mySdk, commandLine, myModule.getProject(), null);
     }
     else {
+      EncodingEnvironmentUtil.fixDefaultEncodingIfMac(commandLine, myModule.getProject());
       handler = PythonProcessRunner.createProcessHandlingCtrlC(commandLine);
 
       ProcessTerminatedListener.attach(handler);
@@ -152,7 +166,6 @@
     List<String> pythonPath = setupPythonPath();
     PythonCommandLineState.initPythonPath(cmd, true, pythonPath, homePath);
 
-    PythonSdkType.patchCommandLineForVirtualenv(cmd, homePath, true);
     BuildoutFacet facet = BuildoutFacet.getInstance(myModule);
     if (facet != null) {
       facet.patchCommandLineForBuildout(cmd);
@@ -171,8 +184,11 @@
     return pythonPath;
   }
 
-  public void run() throws ExecutionException {
-    final ProcessHandler process = createProcess();
+  /**
+   * @param env environment variables to be passed to process or null if nothing should be passed
+   */
+  public void run(@Nullable final Map<String, String> env) throws ExecutionException {
+    final ProcessHandler process = createProcess(env);
     final Project project = myModule.getProject();
     new RunContentExecutor(project, process)
       .withFilter(new PythonTracebackFilter(project))
@@ -181,7 +197,12 @@
         @Override
         public void run() {
           try {
-            PythonTask.this.run();
+            process.destroyProcess(); // Stop process before rerunning it
+            if (process.waitFor(TIME_TO_WAIT_PROCESS_STOP)) {
+              PythonTask.this.run(env);
+            }else {
+              Messages.showErrorDialog(PyBundle.message("unable.to.stop"), myRunTabTitle);
+            }
           }
           catch (ExecutionException e) {
             Messages.showErrorDialog(e.getMessage(), myRunTabTitle);
diff --git a/python/src/com/jetbrains/python/validation/UnsupportedFeatures.java b/python/src/com/jetbrains/python/validation/UnsupportedFeatures.java
index 69b5f8b..94a0f37 100644
--- a/python/src/com/jetbrains/python/validation/UnsupportedFeatures.java
+++ b/python/src/com/jetbrains/python/validation/UnsupportedFeatures.java
@@ -23,11 +23,9 @@
 import com.intellij.codeInspection.ex.ProblemDescriptorImpl;
 import com.intellij.codeInspection.ex.QuickFixWrapper;
 import com.intellij.openapi.util.TextRange;
-import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
 import com.jetbrains.python.psi.LanguageLevel;
 import com.jetbrains.python.psi.PyElement;
-import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.ArrayList;
@@ -44,7 +42,7 @@
 
   @Override
   public void visitPyElement(PyElement node) {
-    setVersionsToProcess(Arrays.asList(getLanguageLevel(node)));
+    setVersionsToProcess(Arrays.asList(LanguageLevel.forElement(node)));
   }
 
   @Override
@@ -70,15 +68,6 @@
         getHolder().createWarningAnnotation(range, message);
   }
 
-  @NotNull
-  private static LanguageLevel getLanguageLevel(PyElement node) {
-    VirtualFile virtualFile = node.getContainingFile().getVirtualFile();
-    if (virtualFile != null) {
-      return LanguageLevel.forFile(virtualFile);
-    }
-    return LanguageLevel.getDefault();
-  }
-
   private static IntentionAction createIntention(PsiElement node, String message, LocalQuickFix fix) {
     return createIntention(node, node.getTextRange(), message, fix);
   }
diff --git a/python/testData/inspections/PyAbstractClassInspection/abstract.py b/python/testData/inspections/PyAbstractClassInspection/abstract.py
new file mode 100644
index 0000000..17ceac0
--- /dev/null
+++ b/python/testData/inspections/PyAbstractClassInspection/abstract.py
@@ -0,0 +1,14 @@
+import abc
+
+
+class A(object):
+    __metaclass__ = abc.ABCMeta
+
+    @abc.abstractproperty
+    def foo(self):
+        pass
+
+
+class <weak_warning descr="Class C must implement all abstract methods">C</weak_warning>(A):
+    def bar(self):
+        pass
diff --git a/python/testData/inspections/PyAbstractClassInspection/overriddenAsField.py b/python/testData/inspections/PyAbstractClassInspection/overriddenAsField.py
new file mode 100644
index 0000000..5d79ab7
--- /dev/null
+++ b/python/testData/inspections/PyAbstractClassInspection/overriddenAsField.py
@@ -0,0 +1,13 @@
+import abc
+
+
+class A(object):
+    __metaclass__ = abc.ABCMeta
+
+    @abc.abstractproperty
+    def foo(self):
+        pass
+
+
+class C(A):
+    foo = 'bar'
\ No newline at end of file
diff --git a/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/bad.py b/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/bad.py
index c6492c1..5743a85 100644
--- a/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/bad.py
+++ b/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/bad.py
@@ -59,4 +59,18 @@
     def foo(self):
         for self.data in [1,2,3]:
             for <weak_warning descr="Variable 'self.data' already declared in 'for' loop or 'with' statement above">self.data</weak_warning> in [1,2,3]:
-                pass
\ No newline at end of file
+                pass
+
+for elt in range(10):
+    print elt
+else:
+    for elt in range(10):
+        for <weak_warning descr="Variable 'elt' already declared in 'for' loop or 'with' statement above">elt</weak_warning>  in range(10):
+            pass
+
+for elt in range(10):
+    for <weak_warning descr="Variable 'elt' already declared in 'for' loop or 'with' statement above">elt</weak_warning>  in range(10):
+        pass
+else:
+    for elt in range(10):
+        pass
\ No newline at end of file
diff --git a/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/good.py b/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/good.py
index f324656..2e52d14 100644
--- a/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/good.py
+++ b/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/good.py
@@ -87,3 +87,13 @@
         for data in [1,2,3]:
             for self.data in [1,2,3]:
                 pass
+
+def contains_even_number(l):
+    """
+    See: PY-12367
+    """
+    for elt in range(10):
+        print elt
+    else:
+        for elt in range(10):
+            pass
\ No newline at end of file
diff --git a/python/testData/inspections/PyAttributeOutsideInitInspection/privateMethod.py b/python/testData/inspections/PyAttributeOutsideInitInspection/privateMethod.py
new file mode 100644
index 0000000..5303426
--- /dev/null
+++ b/python/testData/inspections/PyAttributeOutsideInitInspection/privateMethod.py
@@ -0,0 +1,8 @@
+
+class MyClass(object):
+    def __init__(self):
+        self._resetData()
+        self._val  = []
+
+    def _resetData(self):
+        self._val = []  # This should not be receiving a warning. The function gets called in __init__.
\ No newline at end of file
diff --git a/python/testData/inspections/PyInitNewSignatureInspection/expected.xml b/python/testData/inspections/PyInitNewSignatureInspection/expected.xml
index a0d40b9..2326a36 100644
--- a/python/testData/inspections/PyInitNewSignatureInspection/expected.xml
+++ b/python/testData/inspections/PyInitNewSignatureInspection/expected.xml
@@ -8,6 +8,11 @@
   </problem>
   <problem>
     <file>test.py</file>
+    <line>5</line>
+    <description>Signature is not compatible to __init__</description>
+  </problem>
+  <problem>
+    <file>test.py</file>
     <line>12</line>
     <problem_class severity="WARNING"/>
     <description>Signature is not compatible to __init__</description>
diff --git a/python/testData/inspections/PyInitNewSignatureInspection/src/test.py b/python/testData/inspections/PyInitNewSignatureInspection/src/test.py
index 18f6313..a0ebd20 100644
--- a/python/testData/inspections/PyInitNewSignatureInspection/src/test.py
+++ b/python/testData/inspections/PyInitNewSignatureInspection/src/test.py
@@ -1,9 +1,9 @@
 class B(object):
-  def __init__(self): # ierror only once
-                pass
+  def __init__(self): # error
+    pass
 
-    def __new__(cls, x, y):
-              pass
+  def __new__(cls, x, y): # error
+    pass
 
 class A1(B):
     pass
diff --git a/python/testData/inspections/PyPep8NamingInspection/classAttributes.py b/python/testData/inspections/PyPep8NamingInspection/classAttributes.py
new file mode 100644
index 0000000..d914538
--- /dev/null
+++ b/python/testData/inspections/PyPep8NamingInspection/classAttributes.py
@@ -0,0 +1,10 @@
+class Spam(object):
+    CLASS_FIELD = 0
+
+    @classmethod
+    def eggs(cls):
+        cls.CLASS_FIELD = 1
+
+    @staticmethod
+    def ham():
+        Spam.CLASS_FIELD = 2
\ No newline at end of file
diff --git a/python/testData/inspections/PyProtectedMemberInspection/namedTuple.py b/python/testData/inspections/PyProtectedMemberInspection/namedTuple.py
new file mode 100644
index 0000000..905088a
--- /dev/null
+++ b/python/testData/inspections/PyProtectedMemberInspection/namedTuple.py
@@ -0,0 +1,6 @@
+from collections import namedtuple
+
+i = namedtuple('Point', ['x', 'y'], verbose=True)
+i._replace( **{"a":"a"})
+
+
diff --git a/python/testData/inspections/PyProtectedMemberInspection/test.py b/python/testData/inspections/PyProtectedMemberInspection/test.py
new file mode 100644
index 0000000..d8f6cdc
--- /dev/null
+++ b/python/testData/inspections/PyProtectedMemberInspection/test.py
@@ -0,0 +1,17 @@
+__author__ = 'ktisha'
+
+import unittest
+
+class A:
+    def __init__(self):
+        self._x = 1
+
+    def _foo(self):
+        pass
+
+
+class TestA(unittest.TestCase):
+    def testA(self):
+        a = A()
+        a._foo()
+        print(a._x)
diff --git a/python/testData/quickFixes/AddCallSuperQuickFixTest/newStyle.py b/python/testData/quickFixes/AddCallSuperQuickFixTest/newStyle.py
new file mode 100644
index 0000000..7eec148
--- /dev/null
+++ b/python/testData/quickFixes/AddCallSuperQuickFixTest/newStyle.py
@@ -0,0 +1,11 @@
+
+class A(object):
+    def __init__(self):
+        a = 1
+
+class C(A):
+    def <warning descr="Call to __init__ of super class is missed">__i<caret>nit__</warning>(self):
+        pass
+
+    def foo(self):
+        pass
\ No newline at end of file
diff --git a/python/testData/quickFixes/AddCallSuperQuickFixTest/newStyle_after.py b/python/testData/quickFixes/AddCallSuperQuickFixTest/newStyle_after.py
new file mode 100644
index 0000000..08cded3
--- /dev/null
+++ b/python/testData/quickFixes/AddCallSuperQuickFixTest/newStyle_after.py
@@ -0,0 +1,11 @@
+
+class A(object):
+    def __init__(self):
+        a = 1
+
+class C(A):
+    def __init__(self):
+        super(C, self).__init__()
+
+    def foo(self):
+        pass
\ No newline at end of file
diff --git a/python/testData/quickFixes/AddCallSuperQuickFixTest/oldStyle.py b/python/testData/quickFixes/AddCallSuperQuickFixTest/oldStyle.py
new file mode 100644
index 0000000..513af7d
--- /dev/null
+++ b/python/testData/quickFixes/AddCallSuperQuickFixTest/oldStyle.py
@@ -0,0 +1,10 @@
+class A():
+    def __init__(self):
+        a = 1
+
+class C(A):
+    def <warning descr="Call to __init__ of super class is missed">__ini<caret>t__</warning>(self):
+        pass
+
+    def foo(self):
+        pass
\ No newline at end of file
diff --git a/python/testData/quickFixes/AddCallSuperQuickFixTest/oldStyle_after.py b/python/testData/quickFixes/AddCallSuperQuickFixTest/oldStyle_after.py
new file mode 100644
index 0000000..d1ee141
--- /dev/null
+++ b/python/testData/quickFixes/AddCallSuperQuickFixTest/oldStyle_after.py
@@ -0,0 +1,10 @@
+class A():
+    def __init__(self):
+        a = 1
+
+class C(A):
+    def __init__(self):
+        A.__init__(self)
+
+    def foo(self):
+        pass
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/emptySuperList.py b/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/emptySuperList.py
new file mode 100644
index 0000000..1d4b461
--- /dev/null
+++ b/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/emptySuperList.py
@@ -0,0 +1,9 @@
+
+class MyException:
+    def __new__(cls, x):
+        pass
+
+
+def foo():
+    raise <warning descr="Exception doesn't inherit from base 'Exception' class">My<caret>Exception()</warning>
+
diff --git a/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/emptySuperList_after.py b/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/emptySuperList_after.py
new file mode 100644
index 0000000..3804bf9
--- /dev/null
+++ b/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/emptySuperList_after.py
@@ -0,0 +1,9 @@
+
+class MyException(Exception):
+    def __new__(cls, x):
+        pass
+
+
+def foo():
+    raise MyException()
+
diff --git a/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/nonEmptySuperList.py b/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/nonEmptySuperList.py
new file mode 100644
index 0000000..81c7263
--- /dev/null
+++ b/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/nonEmptySuperList.py
@@ -0,0 +1,12 @@
+
+class A:
+    pass
+
+class MyException(A):
+    def __new__(cls, x):
+        pass
+
+
+def foo():
+    raise <warning descr="Exception doesn't inherit from base 'Exception' class">MyExcep<caret>tion()</warning>
+
diff --git a/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/nonEmptySuperList_after.py b/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/nonEmptySuperList_after.py
new file mode 100644
index 0000000..c92e761
--- /dev/null
+++ b/python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/nonEmptySuperList_after.py
@@ -0,0 +1,12 @@
+
+class A:
+    pass
+
+class MyException(A, Exception):
+    def __new__(cls, x):
+        pass
+
+
+def foo():
+    raise MyException()
+
diff --git a/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/protectedFunction.py b/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/protectedFunction.py
new file mode 100644
index 0000000..0a026bf
--- /dev/null
+++ b/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/protectedFunction.py
@@ -0,0 +1,12 @@
+
+class A:
+    def __init__(self):
+        self._x = 1
+
+    def _foo(self):
+        print(self._x)
+
+a = A()
+a._f<caret>oo()
+
+print(a._x)
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/protectedMember.py b/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/protectedMember.py
new file mode 100644
index 0000000..7fc4b76
--- /dev/null
+++ b/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/protectedMember.py
@@ -0,0 +1,12 @@
+
+class A:
+    def __init__(self):
+        self._x = 1
+
+    def _foo(self):
+        print(self._x)
+
+a = A()
+a._foo()
+
+print(a._<caret>x)
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/protectedMember_after.py b/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/protectedMember_after.py
new file mode 100644
index 0000000..f0a0d2e
--- /dev/null
+++ b/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/protectedMember_after.py
@@ -0,0 +1,17 @@
+
+class A:
+    def __init__(self):
+        self._x = 1
+
+    def _foo(self):
+        print(self._x)
+
+    @property
+    def x(self):
+        return self._x
+
+
+a = A()
+a._foo()
+
+print(a.x)
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/useProperty.py b/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/useProperty.py
new file mode 100644
index 0000000..59357db
--- /dev/null
+++ b/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/useProperty.py
@@ -0,0 +1,16 @@
+class A:
+    @property
+    def x(self):
+        return self._x
+
+    def __init__(self):
+        self._x = 1
+
+    def _foo(self):
+        print(self._x)
+
+a = A()
+a._foo()
+
+print(a.x)
+print(a._<caret>x)
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/useProperty_after.py b/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/useProperty_after.py
new file mode 100644
index 0000000..cffca33
--- /dev/null
+++ b/python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/useProperty_after.py
@@ -0,0 +1,16 @@
+class A:
+    @property
+    def x(self):
+        return self._x
+
+    def __init__(self):
+        self._x = 1
+
+    def _foo(self):
+        print(self._x)
+
+a = A()
+a._foo()
+
+print(a.x)
+print(a.x)
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/dict.py b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/dict.py
new file mode 100644
index 0000000..8159da5
--- /dev/null
+++ b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/dict.py
@@ -0,0 +1 @@
+a = <warning descr="Format specifier character missing">"% <caret>test %"</warning> % ("x", 1)
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/dict_after.py b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/dict_after.py
new file mode 100644
index 0000000..93efb37
--- /dev/null
+++ b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/dict_after.py
@@ -0,0 +1 @@
+a = "%s test %d" % ("x", 1)
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/float.py b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/float.py
new file mode 100644
index 0000000..187e6c5
--- /dev/null
+++ b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/float.py
@@ -0,0 +1 @@
+a = <warning descr="Format specifier character missing">"t<caret>est %"</warning> % 1.
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/float_after.py b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/float_after.py
new file mode 100644
index 0000000..e549c09
--- /dev/null
+++ b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/float_after.py
@@ -0,0 +1 @@
+a = "test %d" % 1.
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/int.py b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/int.py
new file mode 100644
index 0000000..f1e4395
--- /dev/null
+++ b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/int.py
@@ -0,0 +1 @@
+a = <warning descr="Format specifier character missing">"test<caret> %"</warning> % 1
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/int_after.py b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/int_after.py
new file mode 100644
index 0000000..ccba7b2
--- /dev/null
+++ b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/int_after.py
@@ -0,0 +1 @@
+a = "test %d" % 1
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/missingValues.py b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/missingValues.py
new file mode 100644
index 0000000..e5e229f
--- /dev/null
+++ b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/missingValues.py
@@ -0,0 +1 @@
+a = <warning descr="Format specifier character missing">"% tes<caret>t %"</warning> % "x"
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/missingValues_after.py b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/missingValues_after.py
new file mode 100644
index 0000000..94d723b
--- /dev/null
+++ b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/missingValues_after.py
@@ -0,0 +1 @@
+a = "%s test %" % "x"
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/string.py b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/string.py
new file mode 100644
index 0000000..92862cd
--- /dev/null
+++ b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/string.py
@@ -0,0 +1 @@
+a = <warning descr="Format specifier character missing">"test<caret> %"</warning> % "x"
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/string_after.py b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/string_after.py
new file mode 100644
index 0000000..e6e8598
--- /dev/null
+++ b/python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/string_after.py
@@ -0,0 +1 @@
+a = "test %s" % "x"
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyCreatePropertyQuickFixTest/deleter.py b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/deleter.py
new file mode 100644
index 0000000..7adaa6d
--- /dev/null
+++ b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/deleter.py
@@ -0,0 +1,16 @@
+
+class C(object):
+    def __init__(self):
+        self._x = None
+
+    @property
+    def x(self):
+        """I'm the 'x' property."""
+        return self._x
+
+
+c = C()
+print(c.x)
+del <warning descr="Property 'x' cannot be deleted">c.<caret>x</warning>
+
+<warning descr="Property 'x' cannot be set">c.x</warning> = 1
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyCreatePropertyQuickFixTest/deleter_after.py b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/deleter_after.py
new file mode 100644
index 0000000..65cda04
--- /dev/null
+++ b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/deleter_after.py
@@ -0,0 +1,20 @@
+
+class C(object):
+    def __init__(self):
+        self._x = None
+
+    @property
+    def x(self):
+        """I'm the 'x' property."""
+        return self._x
+
+    @x.deleter
+    def x(self):
+        del self._x
+
+
+c = C()
+print(c.x)
+del c.x
+
+c.x = 1
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyCreatePropertyQuickFixTest/getter.py b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/getter.py
new file mode 100644
index 0000000..3a7ff09
--- /dev/null
+++ b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/getter.py
@@ -0,0 +1,14 @@
+
+class C(object):
+    def __init__(self):
+        self._x = None
+
+    @x.setter
+    def x(self, value):
+        self._x = value
+
+c = C()
+print(<warning descr="Property 'x' cannot be read">c.<caret>x</warning>)
+del <warning descr="Property 'x' cannot be deleted">c.x</warning>
+
+c.x = 1
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyCreatePropertyQuickFixTest/getter_after.py b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/getter_after.py
new file mode 100644
index 0000000..994e9ec
--- /dev/null
+++ b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/getter_after.py
@@ -0,0 +1,18 @@
+
+class C(object):
+    @property
+    def x(self):
+        return self._x
+
+    def __init__(self):
+        self._x = None
+
+    @x.setter
+    def x(self, value):
+        self._x = value
+
+c = C()
+print(c.x)
+del c.x
+
+c.x = 1
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyCreatePropertyQuickFixTest/setter.py b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/setter.py
new file mode 100644
index 0000000..2e53bef
--- /dev/null
+++ b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/setter.py
@@ -0,0 +1,15 @@
+
+class C(object):
+    def __init__(self):
+        self._x = None
+
+    @property
+    def x(self):
+        """I'm the 'x' property."""
+        return self._x
+
+c = C()
+print(c.x)
+del <warning descr="Property 'x' cannot be deleted">c.x</warning>
+
+<warning descr="Property 'x' cannot be set">c.<caret>x</warning> = 1
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyCreatePropertyQuickFixTest/setter_after.py b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/setter_after.py
new file mode 100644
index 0000000..70c0aff
--- /dev/null
+++ b/python/testData/quickFixes/PyCreatePropertyQuickFixTest/setter_after.py
@@ -0,0 +1,20 @@
+
+class C(object):
+    def __init__(self):
+        self._x = None
+
+    @property
+    def x(self):
+        """I'm the 'x' property."""
+        return self._x
+
+    @x.setter
+    def x(self, value):
+        self._x = value
+
+
+c = C()
+print(c.x)
+del c.x
+
+c.x = 1
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyMakePublicQuickFixTest/negative.py b/python/testData/quickFixes/PyMakePublicQuickFixTest/negative.py
new file mode 100644
index 0000000..c5c062f
--- /dev/null
+++ b/python/testData/quickFixes/PyMakePublicQuickFixTest/negative.py
@@ -0,0 +1,16 @@
+class A:
+    @property
+    def x(self):
+        return self._x
+
+    def __init__(self):
+        self._x = 1
+
+    def _foo(self):
+        print(self._x)
+
+a = A()
+a._foo()
+
+print(a.x)
+print(a.<caret>_x)
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyMakePublicQuickFixTest/positive.py b/python/testData/quickFixes/PyMakePublicQuickFixTest/positive.py
new file mode 100644
index 0000000..ebf3468
--- /dev/null
+++ b/python/testData/quickFixes/PyMakePublicQuickFixTest/positive.py
@@ -0,0 +1,11 @@
+class A:
+    def __init__(self):
+        self._x = 1
+
+    def _foo(self):
+        print(self._x)
+
+a = A()
+a._foo()
+
+print(a.<caret>_x)
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyMakePublicQuickFixTest/positive_after.py b/python/testData/quickFixes/PyMakePublicQuickFixTest/positive_after.py
new file mode 100644
index 0000000..747456f
--- /dev/null
+++ b/python/testData/quickFixes/PyMakePublicQuickFixTest/positive_after.py
@@ -0,0 +1,11 @@
+class A:
+    def __init__(self):
+        self.x = 1
+
+    def _foo(self):
+        print(self.x)
+
+a = A()
+a._foo()
+
+print(a.x)
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyMoveExceptQuickFixTest/exceptChain.py b/python/testData/quickFixes/PyMoveExceptQuickFixTest/exceptChain.py
new file mode 100644
index 0000000..a1e8335
--- /dev/null
+++ b/python/testData/quickFixes/PyMoveExceptQuickFixTest/exceptChain.py
@@ -0,0 +1,13 @@
+
+def foo():
+    pass
+
+
+try:
+    foo()
+except NameError:
+    pass
+except Exception:
+    pass
+except <warning descr="'NameError', superclass of exception class 'UnboundLocalError', has already been caught">UnboundLocalE<caret>rror</warning>:
+    pass
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyMoveExceptQuickFixTest/exceptChain_after.py b/python/testData/quickFixes/PyMoveExceptQuickFixTest/exceptChain_after.py
new file mode 100644
index 0000000..a9a46cb
--- /dev/null
+++ b/python/testData/quickFixes/PyMoveExceptQuickFixTest/exceptChain_after.py
@@ -0,0 +1,13 @@
+
+def foo():
+    pass
+
+
+try:
+    foo()
+except UnboundLocalError:
+    pass
+except NameError:
+    pass
+except Exception:
+    pass
diff --git a/python/testData/quickFixes/PyMoveExceptQuickFixTest/simple.py b/python/testData/quickFixes/PyMoveExceptQuickFixTest/simple.py
new file mode 100644
index 0000000..cfe4ca3
--- /dev/null
+++ b/python/testData/quickFixes/PyMoveExceptQuickFixTest/simple.py
@@ -0,0 +1,10 @@
+
+def foo():
+    pass
+
+try:
+    foo()
+except NameError:
+    pass
+except <warning descr="'NameError', superclass of exception class 'UnboundLocalError', has already been caught">Unbo<caret>undLocalError</warning>:
+    pass
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyMoveExceptQuickFixTest/simple_after.py b/python/testData/quickFixes/PyMoveExceptQuickFixTest/simple_after.py
new file mode 100644
index 0000000..9f466c0
--- /dev/null
+++ b/python/testData/quickFixes/PyMoveExceptQuickFixTest/simple_after.py
@@ -0,0 +1,10 @@
+
+def foo():
+    pass
+
+try:
+    foo()
+except UnboundLocalError:
+    pass
+except NameError:
+    pass
diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicate.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicate.py
new file mode 100644
index 0000000..e329d9a
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicate.py
@@ -0,0 +1,5 @@
+def foo(a, p):
+    pass
+
+
+foo(1, p=2, <warning descr="Duplicate argument">p=3<caret>3</warning>)
diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateArg.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateArg.py
new file mode 100644
index 0000000..3270242
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateArg.py
@@ -0,0 +1,8 @@
+def foo(*args):
+    pass
+
+a = ()
+b = ()
+foo(*a, <warning descr="Duplicate *arg">*<caret>b</warning>)
+
+
diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateArg_after.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateArg_after.py
new file mode 100644
index 0000000..6979b99
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateArg_after.py
@@ -0,0 +1,8 @@
+def foo(*args):
+    pass
+
+a = ()
+b = ()
+foo(*a)
+
+
diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateKWArg.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateKWArg.py
new file mode 100644
index 0000000..27180ea
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateKWArg.py
@@ -0,0 +1,9 @@
+
+def foo(**args):
+    pass
+
+a = {}
+b = {}
+foo(**a, <warning descr="Duplicate **arg">**<caret>b</warning>)
+
+
diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateKWArg_after.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateKWArg_after.py
new file mode 100644
index 0000000..e444da7
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateKWArg_after.py
@@ -0,0 +1,9 @@
+
+def foo(**args):
+    pass
+
+a = {}
+b = {}
+foo(**a)
+
+
diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicate_after.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicate_after.py
new file mode 100644
index 0000000..ec46da4
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicate_after.py
@@ -0,0 +1,5 @@
+def foo(a, p):
+    pass
+
+
+foo(1, p=2)
diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/postKwArg.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/postKwArg.py
new file mode 100644
index 0000000..f3bedbc
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/postKwArg.py
@@ -0,0 +1,7 @@
+def foo(a, **args):
+    pass
+
+b = {}
+foo(**b, <error descr="Cannot appear past keyword arguments or *arg or **kwarg">a<caret>=1</error>)
+
+
diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/postKwArg_after.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/postKwArg_after.py
new file mode 100644
index 0000000..8804b17
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/postKwArg_after.py
@@ -0,0 +1,7 @@
+def foo(a, **args):
+    pass
+
+b = {}
+foo(**b)
+
+
diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/unexpected.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/unexpected.py
new file mode 100644
index 0000000..82f42d3
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/unexpected.py
@@ -0,0 +1,7 @@
+
+def foo(a):
+    pass
+
+foo(1, <warning descr="Unexpected argument">2<caret>3</warning>)
+
+
diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/unexpected_after.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/unexpected_after.py
new file mode 100644
index 0000000..f663e08
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/unexpected_after.py
@@ -0,0 +1,7 @@
+
+def foo(a):
+    pass
+
+foo(1)
+
+
diff --git a/python/testData/quickFixes/PyRemoveAssignmentQuickFixTest/emptyFunction.py b/python/testData/quickFixes/PyRemoveAssignmentQuickFixTest/emptyFunction.py
new file mode 100644
index 0000000..be5b4c9
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveAssignmentQuickFixTest/emptyFunction.py
@@ -0,0 +1,4 @@
+def foo():
+    pass
+
+a = <caret>foo()
diff --git a/python/testData/quickFixes/PyRemoveAssignmentQuickFixTest/emptyFunction_after.py b/python/testData/quickFixes/PyRemoveAssignmentQuickFixTest/emptyFunction_after.py
new file mode 100644
index 0000000..e0bb827
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveAssignmentQuickFixTest/emptyFunction_after.py
@@ -0,0 +1,4 @@
+def foo():
+    pass
+
+foo()
diff --git a/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/first.py b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/first.py
new file mode 100644
index 0000000..88c3864
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/first.py
@@ -0,0 +1,2 @@
+
+a = {<warning descr="Dictionary contains duplicate keys 'x'">'<caret>x'</warning>:1, "y":2, <warning descr="Dictionary contains duplicate keys 'x'">'x'</warning>:1}
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/first_after.py b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/first_after.py
new file mode 100644
index 0000000..28111fd
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/first_after.py
@@ -0,0 +1,2 @@
+
+a = {"y":2, 'x':1}
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/inTheMiddle.py b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/inTheMiddle.py
new file mode 100644
index 0000000..1ed5736
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/inTheMiddle.py
@@ -0,0 +1,2 @@
+
+a = {<warning descr="Dictionary contains duplicate keys 'x'">'x'</warning>:1, "y":2, <warning descr="Dictionary contains duplicate keys 'x'">'x<caret>'</warning>:1,"c":2}
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/inTheMiddle_after.py b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/inTheMiddle_after.py
new file mode 100644
index 0000000..dd04c14
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/inTheMiddle_after.py
@@ -0,0 +1,2 @@
+
+a = {'x':1, "y":2, "c":2}
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/last.py b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/last.py
new file mode 100644
index 0000000..0e75add
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/last.py
@@ -0,0 +1,2 @@
+
+a = {<warning descr="Dictionary contains duplicate keys 'x'">'x'</warning>:1, "y":2, <warning descr="Dictionary contains duplicate keys 'x'">'x<caret>'</warning>:1}
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/last_after.py b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/last_after.py
new file mode 100644
index 0000000..9d3bcaf
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/last_after.py
@@ -0,0 +1,2 @@
+
+a = {'x':1, "y":2}
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyRemoveStatementQuickFixTest/lastStatement.py b/python/testData/quickFixes/PyRemoveStatementQuickFixTest/lastStatement.py
new file mode 100644
index 0000000..f24ddc3
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveStatementQuickFixTest/lastStatement.py
@@ -0,0 +1,4 @@
+class B(object):
+    def __init__(self): # error
+        print ""
+        <warning descr="Cannot return a value from __init__">return <caret>1</warning>
diff --git a/python/testData/quickFixes/PyRemoveStatementQuickFixTest/lastStatement_after.py b/python/testData/quickFixes/PyRemoveStatementQuickFixTest/lastStatement_after.py
new file mode 100644
index 0000000..a2d231f
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveStatementQuickFixTest/lastStatement_after.py
@@ -0,0 +1,3 @@
+class B(object):
+    def __init__(self): # error
+        print ""
diff --git a/python/testData/quickFixes/PyRemoveStatementQuickFixTest/only.py b/python/testData/quickFixes/PyRemoveStatementQuickFixTest/only.py
new file mode 100644
index 0000000..7b29962
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveStatementQuickFixTest/only.py
@@ -0,0 +1,3 @@
+class B(object):
+    def __init__(self): # error
+        <warning descr="Cannot return a value from __init__">return<caret> 1</warning>
diff --git a/python/testData/quickFixes/PyRemoveStatementQuickFixTest/only_after.py b/python/testData/quickFixes/PyRemoveStatementQuickFixTest/only_after.py
new file mode 100644
index 0000000..172d93a
--- /dev/null
+++ b/python/testData/quickFixes/PyRemoveStatementQuickFixTest/only_after.py
@@ -0,0 +1,3 @@
+class B(object):
+    def __init__(self): # error
+        pass
diff --git a/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/empty.py b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/empty.py
new file mode 100644
index 0000000..fdb0232
--- /dev/null
+++ b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/empty.py
@@ -0,0 +1,2 @@
+a = ()
+<warning descr="Tuples don't support item assignment">a[0] <caret>= 3</warning>
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/empty_after.py b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/empty_after.py
new file mode 100644
index 0000000..bb7e190
--- /dev/null
+++ b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/empty_after.py
@@ -0,0 +1,2 @@
+a = []
+a[0] = 3
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/parenthesized.py b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/parenthesized.py
new file mode 100644
index 0000000..35c7f43
--- /dev/null
+++ b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/parenthesized.py
@@ -0,0 +1,2 @@
+a = ("11",)
+<warning descr="Tuples don't support item assignment">a[0]<caret> = 3</warning>
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/parenthesized_after.py b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/parenthesized_after.py
new file mode 100644
index 0000000..7e86b06
--- /dev/null
+++ b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/parenthesized_after.py
@@ -0,0 +1,2 @@
+a = ["11", ]
+a[0] = 3
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/tupleExpression.py b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/tupleExpression.py
new file mode 100644
index 0000000..02325e4
--- /dev/null
+++ b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/tupleExpression.py
@@ -0,0 +1,2 @@
+a = "11",
+<warning descr="Tuples don't support item assignment">a[0] <caret>= 3</warning>
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/tupleExpression_after.py b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/tupleExpression_after.py
new file mode 100644
index 0000000..7e86b06
--- /dev/null
+++ b/python/testData/quickFixes/PyReplaceTupleWithListQuickFixTest/tupleExpression_after.py
@@ -0,0 +1,2 @@
+a = ["11", ]
+a[0] = 3
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/inFunction.py b/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/inFunction.py
new file mode 100644
index 0000000..881a594
--- /dev/null
+++ b/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/inFunction.py
@@ -0,0 +1,2 @@
+def foo():
+    raise <warning descr="Raising a string exception">"String"<caret> "String1"</warning>
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/inFunction_after.py b/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/inFunction_after.py
new file mode 100644
index 0000000..dbfcf87
--- /dev/null
+++ b/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/inFunction_after.py
@@ -0,0 +1,2 @@
+def foo():
+    raise Exception("String" "String1")
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/simple.py b/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/simple.py
new file mode 100644
index 0000000..0c6b602
--- /dev/null
+++ b/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/simple.py
@@ -0,0 +1 @@
+raise <warning descr="Raising a string exception">"Some<caret> String"</warning>
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/simple_after.py b/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/simple_after.py
new file mode 100644
index 0000000..9c7ddbf
--- /dev/null
+++ b/python/testData/quickFixes/PyWrapInExceptionQuickFixTest/simple_after.py
@@ -0,0 +1 @@
+raise Exception("Some String")
\ No newline at end of file
diff --git a/python/testData/quickFixes/RenameElementQuickFixTest/pep8.py b/python/testData/quickFixes/RenameElementQuickFixTest/pep8.py
new file mode 100644
index 0000000..10c7b33
--- /dev/null
+++ b/python/testData/quickFixes/RenameElementQuickFixTest/pep8.py
@@ -0,0 +1,2 @@
+def foo():
+    A<caret>BC = "test"
\ No newline at end of file
diff --git a/python/testData/quickFixes/RenameElementQuickFixTest/pep8Class.py b/python/testData/quickFixes/RenameElementQuickFixTest/pep8Class.py
new file mode 100644
index 0000000..8a22633
--- /dev/null
+++ b/python/testData/quickFixes/RenameElementQuickFixTest/pep8Class.py
@@ -0,0 +1,2 @@
+class a_<caret>b:
+    pass
\ No newline at end of file
diff --git a/python/testData/quickFixes/RenameElementQuickFixTest/pep8Class_after.py b/python/testData/quickFixes/RenameElementQuickFixTest/pep8Class_after.py
new file mode 100644
index 0000000..b3f1e94
--- /dev/null
+++ b/python/testData/quickFixes/RenameElementQuickFixTest/pep8Class_after.py
@@ -0,0 +1,2 @@
+class a:
+    pass
\ No newline at end of file
diff --git a/python/testData/quickFixes/RenameElementQuickFixTest/pep8Function.py b/python/testData/quickFixes/RenameElementQuickFixTest/pep8Function.py
new file mode 100644
index 0000000..7a358d7
--- /dev/null
+++ b/python/testData/quickFixes/RenameElementQuickFixTest/pep8Function.py
@@ -0,0 +1 @@
+def Fo<caret>o(): pass
\ No newline at end of file
diff --git a/python/testData/quickFixes/RenameElementQuickFixTest/pep8Function_after.py b/python/testData/quickFixes/RenameElementQuickFixTest/pep8Function_after.py
new file mode 100644
index 0000000..b77eecb
--- /dev/null
+++ b/python/testData/quickFixes/RenameElementQuickFixTest/pep8Function_after.py
@@ -0,0 +1 @@
+def a(): pass
\ No newline at end of file
diff --git a/python/testData/quickFixes/RenameElementQuickFixTest/pep8_after.py b/python/testData/quickFixes/RenameElementQuickFixTest/pep8_after.py
new file mode 100644
index 0000000..35d3edf
--- /dev/null
+++ b/python/testData/quickFixes/RenameElementQuickFixTest/pep8_after.py
@@ -0,0 +1,2 @@
+def foo():
+    a = "test"
\ No newline at end of file
diff --git a/python/testData/quickFixes/RenameElementQuickFixTest/protectedMember.py b/python/testData/quickFixes/RenameElementQuickFixTest/protectedMember.py
new file mode 100644
index 0000000..1ebf07a
--- /dev/null
+++ b/python/testData/quickFixes/RenameElementQuickFixTest/protectedMember.py
@@ -0,0 +1,14 @@
+
+
+class A:
+    def __init__(self):
+        self._x = 1
+
+    def _foo(self):
+        pass
+
+
+a_class = A()
+a_class._foo()
+print(a_class._<caret>x)
+
diff --git a/python/testData/quickFixes/RenameElementQuickFixTest/protectedMember_after.py b/python/testData/quickFixes/RenameElementQuickFixTest/protectedMember_after.py
new file mode 100644
index 0000000..8787320
--- /dev/null
+++ b/python/testData/quickFixes/RenameElementQuickFixTest/protectedMember_after.py
@@ -0,0 +1,14 @@
+
+
+class A:
+    def __init__(self):
+        self.a = 1
+
+    def _foo(self):
+        pass
+
+
+a_class = A()
+a_class._foo()
+print(a_class.a)
+
diff --git a/python/testData/quickFixes/RenameElementQuickFixTest/shadowingBuiltins.py b/python/testData/quickFixes/RenameElementQuickFixTest/shadowingBuiltins.py
new file mode 100644
index 0000000..fdbc5a5
--- /dev/null
+++ b/python/testData/quickFixes/RenameElementQuickFixTest/shadowingBuiltins.py
@@ -0,0 +1,2 @@
+def foo():
+    l<caret>en = 10
\ No newline at end of file
diff --git a/python/testData/quickFixes/RenameElementQuickFixTest/shadowingBuiltins_after.py b/python/testData/quickFixes/RenameElementQuickFixTest/shadowingBuiltins_after.py
new file mode 100644
index 0000000..d8335e5
--- /dev/null
+++ b/python/testData/quickFixes/RenameElementQuickFixTest/shadowingBuiltins_after.py
@@ -0,0 +1,2 @@
+def foo():
+    a = 10
\ No newline at end of file
diff --git a/python/testData/testRunner/dependentTests/test_my_class.py b/python/testData/testRunner/dependentTests/test_my_class.py
deleted file mode 100644
index 8c6a68e..0000000
--- a/python/testData/testRunner/dependentTests/test_my_class.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import unittest
-from testedCode.my_class import *
-
-class MyClassTest(unittest.TestCase):
-  def test_foo(self):
-    c = MyClass()
-    self.assertEquals("bar", c.foo())
diff --git a/python/testData/testRunner/doctests/test_empty.py b/python/testData/testRunner/doctests/test_empty.py
deleted file mode 100644
index e69de29..0000000
--- a/python/testData/testRunner/doctests/test_empty.py
+++ /dev/null
diff --git a/python/testData/testRunner/doctests/test_file.py b/python/testData/testRunner/doctests/test_file.py
deleted file mode 100644
index 3fd0252..0000000
--- a/python/testData/testRunner/doctests/test_file.py
+++ /dev/null
@@ -1,39 +0,0 @@
-def factorial(n):
-    """Return the factorial of n, an exact integer >= 0.
-
-    If the result is small enough to fit in an int, return an int.
-    Else return a long.
-
-    >>> [factorial(n) for n in range(6)]
-    [1, 1, 2, 6, 24, 120]
-    """
-
-    import math
-    if not n >= 0:
-        raise ValueError("n must be >= 0")
-    if math.floor(n) != n:
-        raise ValueError("n must be exact integer")
-    if n+1 == n:  # catch a value like 1e300
-        raise OverflowError("n too large")
-    result = 1
-    factor = 2
-    while factor <= n:
-        result *= factor
-        factor += 1
-    return result
-
-class FirstGoodTest:
-  """
-  >>> [factorial(n) for n in range(6)]
-  [1, 1, 2, 6, 24, 120]
-  """
-  def test_passes(self):
-    pass
-
-class SecondGoodTest:
-  def test_passes(self):
-    """
-    >>> [factorial(n) for n in range(6)]
-    [1, 1, 2, 6, 24, 120]
-    """
-    pass
\ No newline at end of file
diff --git a/python/testData/testRunner/testedCode/__init__.py b/python/testData/testRunner/testedCode/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/python/testData/testRunner/testedCode/__init__.py
+++ /dev/null
diff --git a/python/testData/testRunner/testedCode/my_class.py b/python/testData/testRunner/testedCode/my_class.py
deleted file mode 100644
index fbf4632..0000000
--- a/python/testData/testRunner/testedCode/my_class.py
+++ /dev/null
@@ -1,4 +0,0 @@
-class MyClass:
-  def foo(self):
-    return "bar"
-    
\ No newline at end of file
diff --git a/python/testData/testRunner/tests/.gitignore b/python/testData/testRunner/tests/.gitignore
deleted file mode 100644
index 6b468b6..0000000
--- a/python/testData/testRunner/tests/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.class
diff --git a/python/testData/testRunner/tests/subfolder/test2.py b/python/testData/testRunner/tests/subfolder/test2.py
deleted file mode 100644
index b2c21b2..0000000
--- a/python/testData/testRunner/tests/subfolder/test2.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import unittest
-
-class SubTest(unittest.TestCase):
-  def test_in_subfolder(self):
-    self.assertEquals("foo", "fo" + "o")
-
-    
\ No newline at end of file
diff --git a/python/testData/testRunner/tests/test1.py b/python/testData/testRunner/tests/test1.py
deleted file mode 100644
index 9b2ed16..0000000
--- a/python/testData/testRunner/tests/test1.py
+++ /dev/null
@@ -1,12 +0,0 @@
-import unittest
-
-class GoodTest(unittest.TestCase):
-  def test_passes(self):
-    self.assertEqual(2+2, 4)
-
-class BadTest(unittest.TestCase):
-  def test_fails(self):
-    self.assertEqual(2+2, 5)
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/python/testSrc/com/jetbrains/python/inspections/PyAbstractClassInspectionTest.java b/python/testSrc/com/jetbrains/python/inspections/PyAbstractClassInspectionTest.java
new file mode 100644
index 0000000..99da99b
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/inspections/PyAbstractClassInspectionTest.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.inspections;
+
+import com.jetbrains.python.fixtures.PyInspectionTestCase;
+import org.jetbrains.annotations.NotNull;
+
+public class PyAbstractClassInspectionTest extends PyInspectionTestCase {
+
+  public void testAbstract() {
+    doTest();
+  }
+
+  public void testOverriddenAsField() {
+    doTest();
+  }
+
+  @NotNull
+  @Override
+  protected Class<? extends PyInspection> getInspectionClass() {
+    return PyAbstractClassInspection.class;
+  }
+}
diff --git a/python/testSrc/com/jetbrains/python/inspections/PyAttributeOutsideInitInspectionTest.java b/python/testSrc/com/jetbrains/python/inspections/PyAttributeOutsideInitInspectionTest.java
index 7c8812f..de041b8 100644
--- a/python/testSrc/com/jetbrains/python/inspections/PyAttributeOutsideInitInspectionTest.java
+++ b/python/testSrc/com/jetbrains/python/inspections/PyAttributeOutsideInitInspectionTest.java
@@ -66,6 +66,10 @@
     doTest();
   }
 
+  public void testPrivateMethod() {
+    doTest();
+  }
+
   private void doTest() {
     myFixture.configureByFile("inspections/PyAttributeOutsideInitInspection/" + getTestName(true) + ".py");
     myFixture.enableInspections(PyAttributeOutsideInitInspection.class);
diff --git a/python/testSrc/com/jetbrains/python/inspections/PyPep8NamingInspectionTest.java b/python/testSrc/com/jetbrains/python/inspections/PyPep8NamingInspectionTest.java
index 0a32aa4..348a343 100644
--- a/python/testSrc/com/jetbrains/python/inspections/PyPep8NamingInspectionTest.java
+++ b/python/testSrc/com/jetbrains/python/inspections/PyPep8NamingInspectionTest.java
@@ -58,6 +58,10 @@
     doTest();
   }
 
+  public void testClassAttributes() {
+    doTest();
+  }
+
   public void testTest() {
     doTest();
   }
diff --git a/python/testSrc/com/jetbrains/python/inspections/PyProtectedMemberInspectionTest.java b/python/testSrc/com/jetbrains/python/inspections/PyProtectedMemberInspectionTest.java
index 36caa89..3c5969f 100644
--- a/python/testSrc/com/jetbrains/python/inspections/PyProtectedMemberInspectionTest.java
+++ b/python/testSrc/com/jetbrains/python/inspections/PyProtectedMemberInspectionTest.java
@@ -46,6 +46,14 @@
     doTest();
   }
 
+  public void testTest() {
+    doTest();
+  }
+
+  public void testNamedTuple() {
+    doTest();
+  }
+
   public void testModule() {
     myFixture.configureByFiles(getTestName(true) + ".py", "tmp.py");
     myFixture.enableInspections(PyProtectedMemberInspection.class);
diff --git a/python/testSrc/com/jetbrains/python/packaging/PyPackageTest.java b/python/testSrc/com/jetbrains/python/packaging/PyPackageTest.java
new file mode 100644
index 0000000..e7f1e23
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/packaging/PyPackageTest.java
@@ -0,0 +1,40 @@
+package com.jetbrains.python.packaging;
+
+import junit.framework.TestCase;
+import org.junit.Assert;
+
+import java.util.Collections;
+
+/**
+ * @author Ilya.Kazakevich
+ */
+public class PyPackageTest extends TestCase {
+
+  // http://legacy.python.org/dev/peps/pep-0386/
+  public void testIsAtLeastVersionNormal() throws Exception {
+    final PyPackage pyPackage = new PyPackage("somePackage", "1.2.3.4", null, Collections.<PyRequirement>emptyList());
+    Assert.assertTrue("Failed to check normal version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=1.2")));
+    Assert.assertTrue("Failed to check normal version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=1.2.3")));
+    Assert.assertTrue("Failed to check normal version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=1")));
+    Assert.assertTrue("Failed to check normal version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=1.2.3.4")));
+
+    Assert.assertFalse("Failed to check normal version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=1.2.3.4.5")));
+    Assert.assertFalse("Failed to check normal version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=2")));
+    Assert.assertFalse("Failed to check normal version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=2.2")));
+    Assert.assertFalse("Failed to check normal version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=1.9.1")));
+    Assert.assertFalse("Failed to check normal version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=1.2.3.5")));
+    Assert.assertFalse("Failed to check normal version", pyPackage.matches(PyRequirement.fromStringGuaranteed("PackageFoo>=1.2.3.4")));
+  }
+
+
+  public void testIsAtLeastVersionBeta() throws Exception {
+    final PyPackage pyPackage = new PyPackage("somePackage", "0.5a3", null, Collections.<PyRequirement>emptyList());
+    Assert.assertTrue("Failed to check alpha version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=0.4")));
+    Assert.assertTrue("Failed to check alpha version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage<=0.5")));
+    Assert.assertTrue("Failed to check alpha version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=0.5a")));
+
+    Assert.assertFalse("Failed to check alpha version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=0.6")));
+    Assert.assertFalse("Failed to check alpha version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=0.5.1")));
+    Assert.assertFalse("Failed to check alpha version", pyPackage.matches(PyRequirement.fromStringGuaranteed("somePackage>=1")));
+  }
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/AddCallSuperQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/AddCallSuperQuickFixTest.java
new file mode 100644
index 0000000..6ff97dc
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/AddCallSuperQuickFixTest.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyMissingConstructorInspection;
+
+@TestDataPath("$CONTENT_ROOT/../testData//quickFixes/AddCallSuperQuickFixTest/")
+public class AddCallSuperQuickFixTest extends PyQuickFixTestCase {
+
+  public void testOldStyle() {
+    doQuickFixTest(PyMissingConstructorInspection.class, PyBundle.message("QFIX.add.super"));
+  }
+
+  public void testNewStyle() {
+    doQuickFixTest(PyMissingConstructorInspection.class, PyBundle.message("QFIX.add.super"));
+  }
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyAddExceptionSuperClassQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyAddExceptionSuperClassQuickFixTest.java
new file mode 100644
index 0000000..b8a432d
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyAddExceptionSuperClassQuickFixTest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyExceptionInheritInspection;
+
+/**
+ * User: ktisha
+ */
+@TestDataPath("$CONTENT_ROOT/../testData//quickFixes/PyAddExceptionSuperClassQuickFixTest/")
+public class PyAddExceptionSuperClassQuickFixTest extends PyQuickFixTestCase {
+
+  public void testEmptySuperList() {
+    doQuickFixTest(PyExceptionInheritInspection.class, PyBundle.message("QFIX.NAME.add.exception.base"));
+  }
+
+  public void testNonEmptySuperList() {
+    doQuickFixTest(PyExceptionInheritInspection.class, PyBundle.message("QFIX.NAME.add.exception.base"));
+  }
+
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyAddPropertyForFieldQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyAddPropertyForFieldQuickFixTest.java
new file mode 100644
index 0000000..60e30d7
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyAddPropertyForFieldQuickFixTest.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.codeInsight.intention.IntentionAction;
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyProtectedMemberInspection;
+
+/**
+ * User: ktisha
+ */
+@TestDataPath("$CONTENT_ROOT/../testData/quickFixes/PyAddPropertyForFieldQuickFixTest")
+public class PyAddPropertyForFieldQuickFixTest extends PyQuickFixTestCase {
+  public void testProtectedMember() {
+    doQuickFixTest(PyProtectedMemberInspection.class, PyBundle.message("QFIX.add.property"));
+  }
+
+  public void testUseProperty() {
+    doQuickFixTest(PyProtectedMemberInspection.class, PyBundle.message("QFIX.use.property"));
+  }
+
+  public void testProtectedFunction() {
+    final String testFileName = getTestName(true);
+    myFixture.enableInspections(PyProtectedMemberInspection.class);
+    myFixture.configureByFile(testFileName + ".py");
+    myFixture.checkHighlighting(true, false, false);
+    final IntentionAction intentionAction = myFixture.getAvailableIntention(PyBundle.message("QFIX.add.property"));
+    assertNull(intentionAction);
+  }
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyAddSpecifierToFormatQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyAddSpecifierToFormatQuickFixTest.java
new file mode 100644
index 0000000..d7cc291
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyAddSpecifierToFormatQuickFixTest.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyStringFormatInspection;
+
+@TestDataPath("$CONTENT_ROOT/../testData//quickFixes/PyAddSpecifierToFormatQuickFixTest/")
+public class PyAddSpecifierToFormatQuickFixTest extends PyQuickFixTestCase {
+
+  public void testString() {
+    doQuickFixTest(PyStringFormatInspection.class, PyBundle.message("QFIX.NAME.add.specifier"));
+  }
+
+  public void testInt() {
+    doQuickFixTest(PyStringFormatInspection.class, PyBundle.message("QFIX.NAME.add.specifier"));
+  }
+
+  public void testFloat() {
+    doQuickFixTest(PyStringFormatInspection.class, PyBundle.message("QFIX.NAME.add.specifier"));
+  }
+
+  public void testDict() {
+    doQuickFixTest(PyStringFormatInspection.class, PyBundle.message("QFIX.NAME.add.specifier"));
+  }
+
+  public void testMissingValues() {
+    doQuickFixTest(PyStringFormatInspection.class, PyBundle.message("QFIX.NAME.add.specifier"));
+  }
+
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyCreatePropertyQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyCreatePropertyQuickFixTest.java
new file mode 100644
index 0000000..38fb91b
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyCreatePropertyQuickFixTest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyPropertyAccessInspection;
+
+@TestDataPath("$CONTENT_ROOT/../testData/quickFixes/PyCreatePropertyQuickFixTest")
+public class PyCreatePropertyQuickFixTest extends PyQuickFixTestCase {
+  public void testSetter() {
+    doQuickFixTest(PyPropertyAccessInspection.class, PyBundle.message("QFIX.create.property"));
+  }
+
+  public void testDeleter() {
+    doQuickFixTest(PyPropertyAccessInspection.class, PyBundle.message("QFIX.create.property"));
+  }
+
+  public void testGetter() {
+    doQuickFixTest(PyPropertyAccessInspection.class, PyBundle.message("QFIX.create.property"));
+  }
+
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyMakePublicQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyMakePublicQuickFixTest.java
new file mode 100644
index 0000000..fb1a6c8
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyMakePublicQuickFixTest.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.codeInsight.intention.IntentionAction;
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyProtectedMemberInspection;
+
+@TestDataPath("$CONTENT_ROOT/../testData/quickFixes/PyMakePublicQuickFixTest")
+public class PyMakePublicQuickFixTest extends PyQuickFixTestCase {
+  public void testPositive() {
+    doQuickFixTest(PyProtectedMemberInspection.class, PyBundle.message("QFIX.make.public"));
+  }
+
+  public void testNegative() {
+    final String testFileName = getTestName(true);
+    myFixture.enableInspections(PyProtectedMemberInspection.class);
+    myFixture.configureByFile(testFileName + ".py");
+    myFixture.checkHighlighting(true, false, false);
+    final IntentionAction intentionAction = myFixture.getAvailableIntention(PyBundle.message("QFIX.make.public"));
+    assertNull(intentionAction);
+  }
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyMoveExceptQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyMoveExceptQuickFixTest.java
new file mode 100644
index 0000000..1525e47
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyMoveExceptQuickFixTest.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyExceptClausesOrderInspection;
+
+@TestDataPath("$CONTENT_ROOT/../testData//quickFixes/PyMoveExceptQuickFixTest/")
+public class PyMoveExceptQuickFixTest extends PyQuickFixTestCase {
+
+  public void testSimple() {
+    doQuickFixTest(PyExceptClausesOrderInspection.class, "Move except clause up");
+  }
+
+  public void testExceptChain() {
+    doQuickFixTest(PyExceptClausesOrderInspection.class, "Move except clause up");
+  }
+
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveArgumentQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveArgumentQuickFixTest.java
new file mode 100644
index 0000000..71a0c08
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveArgumentQuickFixTest.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyArgumentListInspection;
+
+@TestDataPath("$CONTENT_ROOT/../testData/quickFixes/PyRemoveArgumentQuickFixTest/")
+public class PyRemoveArgumentQuickFixTest extends PyQuickFixTestCase {
+
+  public void testDuplicate() {
+    doQuickFixTest(PyArgumentListInspection.class, PyBundle.message("QFIX.NAME.remove.argument"));
+  }
+
+  public void testDuplicateArg() {
+    doQuickFixTest(PyArgumentListInspection.class, PyBundle.message("QFIX.NAME.remove.argument"));
+  }
+
+  public void testDuplicateKWArg() {
+    doQuickFixTest(PyArgumentListInspection.class, PyBundle.message("QFIX.NAME.remove.argument"));
+  }
+
+  public void testPostKwArg() {
+    doQuickFixTest(PyArgumentListInspection.class, PyBundle.message("QFIX.NAME.remove.argument"));
+  }
+
+  public void testUnexpected() {
+    doQuickFixTest(PyArgumentListInspection.class, PyBundle.message("QFIX.NAME.remove.argument"));
+  }
+
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveAssignmentQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveAssignmentQuickFixTest.java
new file mode 100644
index 0000000..c6cfa22
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveAssignmentQuickFixTest.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyNoneFunctionAssignmentInspection;
+
+@TestDataPath("$CONTENT_ROOT/../testData//quickFixes/PyRemoveAssignmentQuickFixTest/")
+public class PyRemoveAssignmentQuickFixTest extends PyQuickFixTestCase {
+
+  public void testEmptyFunction() {
+    doQuickFixTest(PyNoneFunctionAssignmentInspection.class, PyBundle.message("QFIX.NAME.remove.assignment"));
+  }
+
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveDictKeyQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveDictKeyQuickFixTest.java
new file mode 100644
index 0000000..4f9ce87
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveDictKeyQuickFixTest.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyDictDuplicateKeysInspection;
+
+@TestDataPath("$CONTENT_ROOT/../testData//quickFixes/PyRemoveDictKeyQuickFixTest/")
+public class PyRemoveDictKeyQuickFixTest extends PyQuickFixTestCase {
+
+  public void testFirst() {
+    doQuickFixTest(PyDictDuplicateKeysInspection.class, PyBundle.message("QFIX.NAME.remove.dict.key"));
+  }
+
+  public void testLast() {
+    doQuickFixTest(PyDictDuplicateKeysInspection.class, PyBundle.message("QFIX.NAME.remove.dict.key"));
+  }
+
+  public void testInTheMiddle() {
+    doQuickFixTest(PyDictDuplicateKeysInspection.class, PyBundle.message("QFIX.NAME.remove.dict.key"));
+  }
+
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveStatementQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveStatementQuickFixTest.java
new file mode 100644
index 0000000..846221f
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyRemoveStatementQuickFixTest.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyReturnFromInitInspection;
+
+@TestDataPath("$CONTENT_ROOT/../testData//quickFixes/PyRemoveStatementQuickFixTest/")
+public class PyRemoveStatementQuickFixTest extends PyQuickFixTestCase {
+
+  public void testOnly() {
+    doQuickFixTest(PyReturnFromInitInspection.class, PyBundle.message("QFIX.NAME.remove.statement"));
+  }
+
+  public void testLastStatement() {
+    doQuickFixTest(PyReturnFromInitInspection.class, PyBundle.message("QFIX.NAME.remove.statement"));
+  }
+
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyReplaceTupleWithListQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyReplaceTupleWithListQuickFixTest.java
new file mode 100644
index 0000000..3a911f2
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyReplaceTupleWithListQuickFixTest.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyTupleItemAssignmentInspection;
+
+@TestDataPath("$CONTENT_ROOT/../testData/quickFixes/PyReplaceTupleWithListQuickFixTest/")
+public class PyReplaceTupleWithListQuickFixTest extends PyQuickFixTestCase {
+
+  public void testParenthesized() {
+    doQuickFixTest(PyTupleItemAssignmentInspection.class, PyBundle.message("QFIX.NAME.make.list"));
+  }
+
+  public void testEmpty() {
+    doQuickFixTest(PyTupleItemAssignmentInspection.class, PyBundle.message("QFIX.NAME.make.list"));
+  }
+
+  public void testTupleExpression() {
+    doQuickFixTest(PyTupleItemAssignmentInspection.class, PyBundle.message("QFIX.NAME.make.list"));
+  }
+
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/PyWrapInExceptionQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/PyWrapInExceptionQuickFixTest.java
new file mode 100644
index 0000000..9a27079
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/PyWrapInExceptionQuickFixTest.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyBundle;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyStringExceptionInspection;
+
+@TestDataPath("$CONTENT_ROOT/../testData/quickFixes/PyWrapInExceptionQuickFixTest/")
+public class PyWrapInExceptionQuickFixTest extends PyQuickFixTestCase {
+
+  public void testSimple() {
+    doQuickFixTest(PyStringExceptionInspection.class, PyBundle.message("QFIX.NAME.wrap.in.exception"));
+  }
+
+  public void testInFunction() {
+    doQuickFixTest(PyStringExceptionInspection.class, PyBundle.message("QFIX.NAME.wrap.in.exception"));
+  }
+}
diff --git a/python/testSrc/com/jetbrains/python/quickFixes/RenameElementQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/RenameElementQuickFixTest.java
new file mode 100644
index 0000000..5a63b49
--- /dev/null
+++ b/python/testSrc/com/jetbrains/python/quickFixes/RenameElementQuickFixTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.jetbrains.python.quickFixes;
+
+import com.intellij.testFramework.TestDataPath;
+import com.jetbrains.python.PyQuickFixTestCase;
+import com.jetbrains.python.inspections.PyPep8NamingInspection;
+import com.jetbrains.python.inspections.PyProtectedMemberInspection;
+import com.jetbrains.python.inspections.PyShadowingBuiltinsInspection;
+
+/**
+ * User: ktisha
+ */
+@TestDataPath("$CONTENT_ROOT/../testData//quickFixes/RenameElementQuickFixTest/")
+public class RenameElementQuickFixTest extends PyQuickFixTestCase {
+
+  public void testProtectedMember() {
+    doQuickFixTest(PyProtectedMemberInspection.class, "Rename element");
+  }
+
+  public void testPep8() {
+    doQuickFixTest(PyPep8NamingInspection.class, "Rename element");
+  }
+
+  public void testPep8Class() {
+    doQuickFixTest(PyPep8NamingInspection.class, "Rename element");
+  }
+
+  public void testPep8Function() {
+    doQuickFixTest(PyPep8NamingInspection.class, "Rename element");
+  }
+
+  public void testShadowingBuiltins() {
+    doQuickFixTest(PyShadowingBuiltinsInspection.class, "Rename element");
+  }
+
+}
diff --git a/python/testSrc/com/jetbrains/python/testRunner/PyDocTestRunnerTest.java b/python/testSrc/com/jetbrains/python/testRunner/PyDocTestRunnerTest.java
deleted file mode 100644
index d2afbbf..0000000
--- a/python/testSrc/com/jetbrains/python/testRunner/PyDocTestRunnerTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright 2000-2013 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.jetbrains.python.testRunner;
-
-import com.intellij.execution.ExecutionException;
-import com.intellij.execution.process.ProcessOutput;
-import com.intellij.openapi.util.text.StringUtil;
-import com.intellij.testFramework.LightPlatformTestCase;
-import com.intellij.util.ArrayUtil;
-import com.jetbrains.python.PythonTestUtil;
-import com.jetbrains.python.fixtures.PyTestCase;
-import com.jetbrains.python.testing.JythonUnitTestUtil;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * User: catherine
- */
-public class PyDocTestRunnerTest extends LightPlatformTestCase {
-  @SuppressWarnings({"JUnitTestCaseWithNonTrivialConstructors"})
-  public PyDocTestRunnerTest() {
-    PyTestCase.initPlatformPrefix();
-  }
-
-  public void testEmptySuite() throws ExecutionException {
-    final File testDir = getTestDataDir();
-    File testFile = new File(testDir, "test_empty.py");
-    String[] result = runUTRunner(testDir.getPath(), testFile.getPath());
-    assertEquals("##teamcity[enteredTheMatrix]", result [0]);
-    assertEquals("##teamcity[testCount count='0']", result [1]);
-  }
-
-  public void testFile() throws ExecutionException {
-    final File testDir = getTestDataDir();
-    File testFile = new File(testDir, "test_file.py");
-    String[] result = runUTRunner(testDir.getPath(), testFile.getPath());
-    assertEquals(StringUtil.join(result, "\n"), 14, result.length);
-    assertEquals("##teamcity[testCount count='3']", result [1]);
-    assertTrue(result[2].contains("name='test_file.FirstGoodTest'"));
-  }
-
-  private static File getTestDataDir() {
-    return new File(PythonTestUtil.getTestDataPath(), "/testRunner/doctests");
-  }
-
-  public void testClass() throws ExecutionException {
-    final File testDir = getTestDataDir();
-    File testFile = new File(testDir, "test_file.py");
-    String[] result = runUTRunner(testDir.getPath(), testFile.getPath() + "::FirstGoodTest");
-    assertEquals(StringUtil.join(result, "\n"), 6, result.length);
-  }
-
-  public void testMethod() throws ExecutionException {
-    final File testDir = getTestDataDir();
-    File testFile = new File(testDir, "test_file.py");
-    String[] result = runUTRunner(testDir.getPath(), testFile.getPath() + "::SecondGoodTest::test_passes");
-    assertEquals(StringUtil.join(result, "\n"), 6, result.length);
-  }
-
-  public void testFunction() throws ExecutionException {
-    final File testDir = getTestDataDir();
-    File testFile = new File(testDir, "test_file.py");
-    String[] result = runUTRunner(testDir.getPath(), testFile.getPath() + "::factorial");
-    assertEquals(StringUtil.join(result, "\n"), 6, result.length);
-  }
-
-  private static String[] runUTRunner(String workDir, String... args) throws ExecutionException {
-    String helpersPath = PyTestCase.getHelpersPath();
-    File utRunner = new File(helpersPath, "pycharm/docrunner.py");
-    List<String> allArgs = new ArrayList<String>();
-    allArgs.add(utRunner.getPath());
-    Collections.addAll(allArgs, args);
-    final ProcessOutput output = JythonUnitTestUtil.runJython(workDir, helpersPath, ArrayUtil.toStringArray(allArgs));
-    assertEquals(output.getStderr(), 0, splitLines(output.getStderr()).length);
-    return splitLines(output.getStdout());
-  }
-
-  private static String[] splitLines(final String out) {
-    List<String> result = new ArrayList<String>();
-    final String[] lines = StringUtil.convertLineSeparators(out).split("\n");
-    for (String line : lines) {
-      if (line.length() > 0 && !line.contains("*sys-package-mgr*")) {
-        result.add(line);
-      }
-    }
-    return ArrayUtil.toStringArray(result);
-  }
-}
diff --git a/python/testSrc/com/jetbrains/python/testRunner/PyTestRunnerTest.java b/python/testSrc/com/jetbrains/python/testRunner/PyTestRunnerTest.java
deleted file mode 100644
index 9bdebbd..0000000
--- a/python/testSrc/com/jetbrains/python/testRunner/PyTestRunnerTest.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2000-2013 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.jetbrains.python.testRunner;
-
-import com.intellij.execution.ExecutionException;
-import com.intellij.execution.process.ProcessOutput;
-import com.intellij.openapi.application.PathManager;
-import com.intellij.openapi.util.text.StringUtil;
-import com.intellij.testFramework.LightPlatformTestCase;
-import com.intellij.util.ArrayUtil;
-import com.jetbrains.python.PythonTestUtil;
-import com.jetbrains.python.fixtures.PyTestCase;
-import com.jetbrains.python.testing.JythonUnitTestUtil;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author yole
- */
-public class PyTestRunnerTest extends LightPlatformTestCase {
-  @SuppressWarnings({"JUnitTestCaseWithNonTrivialConstructors"})
-  public PyTestRunnerTest() {
-    PyTestCase.initPlatformPrefix();
-  }
-
-  public void testEmptySuite() throws ExecutionException {
-    String[] result = runUTRunner(PathManager.getHomePath(), "true");
-    assertEquals("##teamcity[testCount count='0']", result [1]);
-  }
-
-  public void testFile() throws ExecutionException {
-    final File testDir = getTestDataDir();
-    File testFile = new File(testDir, "test1.py");
-    String[] result = runUTRunner(testDir.getPath(), testFile.getPath(), "true");
-    assertEquals(StringUtil.join(result, "\n"), 11, result.length);
-    assertEquals("##teamcity[enteredTheMatrix]", result [0]);
-    assertEquals("##teamcity[testCount count='2']", result [1]);
-    assertTrue(result[2].endsWith("test1.BadTest' name='test1.BadTest']"));
-    assertTrue(result[3].endsWith("test1.BadTest.test_fails' name='test_fails']"));
-    assertTrue(result [4], result[4].startsWith("##teamcity[testFailed") && result [4].contains("name='test_fails'"));
-  }
-
-  private static File getTestDataDir() {
-    return new File(PythonTestUtil.getTestDataPath(), "/testRunner/tests");
-  }
-
-  public void testClass() throws ExecutionException {
-    final File testDir = getTestDataDir();
-    File testFile = new File(testDir, "test1.py");
-    String[] result = runUTRunner(testDir.getPath(), testFile.getPath() + "::GoodTest", "true");
-    assertEquals(StringUtil.join(result, "\n"), 6, result.length);
-  }
-
-  public void testMethod() throws ExecutionException {
-    final File testDir = getTestDataDir();
-    File testFile = new File(testDir, "test1.py");
-    String[] result = runUTRunner(testDir.getPath(), testFile.getPath() + "::GoodTest::test_passes", "true");
-    assertEquals(StringUtil.join(result, "\n"), 6, result.length);
-  }
-
-  public void testFolder() throws ExecutionException {
-    final File testDir = getTestDataDir();
-    String[] result = runUTRunner(testDir.getPath(), testDir.getPath() + "/", "true");
-    assertEquals(StringUtil.join(result, "\n"), 15, result.length);
-  }
-
-  public void testDependent() throws ExecutionException {
-    final File testDir = new File(PythonTestUtil.getTestDataPath(), "testRunner");
-    String[] result = runUTRunner(testDir.getPath(), new File(testDir, "dependentTests/test_my_class.py").getPath(), "true");
-    assertEquals(StringUtil.join(result, "\n"), 6, result.length);
-  }
-
-  private static String[] runUTRunner(String workDir, String... args) throws ExecutionException {
-    File helpersDir = new File(PyTestCase.getHelpersPath());
-    File utRunner = new File(helpersDir, "pycharm/utrunner.py");
-    List<String> allArgs = new ArrayList<String>();
-    allArgs.add(utRunner.getPath());
-    Collections.addAll(allArgs, args);
-    final ProcessOutput output = JythonUnitTestUtil.runJython(workDir, helpersDir.getPath(), ArrayUtil.toStringArray(allArgs));
-    assertEquals(output.getStderr(), 0, splitLines(output.getStderr()).length);
-    return splitLines(output.getStdout());
-  }
-
-  private static String[] splitLines(final String out) {
-    List<String> result = new ArrayList<String>();
-    final String[] lines = StringUtil.convertLineSeparators(out).split("\n");
-    for (String line : lines) {
-      if (line.length() > 0 && !line.contains("*sys-package-mgr*")) {
-        result.add(line);
-      }
-    }
-    return ArrayUtil.toStringArray(result);
-  }
-}