Added unit tests for controller and routing system