Clean the template smart event

and the template command too