Moved all test code to test suite, all tests pass