Import initial workable code
Make sure the callback to be callable
Use type hinting to ensure argument type
Use the current path if no path is given
Remove trailing slash from URL path query
Implement Drupal-like module functionality
Introduce 'weight' attribute to the router

If there are more than one router available for the given path, choose
the one with highest weight.