refactoring and functional menu
Merge branch 'menu'