Improved structure following jQuery recomendations. Added some methods.