Moved yaml parsing to one location