phone gap plugins and some other small changes
refactoring and a bunch of stuff that should have probably been seperate commits