Refactor Repositories into Adapters