Template and filename fixes