template cleanup, validation testing