merged conflicts with trevors stuff (mostly ModalInstanceCtrl)