Convert repository to be a singleton