Cleaned up code to adhere to PEP8 standards