Simplify reset function