Finished writing (almost) all unit tests, 97% code coverage.

Now new features can be developed