Optimized the menu class