more tests and refactoring
added test for ProjectExists.