More formatting fixes on templates