First shot at optimizing page load

none of these changes live in BSD, can likely remove these changes