modal window now only submits with required fields, some refactoring of controllers