Refactoring of FirstChild and GetChildInLeaf