cleaned up route.js a bit