Template clean up.