Separation of route logic