Improve the jQuery plugin implementation