Improved setRouting() method.