Added firstchild and hasfirstchild modifier