Refactor project form, clean up tests