Code improvements to follow jQuery plugin pattern with options and public methods.
Callback support added.