Fixing the add / edit project form to make the reference field validation more intelligent. Fixes #19