Fixes #4749
See #4751
See #4616
Having them in separate files should make maintainance easier. When adding new or making changes to the templates: ```bash mage generate ``` This will get the Go code in sync. Fixes #4457