Modularise templating