Changed how chatRepo is instantiated