refactoring MenuGenerator