removed duplicated form code by refactoring the new and edit views to use a partial and updated tests