Added routing. The routing logic is now the controlling logic.