fixes for packageLoader.js and related files.  Testing shows that packages will load up to the point of main.js and the execution of init();
Finished the new packageLoader.js