factory for form and form edit, remove all the mess from the forms