Added some tests and pep8-ified files