Refactored to follow PEP8