Clean up how template are used.