Implemented better integration with PyYAML