Debug code and tweaks to support NOT loading from a URL