Refactor projects into model