Refactor: Change Document to Repository.