add pylama to tests and fix up code, closes #20