Added reset and changed history storage to array