[1/2] Refactor IURIHandler and EnderRedirector to be more re-useable and cleaner.