Refactored code to pep-8 (about halfway), pythonic improvements