Added close button and hiding events.