moved some manual tests to unit tests and greatly refactored the manual test suite