Fixed old test cases to work with new implementation; ready to add new tests.