refactor forms and adds edit actions