Major revisions. Added 'new project' functions.