unit tests, documentation and minor bug fixes for XCScheme