Fixed all the errors the auto-refactor from pycharm produced
Fixed the last errors produced by the IDE refactor
Merge pull request #1 from DaniMunin/master

Fixed refactoring bugs