Split "project" implementation so it can be tested. Added some project specs.