Refactor GeminiServer to decouple services