Deleted unused lines, corrected to be valid for pep8, cleaned code a little bit