Refactored port-repository.