diff --git a/VipsPlugin.php b/VipsPlugin.php
index 2bff189f45317253090347b0f5a2f0b4969d6751..d48e609ba15f5322e261fcc1b8993555bd40c888 100644
--- a/VipsPlugin.php
+++ b/VipsPlugin.php
@@ -39,8 +39,12 @@ if (!interface_exists('PrivacyPlugin')) {
 // this is included for Stud.IP >= 5.0
 if (interface_exists('Courseware\CoursewarePlugin')) {
     require_once 'lib/VipsCoursewarePlugin.php';
+
+    class _VipsPlugin extends StudIPPlugin implements Courseware\CoursewarePlugin {
+        use VipsCoursewarePlugin;
+    }
 } else {
-    require_once 'lib/CoursewarePlugin.php';
+    class _VipsPlugin extends StudIPPlugin {}
 }
 
 StudipAutoloader::addClassLookups([
@@ -62,19 +66,15 @@ StudipAutoloader::addClassLookups([
     'VipsTest'              => __DIR__ . '/lib/VipsTest.php'
 ]);
 
-use Courseware\CoursewarePlugin;
-
 /**
  * Vips plugin class for Stud.IP
  */
-class VipsPlugin extends StudIPPlugin implements StandardPlugin, SystemPlugin, PrivacyPlugin, CoursewarePlugin
+class VipsPlugin extends _VipsPlugin implements StandardPlugin, SystemPlugin, PrivacyPlugin
 {
     public static $exam_mode;
     public static $instance;
     public static $template_factory;
 
-    use VipsCoursewarePlugin;
-
     public function __construct()
     {
         global $perm, $user;
diff --git a/lib/CoursewarePlugin.php b/lib/CoursewarePlugin.php
deleted file mode 100644
index 5012d6ffe4baef4291709200262d4838e4753cb7..0000000000000000000000000000000000000000
--- a/lib/CoursewarePlugin.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-/*
- * CoursewarePlugin.php - Vips copy of the CoursewarePlugin interface
- * Copyright (c) 2022  Elmar Ludwig
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- */
-
-namespace Courseware {
-    interface CoursewarePlugin {}
-}
-
-namespace {
-    trait VipsCoursewarePlugin {}
-}