Cleaned up the code to be PEP8 compliant