moved the routes from app.js to the routes/index.js file
cleaned up the error logging