Refactored and simplified code
Corrected menu display