Added ability to dismiss toolbar menu item by clicking again and minor code cleanup.