Refactored routes into controllers.