WIP refactor routing loader to be more flexible and maintenable