Basic routing logic.