(Menu) Refactor menu_defer_core to make it have less dependencies