Moved remaining js out over index.php and over to js/core.js