Refactored routes handlers