Improved YAML parsing

This seems to work. 8e795b5 will be removed and a246d26 will be modified to use the forthcoming YAML modifications. c3c8791 will also need a closer look. I'm not convinced that regex is exhaustive.
Doing the transform by hand allows me to warn when someone uses '-' vs '_' (disabled right now) and will allow my to record the original name (for more accurate error reporting).