Refactor menu items helper