Updated docs, cleaned up the code and unit tests.