Fixing pep8 issues and minor changes