Removed some redundancies; Added sorting of menu items