doc tweaks and adding in the document referrer as a std parameter