Updated readme, cleaned up code in unit tests.