Updaten menu, refactoring code (broken version)