Uncomment init_menu fuction
Simplify and reformat code