Create a DSL extension to reuse parts of code. This will allow to avoid too templates consisting of repetitive code.