Removed redundant checks, getURLForProtocol -> getURL