Fixing pep8 errors, updating style, removing unused variables