Some of the bindings in those function should only happen when the widget is loaded. The stuff that is run every time the modal is opened should be limited to rendering templates, setting up validation on forms, etc.