Updated tests and pep8 compliance