Add document's history management