Added debug, fixed iterators and YAML