Update Main Document