Add tests and PEP-8