Various improvements to handling and detection of URLs in codes