refactored projectscontroller and tests slightly