Extended the Router class adds new functionalities while keeping the global performance impact low