Template cleanup.