Code Cleanup (PEP8)
Cleanup and remove duplicated code