Added some event handling and css changes