started work on the menu page, reorganizing code