Straighten out templates