Split main.js into views.js, models.js, and routes.js files