Refactored routes.js into smaller files