Removed some smells from core.js
Fixed route loading