Code refactoring: added createMenu() function