lowercase all references in the document