Fix the generator

Since the change from JSON to YML, this generator is broken. Update the code to make it work.
Thanks both, I'll make these fixes and rebase