Added factory reset function (clear)