moved all phonegap stuff to toplevel