Code cleaned up, comments added, and PEP8
Fix syntax, clean up