Adding support for YAML. It is more user-friendly to configure

Other fixes also.