Refactor /util/UrlManager.php