Use templates to inject boilerplate code