Brought all the plugin api calls into a standard windows.plugin.xxx.xxx();

No more domLibrary type calls, all code within the (function(cordova)