diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/data/singleton/SingletonManager.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/data/singleton/SingletonManager.java
deleted file mode 100644
index 115f353..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/data/singleton/SingletonManager.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.googlesource.gerrit.plugins.chatgpt.data.singleton;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static com.googlesource.gerrit.plugins.chatgpt.utils.ClassUtils.createNewInstanceWithArgs;
-
-public class SingletonManager {
-    private static final Map<String, Object> instances = new HashMap<>();
-
-    public static synchronized <T> T getInstance(Class<T> clazz, String key, Object... constructorArgs) {
-        if (!instances.containsKey(key)) {
-            return createNewInstance(clazz, key, constructorArgs);
-        }
-        return clazz.cast(instances.get(key));
-    }
-
-    public static synchronized <T> T getNewInstance(Class<T> clazz, String key, Object... constructorArgs) {
-        return createNewInstance(clazz, key, constructorArgs);
-    }
-
-    public static synchronized void removeInstance(Class<?> clazz, String key) {
-        instances.remove(key);
-    }
-
-    private static synchronized <T> T createNewInstance(Class<T> clazz, String key, Object... constructorArgs) {
-        try {
-            // Use reflection to invoke constructor with arguments
-            T instance;
-            if (constructorArgs == null || constructorArgs.length == 0) {
-                instance = clazz.getDeclaredConstructor().newInstance();
-            } else {
-                instance = createNewInstanceWithArgs(clazz, constructorArgs);
-            }
-            instances.put(key, instance);
-            return instance;
-        } catch (Exception e) {
-            throw new RuntimeException("Error creating instance for class: " + clazz.getName(), e);
-        }
-    }
-
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/utils/ClassUtils.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/utils/ClassUtils.java
deleted file mode 100644
index 712ec54..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/utils/ClassUtils.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.googlesource.gerrit.plugins.chatgpt.utils;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-
-public class ClassUtils {
-    public static synchronized <T> T createNewInstanceWithArgs(Class<T> clazz, Object... constructorArgs) {
-        Class<?>[] argClasses = new Class[constructorArgs.length];
-        for (int i = 0; i < constructorArgs.length; i++) {
-            argClasses[i] = constructorArgs[i].getClass();
-        }
-        try {
-            return clazz.getDeclaredConstructor(argClasses).newInstance(constructorArgs);
-        } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public static void registerDynamicClasses(Class<?>... classes) {
-        for (Class<?> clazz : classes) {
-            assert clazz != null; // This assertion is always true; serves to silence "unused" warnings
-        }
-    }
-
-    public static String joinUsingDotNotation(List<String> components) {
-        return String.join(".", components);
-    }
-
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/utils/CustomClassLoader.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/utils/CustomClassLoader.java
deleted file mode 100644
index 0b0b272..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/utils/CustomClassLoader.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.googlesource.gerrit.plugins.chatgpt.utils;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-public class CustomClassLoader extends ClassLoader {
-    @Override
-    protected Class<?> findClass(String name) {
-        try {
-            // Attempt to load the class using the default class loader
-            return Class.forName(name);
-        } catch (ClassNotFoundException e) {
-            return loadLocalClass(name);
-        }
-    }
-
-    private Class<?> loadLocalClass(String name) {
-        try {
-            byte[] b = loadClassData(name);
-            return defineClass(name, b, 0, b.length);
-        } catch (IOException e) {
-            throw new RuntimeException("Failed to load local class " + name, e);
-        }
-    }
-
-    private byte[] loadClassData(String name) throws IOException {
-        ByteArrayOutputStream byteSt;
-        try (InputStream is = getClass().getClassLoader().getResourceAsStream(
-                name.replace('.', '/') + ".class")) {
-            byteSt = new ByteArrayOutputStream();
-            int len;
-            while ((len = is.read()) != -1) {
-                byteSt.write(len);
-            }
-        }
-        catch (NullPointerException e) {
-            throw new RuntimeException("Failed to load class data for class " + name, e);
-        }
-        return byteSt.toByteArray();
-    }
-
-}
