Code cleanup, PEP8 compliance

Cleaned up some code, ran PEP8 on some. Renamed some files.