minor improvements in templates