Currently there is lots of poor inline bash in the templates. This should go into scripts, many of which can be shared between templates. This should be done after * #71 I was thinking we could use [SpecKitty](https://github.com/Priivacy-ai/spec-kitty) to specify and then implement this work.