This is a better clearing function