refactored create and update screens to use the same form code and added editing functionality