More templates and preprocessing