refactored pretty much everything so its a proper jQuery plugin and there is no unused code