More refactoring, move widget initialization sooner, move event handlers past phonegap ready.  Also add icon stuff for running in app mode in the browser.