Removed all references to node.parentElement

Internet Explorer 11 does not support this property on HTML nodes.