Fix templating bug and format inconsistencies
Add deployment as attribute to template