PEP8

Reformatting/refactoring to conform to PEP8.