Refactored some functions related to URL manipulations for proxies.
Started to replace hard-coded proxied app support with plugins.