PEP 8 cleanup

Cleaned up the code to better adhere to the PEP 8 style guide.