Update to form to use non deprecated menu item and properly dispose on exit