Fixed all the errors the auto-refactor from pycharm produced
Fixed the last errors produced by the IDE refactor