Deselects the selected item when new button is clicked. Updated coding style.