Removed obsolete code, corrected pep8 issues