Minor refactor of route processing file