cleaning termplates in register