Added methods for AncestorOrSelf, ParentOrSelf, Ancestor