Fixed up the messy templates