Resolve PEP8 issues, streamline code. Passes all tests.