Refactored new code to be PEP8 compliant