cleaned up some code around forms and modals