Refactor menu_action.c