Removed the Referer and Document Support since it was not in the original code. Used for pull request only.