Refactors Customer Repository and tests.