Make routing logic configurable