Readjusted main menu component to make it more object oriented