Update to module format

plugin updated to create pagers object in window scope, this allows for
access to the update function from outside the plugin