Various updates for better inheritance

Hi i have made a couple of changes to allow for better inheritance . (around the namespacing of the events) 

I have also added callbacks for the show and hide methods.

I have also added in a close icon functionality.