Restructuring javascript to fix for slow content loads and make the page redraw process a little easier.