Updated most of the test code; more to come