Clean up line lengths and factor out looking up urls in XML documents.