Added main menu and fixed refresh