Code refactoring: added createMenu() function
Fixed merge with master