converted unit tests to XCTest; cleaned up test code.