Pyflakes etc and using functions rather than objects
Got to the point that all tests pass.