modularize and fix create res form

put functions for create res and create event in factories
commenting stuff back in