Added autoloader to allow scripts to hook themselves into the page load safely