Fix bug in user default handling. Add unit tests for project model