fixed yaml UTF8-read errors, improved code structure
fixed yaml UTF8-read errors, improved code structure