rename functions to conform common style
adding more tests for checking 'template contents must be a
DocumentFragment'