Fixed pep8 issues, nits and removed unused variable.