updating callbacks to include reference to popup window and allow cancellation of default action.