Modified index.js with routes