Separated the plugin from the rest of the javascript.