Changes to the menu structure and a function to limit the input

Please review my changes.