How to use templates and still keep your sanity