Updated codebase

Made style changes to be more inline with PEP 8. Removed excess whitespace, improved comments, removed unused lines, added minor clarifications