More template-related cleanup