Refactor documents collections.