Improved click events so the icons can be closed on click as well