Port to the remove-define-mhandler 8sync branch