fixing bugs with appending data, ensuring document gets new ID on reload to clear local data