Add reset() function to clear local data