Feature/test suite

Steve - please can you check my Python.
All `defs` and `classes` should have docstrings unless they are super self-evident (like `__init__` - but even then it helps to say what it is going to do)