Added more CoreService unit tests and in the process discoverd and fixed
several implementation problems.