Initial cleanup and update to tests to use JUnit