Update jQuery plugin and betther the code