Updated cordova plugins + bugfixes

Updated cordova plugins and adapted the code.
Minor bugfixes.