Refactored routes to use controllers