Tidied up the GetDocument methods by using optional arguments. See 31ae025756f2d3df8a126ffa864a6769da7b143e for the original commit that doesn't use optional arguments.