a little tidying up
tweaking and working on unit tests.