Refactored Menu control code into helper class so that it is reusable for other activities with menus.