[cfid-598] Heavy refactoring of Yaml reading