[DF-4571] big refactor of YamlNode.