Removed jQuery dependancy and use of gloabl for settings.