Assorted template fixes