Simplified expressions & removed unreachable code
Making PEP8 happy

* No major stuff here
* Added and removed some lines between classes and functions
* Renamed some variables so that they are clearer to read
* Removed redundant brackets
* simple cleanups