added some comments and additional key and mouse callbacks for the menu