Reworked resource loading to take full control of the page.