Cleanup YAML parsing and dumping.