Refactor methods + visibility of menu and panel