commit 2dcc11ac3befb85c359d758a5335fabd1d948bc7
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Fri Dec 5 15:02:58 2025 +0100

    Make MagicCube compilable with the KMP branch of the graphics library.

diff --git a/src/main/java/org/distorted/bandaged/BandagedActivity.java b/src/main/java/org/distorted/bandaged/BandagedActivity.java
index 00f69a53..2a587f07 100644
--- a/src/main/java/org/distorted/bandaged/BandagedActivity.java
+++ b/src/main/java/org/distorted/bandaged/BandagedActivity.java
@@ -63,7 +63,7 @@ public class BandagedActivity extends BaseActivity
       mObjectOrdinal = (b != null) ? b.getInt("obj") : 0;
       mDisplayMessageDialog = true;
 
-      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onCreate(ACTIVITY_NUMBER);
       setContentView(R.layout.bandaged);
 
       final Configuration config = getResources().getConfiguration();
@@ -118,7 +118,7 @@ public class BandagedActivity extends BaseActivity
       super.onPause();
       BandagedView view = findViewById(R.id.bandagedCreatorObjectView);
       view.onPause();
-      DistortedLibrary.onPause(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onPause(ACTIVITY_NUMBER);
       savePreferences();
       }
 
@@ -129,7 +129,7 @@ public class BandagedActivity extends BaseActivity
       {
       super.onResume();
 
-      DistortedLibrary.onResume(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onResume(ACTIVITY_NUMBER);
       BandagedView view = findViewById(R.id.bandagedCreatorObjectView);
       view.onResume();
 
@@ -151,7 +151,7 @@ public class BandagedActivity extends BaseActivity
     protected void onDestroy() 
       {
       super.onDestroy();
-      DistortedLibrary.onDestroy(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onDestroy(ACTIVITY_NUMBER);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/bandaged/BandagedRenderer.java b/src/main/java/org/distorted/bandaged/BandagedRenderer.java
index 61ed822a..892ba22d 100644
--- a/src/main/java/org/distorted/bandaged/BandagedRenderer.java
+++ b/src/main/java/org/distorted/bandaged/BandagedRenderer.java
@@ -245,11 +245,11 @@ public class BandagedRenderer implements GLSurfaceView.Renderer, DistortedLibrar
    @Override
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
       {
-      DistortedLibrary.setMax(EffectType.VERTEX,0);
-      MeshBase.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
-      FragmentEffectBrightness.enable();
-      DistortedLibrary.onSurfaceCreated(this,1);
-      DistortedLibrary.setCull(true);
+      DistortedLibrary.INSTANCE.setMax(EffectType.VERTEX,0);
+      MeshBase.Companion.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
+      FragmentEffectBrightness.Companion.enable();
+      DistortedLibrary.INSTANCE.onSurfaceCreated(this,1);
+      DistortedLibrary.INSTANCE.setCull(true);
       mObject.recreateCubits(mQuatT,mQuatA,mScale);
       mCubitsCreated = true;
       mWidth = 0;
diff --git a/src/main/java/org/distorted/config/ConfigActivity.java b/src/main/java/org/distorted/config/ConfigActivity.java
index a70dfe82..fea7b5a9 100644
--- a/src/main/java/org/distorted/config/ConfigActivity.java
+++ b/src/main/java/org/distorted/config/ConfigActivity.java
@@ -45,7 +45,7 @@ public class ConfigActivity extends BaseActivity
     protected void onCreate(Bundle savedState)
       {
       super.onCreate(savedState);
-      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onCreate(ACTIVITY_NUMBER);
       setContentView(R.layout.config);
 
       Bundle b = getIntent().getExtras();
@@ -68,7 +68,7 @@ public class ConfigActivity extends BaseActivity
       ConfigSurfaceView view = findViewById(R.id.configSurfaceView);
       view.onPause();
       savePreferences();
-      DistortedLibrary.onPause(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onPause(ACTIVITY_NUMBER);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -77,7 +77,7 @@ public class ConfigActivity extends BaseActivity
     protected void onResume() 
       {
       super.onResume();
-      DistortedLibrary.onResume(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onResume(ACTIVITY_NUMBER);
       ConfigSurfaceView view = findViewById(R.id.configSurfaceView);
       view.onResume();
       String key ="";
@@ -132,7 +132,7 @@ public class ConfigActivity extends BaseActivity
     protected void onDestroy() 
       {
       super.onDestroy();
-      DistortedLibrary.onDestroy(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onDestroy(ACTIVITY_NUMBER);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/config/ConfigObjectLibInterface.java b/src/main/java/org/distorted/config/ConfigObjectLibInterface.java
index cfaec932..0c7abcd5 100644
--- a/src/main/java/org/distorted/config/ConfigObjectLibInterface.java
+++ b/src/main/java/org/distorted/config/ConfigObjectLibInterface.java
@@ -11,9 +11,7 @@ package org.distorted.config;
 
 import com.google.firebase.crashlytics.FirebaseCrashlytics;
 
-import org.distorted.library.message.EffectMessageSender;
 import org.distorted.main.BuildConfig;
-import org.distorted.objectlib.helpers.BlockController;
 import org.distorted.objectlib.helpers.ObjectLibInterface;
 
 import java.lang.ref.WeakReference;
@@ -41,6 +39,7 @@ public class ConfigObjectLibInterface implements ObjectLibInterface
   public void onRemoveRotation(int axis, int rowBitmap, int degrees) { }
   public void failedToDrag() { }
   public void reportJSONError(String error, int ordinal) { }
+  public void reportBlockProblem(int type, int place, long pause, long resume, long time) { }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -107,38 +106,6 @@ public class ConfigObjectLibInterface implements ObjectLibInterface
       }
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportThreadProblem(int place, long pause, long resume, long time)
-    {
-    String error = EffectMessageSender.reportState();
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("D", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause  );
-      crashlytics.setCustomKey("resume", resume );
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void reportBlockProblem(int type, int place, long pause, long resume, long time)
-    {
-    switch(type)
-      {
-      case BlockController.TYPE_SCRAMBLING: reportScramblingProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_ROTATION  : reportRotationProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_THREAD    : reportThreadProblem(place,pause,resume,time); break;
-      }
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public void onStickerTouched(int cubit, int face)
diff --git a/src/main/java/org/distorted/config/ConfigRenderer.java b/src/main/java/org/distorted/config/ConfigRenderer.java
index 71a739a2..3343f889 100644
--- a/src/main/java/org/distorted/config/ConfigRenderer.java
+++ b/src/main/java/org/distorted/config/ConfigRenderer.java
@@ -158,13 +158,13 @@ public class ConfigRenderer implements GLSurfaceView.Renderer, DistortedLibrary.
    @Override
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
       {
-      DistortedLibrary.setMax(EffectType.VERTEX, ObjectControl.MAX_QUATS+1);
-      VertexEffectRotate.enable();
-      VertexEffectQuaternion.enable();
+      DistortedLibrary.INSTANCE.setMax(EffectType.VERTEX, ObjectControl.MAX_QUATS+1);
+      VertexEffectRotate.Companion.enable();
+      VertexEffectQuaternion.Companion.enable();
       BaseEffect.Type.enableEffects();
 
-      DistortedLibrary.onSurfaceCreated(this,1);
-      DistortedLibrary.setCull(true);
+      DistortedLibrary.INSTANCE.onSurfaceCreated(this,1);
+      DistortedLibrary.INSTANCE.setCull(true);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/info/InfoActivity.java b/src/main/java/org/distorted/info/InfoActivity.java
index e8b7b122..f772ffe3 100644
--- a/src/main/java/org/distorted/info/InfoActivity.java
+++ b/src/main/java/org/distorted/info/InfoActivity.java
@@ -37,7 +37,7 @@ public class InfoActivity extends BaseActivity
     protected void onCreate(Bundle savedState)
       {
       super.onCreate(savedState);
-      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onCreate(ACTIVITY_NUMBER);
       setContentView(R.layout.info);
 
       Bundle b = getIntent().getExtras();
@@ -57,7 +57,7 @@ public class InfoActivity extends BaseActivity
       super.onPause();
       InfoSurfaceView view = findViewById(R.id.infoSurfaceView);
       view.onPause();
-      DistortedLibrary.onPause(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onPause(ACTIVITY_NUMBER);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -66,7 +66,7 @@ public class InfoActivity extends BaseActivity
     protected void onResume() 
       {
       super.onResume();
-      DistortedLibrary.onResume(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onResume(ACTIVITY_NUMBER);
       InfoSurfaceView view = findViewById(R.id.infoSurfaceView);
       view.onResume();
 
@@ -86,7 +86,7 @@ public class InfoActivity extends BaseActivity
     protected void onDestroy() 
       {
       super.onDestroy();
-      DistortedLibrary.onDestroy(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onDestroy(ACTIVITY_NUMBER);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/info/InfoObjectLibInterface.java b/src/main/java/org/distorted/info/InfoObjectLibInterface.java
index be963cb8..fa662cdf 100644
--- a/src/main/java/org/distorted/info/InfoObjectLibInterface.java
+++ b/src/main/java/org/distorted/info/InfoObjectLibInterface.java
@@ -11,9 +11,7 @@ package org.distorted.info;
 
 import com.google.firebase.crashlytics.FirebaseCrashlytics;
 
-import org.distorted.library.message.EffectMessageSender;
 import org.distorted.main.BuildConfig;
-import org.distorted.objectlib.helpers.BlockController;
 import org.distorted.objectlib.helpers.ObjectLibInterface;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -30,6 +28,7 @@ public class InfoObjectLibInterface implements ObjectLibInterface
   public void onRemoveRotation(int axis, int rowBitmap, int degrees) { }
   public void failedToDrag() { }
   public void reportJSONError(String error, int ordinal) { }
+  public void reportBlockProblem(int type, int place, long pause, long resume, long time) { }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -55,76 +54,4 @@ public class InfoObjectLibInterface implements ObjectLibInterface
         }
       }
     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportScramblingProblem(int place, long pause, long resume, long time)
-    {
-    String error = "SCRAMBLING BLOCK "+place+" blocked for "+time;
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("D", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause );
-      crashlytics.setCustomKey("resume", resume );
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportRotationProblem(int place, long pause, long resume, long time)
-    {
-    String error = "ROTATION BLOCK "+place+" blocked for "+time;
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("D", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause );
-      crashlytics.setCustomKey("resume", resume);
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportThreadProblem(int place, long pause, long resume, long time)
-    {
-    String error = EffectMessageSender.reportState();
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("D", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause  );
-      crashlytics.setCustomKey("resume", resume );
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void reportBlockProblem(int type, int place, long pause, long resume, long time)
-    {
-    switch(type)
-      {
-      case BlockController.TYPE_SCRAMBLING: reportScramblingProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_ROTATION  : reportRotationProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_THREAD    : reportThreadProblem(place,pause,resume,time); break;
-      }
-    }
 }
diff --git a/src/main/java/org/distorted/info/InfoRenderer.java b/src/main/java/org/distorted/info/InfoRenderer.java
index e6367b7f..9eb1a58e 100644
--- a/src/main/java/org/distorted/info/InfoRenderer.java
+++ b/src/main/java/org/distorted/info/InfoRenderer.java
@@ -76,13 +76,13 @@ public class InfoRenderer implements GLSurfaceView.Renderer, DistortedLibrary.Li
    @Override
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
       {
-      DistortedLibrary.setMax(EffectType.VERTEX, ObjectControl.MAX_QUATS+1);
-      VertexEffectRotate.enable();
-      VertexEffectQuaternion.enable();
+      DistortedLibrary.INSTANCE.setMax(EffectType.VERTEX, ObjectControl.MAX_QUATS+1);
+      VertexEffectRotate.Companion.enable();
+      VertexEffectQuaternion.Companion.enable();
       BaseEffect.Type.enableEffects();
 
-      DistortedLibrary.onSurfaceCreated(this,1);
-      DistortedLibrary.setCull(true);
+      DistortedLibrary.INSTANCE.onSurfaceCreated(this,1);
+      DistortedLibrary.INSTANCE.setCull(true);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/patterns/PatternActivity.java b/src/main/java/org/distorted/patterns/PatternActivity.java
index a351d381..d634f256 100644
--- a/src/main/java/org/distorted/patterns/PatternActivity.java
+++ b/src/main/java/org/distorted/patterns/PatternActivity.java
@@ -53,7 +53,7 @@ public class PatternActivity extends BaseActivity
     protected void onCreate(Bundle savedState)
       {
       super.onCreate(savedState);
-      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onCreate(ACTIVITY_NUMBER);
       setContentView(R.layout.pattern);
 
       Bundle b = getIntent().getExtras();
@@ -93,7 +93,7 @@ public class PatternActivity extends BaseActivity
       super.onPause();
       PatternSurfaceView view = findViewById(R.id.patternSurfaceView);
       view.onPause();
-      DistortedLibrary.onPause(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onPause(ACTIVITY_NUMBER);
       savePreferences();
       }
 
@@ -103,7 +103,7 @@ public class PatternActivity extends BaseActivity
     protected void onResume() 
       {
       super.onResume();
-      DistortedLibrary.onResume(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onResume(ACTIVITY_NUMBER);
       PatternSurfaceView view = findViewById(R.id.patternSurfaceView);
       view.onResume();
 
@@ -117,7 +117,7 @@ public class PatternActivity extends BaseActivity
     @Override
     protected void onDestroy() 
       {
-      DistortedLibrary.onDestroy(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onDestroy(ACTIVITY_NUMBER);
       super.onDestroy();
       }
 
diff --git a/src/main/java/org/distorted/patterns/PatternObjectLibInterface.java b/src/main/java/org/distorted/patterns/PatternObjectLibInterface.java
index 48103cdd..c48cddb3 100644
--- a/src/main/java/org/distorted/patterns/PatternObjectLibInterface.java
+++ b/src/main/java/org/distorted/patterns/PatternObjectLibInterface.java
@@ -11,9 +11,7 @@ package org.distorted.patterns;
 
 import com.google.firebase.crashlytics.FirebaseCrashlytics;
 
-import org.distorted.library.message.EffectMessageSender;
 import org.distorted.main.BuildConfig;
-import org.distorted.objectlib.helpers.BlockController;
 import org.distorted.objectlib.helpers.ObjectLibInterface;
 import org.distorted.objects.RubikObject;
 import org.distorted.objects.RubikObjectList;
@@ -32,6 +30,7 @@ public class PatternObjectLibInterface implements ObjectLibInterface
   public void onWinEffectFinished(long startTime, long endTime, int scrambleNum) { }
   public void onStickerTouched(int cubit, int face) { }
   public void onStickerUntouched() { }
+  public void reportBlockProblem(int type, int place, long pause, long resume, long time) { }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -58,78 +57,6 @@ public class PatternObjectLibInterface implements ObjectLibInterface
       }
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportScramblingProblem(int place, long pause, long resume, long time)
-    {
-    String error = "SCRAMBLING BLOCK "+place+" blocked for "+time;
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("libInterface", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause );
-      crashlytics.setCustomKey("resume", resume );
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportRotationProblem(int place, long pause, long resume, long time)
-    {
-    String error = "ROTATION BLOCK "+place+" blocked for "+time;
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("libInterface", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause );
-      crashlytics.setCustomKey("resume", resume);
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportThreadProblem(int place, long pause, long resume, long time)
-    {
-    String error = EffectMessageSender.reportState();
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("libInterface", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause  );
-      crashlytics.setCustomKey("resume", resume );
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void reportBlockProblem(int type, int place, long pause, long resume, long time)
-    {
-    switch(type)
-      {
-      case BlockController.TYPE_SCRAMBLING: reportScramblingProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_ROTATION  : reportRotationProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_THREAD    : reportThreadProblem(place,pause,resume,time); break;
-      }
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public void reportJSONError(String error, int ordinal)
diff --git a/src/main/java/org/distorted/patterns/PatternRenderer.java b/src/main/java/org/distorted/patterns/PatternRenderer.java
index 4c92d68e..58f35887 100644
--- a/src/main/java/org/distorted/patterns/PatternRenderer.java
+++ b/src/main/java/org/distorted/patterns/PatternRenderer.java
@@ -91,15 +91,15 @@ public class PatternRenderer implements GLSurfaceView.Renderer, DistortedLibrary
    @Override
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
       {
-      DistortedLibrary.setMax(EffectType.VERTEX,ObjectControl.MAX_QUATS+1);
-      MeshBase.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
+      DistortedLibrary.INSTANCE.setMax(EffectType.VERTEX,ObjectControl.MAX_QUATS+1);
+      MeshBase.Companion.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
 
-      VertexEffectRotate.enable();
-      VertexEffectQuaternion.enable();
+      VertexEffectRotate.Companion.enable();
+      VertexEffectQuaternion.Companion.enable();
       BaseEffect.Type.enableEffects();
 
-      DistortedLibrary.onSurfaceCreated(this,1);
-      DistortedLibrary.setCull(true);
+      DistortedLibrary.INSTANCE.onSurfaceCreated(this,1);
+      DistortedLibrary.INSTANCE.setCull(true);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -133,7 +133,7 @@ public class PatternRenderer implements GLSurfaceView.Renderer, DistortedLibrary
        crashlytics.recordException(ex);
        }
 
-     int glsl = DistortedLibrary.getGLSL();
+     int glsl = DistortedLibrary.INSTANCE.getGLSL();
 
      if( glsl< 300 && !mErrorShown )
        {
diff --git a/src/main/java/org/distorted/play/PlayActivity.java b/src/main/java/org/distorted/play/PlayActivity.java
index ed3b94d2..e95e74e4 100644
--- a/src/main/java/org/distorted/play/PlayActivity.java
+++ b/src/main/java/org/distorted/play/PlayActivity.java
@@ -72,7 +72,7 @@ public class PlayActivity extends BaseActivity implements DialogScores.ScoresInv
     protected void onCreate(Bundle savedState)
       {
       super.onCreate(savedState);
-      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onCreate(ACTIVITY_NUMBER);
       setContentView(R.layout.play);
 
       mJustStarted = true;
@@ -159,7 +159,7 @@ public class PlayActivity extends BaseActivity implements DialogScores.ScoresInv
       PlayView view = findViewById(R.id.playView);
       view.onPause();
       savePreferences();
-      DistortedLibrary.onPause(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onPause(ACTIVITY_NUMBER);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -169,7 +169,7 @@ public class PlayActivity extends BaseActivity implements DialogScores.ScoresInv
       {
       super.onResume();
 
-      DistortedLibrary.onResume(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onResume(ACTIVITY_NUMBER);
       PlayView view = findViewById(R.id.playView);
       ObjectControl control = view.getObjectControl();
       view.onResume();
@@ -226,7 +226,7 @@ public class PlayActivity extends BaseActivity implements DialogScores.ScoresInv
     protected void onDestroy() 
       {
       super.onDestroy();
-      DistortedLibrary.onDestroy(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onDestroy(ACTIVITY_NUMBER);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/play/PlayLibInterface.java b/src/main/java/org/distorted/play/PlayLibInterface.java
index ce16a6e4..8a2620d1 100644
--- a/src/main/java/org/distorted/play/PlayLibInterface.java
+++ b/src/main/java/org/distorted/play/PlayLibInterface.java
@@ -33,8 +33,6 @@ import org.distorted.dialogs.DialogScoresView;
 import org.distorted.dialogs.DialogSolved;
 import org.distorted.helpers.RubikNetwork;
 import org.distorted.helpers.RubikScores;
-import org.distorted.library.message.EffectMessageSender;
-import org.distorted.objectlib.helpers.BlockController;
 import org.distorted.objectlib.helpers.ObjectLibInterface;
 import org.distorted.objectlib.main.ObjectControl;
 import org.distorted.objectlib.main.TwistyObject;
@@ -67,6 +65,7 @@ public class PlayLibInterface implements ObjectLibInterface
   public void onObjectCreated(long time) { }
   public void onStickerTouched(int cubit, int face) { }
   public void onStickerUntouched() { }
+  public void reportBlockProblem(int type, int place, long pause, long resume, long time) { }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -397,38 +396,6 @@ public class PlayLibInterface implements ObjectLibInterface
       }
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportThreadProblem(int place, long pause, long resume, long time)
-    {
-    String error = EffectMessageSender.reportState();
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("D", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause  );
-      crashlytics.setCustomKey("resume", resume );
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void reportBlockProblem(int type, int place, long pause, long resume, long time)
-    {
-    switch(type)
-      {
-      case BlockController.TYPE_SCRAMBLING: reportScramblingProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_ROTATION  : reportRotationProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_THREAD    : reportThreadProblem(place,pause,resume,time); break;
-      }
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public void reportJSONError(String error, int ordinal)
diff --git a/src/main/java/org/distorted/play/PlayRenderer.java b/src/main/java/org/distorted/play/PlayRenderer.java
index 0ba574c2..2cdd0e87 100644
--- a/src/main/java/org/distorted/play/PlayRenderer.java
+++ b/src/main/java/org/distorted/play/PlayRenderer.java
@@ -77,15 +77,15 @@ public class PlayRenderer implements GLSurfaceView.Renderer, DistortedLibrary.Li
    @Override
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
       {
-      DistortedLibrary.setMax(EffectType.VERTEX, ObjectControl.MAX_QUATS+1);
-      MeshBase.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
+      DistortedLibrary.INSTANCE.setMax(EffectType.VERTEX, ObjectControl.MAX_QUATS+1);
+      MeshBase.Companion.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
 
-      VertexEffectRotate.enable();
-      VertexEffectQuaternion.enable();
+      VertexEffectRotate.Companion.enable();
+      VertexEffectQuaternion.Companion.enable();
       BaseEffect.Type.enableEffects();
 
-      DistortedLibrary.onSurfaceCreated(this,1);
-      DistortedLibrary.setCull(true);
+      DistortedLibrary.INSTANCE.onSurfaceCreated(this,1);
+      DistortedLibrary.INSTANCE.setCull(true);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/solvers/SolverActivity.java b/src/main/java/org/distorted/solvers/SolverActivity.java
index c0c31b03..042a8b4e 100644
--- a/src/main/java/org/distorted/solvers/SolverActivity.java
+++ b/src/main/java/org/distorted/solvers/SolverActivity.java
@@ -57,7 +57,7 @@ public class SolverActivity extends BaseActivity
     protected void onCreate(Bundle savedState)
       {
       super.onCreate(savedState);
-      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onCreate(ACTIVITY_NUMBER);
       setContentView(R.layout.solver);
 
       Bundle b = getIntent().getExtras();
@@ -98,7 +98,7 @@ public class SolverActivity extends BaseActivity
       super.onPause();
       SolverSurfaceView view = findViewById(R.id.solverSurfaceView);
       view.onPause();
-      DistortedLibrary.onPause(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onPause(ACTIVITY_NUMBER);
       savePreferences();
       }
 
@@ -108,7 +108,7 @@ public class SolverActivity extends BaseActivity
     protected void onResume() 
       {
       super.onResume();
-      DistortedLibrary.onResume(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onResume(ACTIVITY_NUMBER);
       SolverSurfaceView view = findViewById(R.id.solverSurfaceView);
       view.onResume();
 
@@ -123,7 +123,7 @@ public class SolverActivity extends BaseActivity
     @Override
     protected void onDestroy() 
       {
-      DistortedLibrary.onDestroy(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onDestroy(ACTIVITY_NUMBER);
       super.onDestroy();
       }
 
diff --git a/src/main/java/org/distorted/solvers/SolverObjectLibInterface.java b/src/main/java/org/distorted/solvers/SolverObjectLibInterface.java
index 60f3b920..12c18e8f 100644
--- a/src/main/java/org/distorted/solvers/SolverObjectLibInterface.java
+++ b/src/main/java/org/distorted/solvers/SolverObjectLibInterface.java
@@ -11,9 +11,7 @@ package org.distorted.solvers;
 
 import com.google.firebase.crashlytics.FirebaseCrashlytics;
 
-import org.distorted.library.message.EffectMessageSender;
 import org.distorted.main.BuildConfig;
-import org.distorted.objectlib.helpers.BlockController;
 import org.distorted.objectlib.helpers.ObjectLibInterface;
 import org.distorted.objectlib.main.ObjectControl;
 import org.distorted.objects.RubikObject;
@@ -46,6 +44,7 @@ public class SolverObjectLibInterface implements ObjectLibInterface
   public void onSolved() { }
   public void onObjectCreated(long time) { }
   public void onWinEffectFinished(long startTime, long endTime, int scrambleNum) { }
+  public void reportBlockProblem(int type, int place, long pause, long resume, long time) { }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -112,38 +111,6 @@ public class SolverObjectLibInterface implements ObjectLibInterface
       }
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportThreadProblem(int place, long pause, long resume, long time)
-    {
-    String error = EffectMessageSender.reportState();
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("libInterface", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause  );
-      crashlytics.setCustomKey("resume", resume );
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void reportBlockProblem(int type, int place, long pause, long resume, long time)
-    {
-    switch(type)
-      {
-      case BlockController.TYPE_SCRAMBLING: reportScramblingProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_ROTATION  : reportRotationProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_THREAD    : reportThreadProblem(place,pause,resume,time); break;
-      }
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public void reportJSONError(String error, int ordinal)
diff --git a/src/main/java/org/distorted/solvers/SolverRenderer.java b/src/main/java/org/distorted/solvers/SolverRenderer.java
index 16f8bdf0..6611b066 100644
--- a/src/main/java/org/distorted/solvers/SolverRenderer.java
+++ b/src/main/java/org/distorted/solvers/SolverRenderer.java
@@ -91,15 +91,15 @@ public class SolverRenderer implements GLSurfaceView.Renderer, DistortedLibrary.
    @Override
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
       {
-      DistortedLibrary.setMax(EffectType.VERTEX,ObjectControl.MAX_QUATS+1);
-      MeshBase.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
+      DistortedLibrary.INSTANCE.setMax(EffectType.VERTEX,ObjectControl.MAX_QUATS+1);
+      MeshBase.Companion.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
 
-      VertexEffectRotate.enable();
-      VertexEffectQuaternion.enable();
+      VertexEffectRotate.Companion.enable();
+      VertexEffectQuaternion.Companion.enable();
       BaseEffect.Type.enableEffects();
 
-      DistortedLibrary.onSurfaceCreated(this,1);
-      DistortedLibrary.setCull(true);
+      DistortedLibrary.INSTANCE.onSurfaceCreated(this,1);
+      DistortedLibrary.INSTANCE.setCull(true);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -133,7 +133,7 @@ public class SolverRenderer implements GLSurfaceView.Renderer, DistortedLibrary.
        crashlytics.recordException(ex);
        }
 
-     int glsl = DistortedLibrary.getGLSL();
+     int glsl = DistortedLibrary.INSTANCE.getGLSL();
 
      if( glsl< 300 && !mErrorShown )
        {
diff --git a/src/main/java/org/distorted/tutorials/TutorialActivity.java b/src/main/java/org/distorted/tutorials/TutorialActivity.java
index 97f7ee30..1eef2c7d 100644
--- a/src/main/java/org/distorted/tutorials/TutorialActivity.java
+++ b/src/main/java/org/distorted/tutorials/TutorialActivity.java
@@ -50,7 +50,7 @@ public class TutorialActivity extends BaseActivity
     protected void onCreate(Bundle savedState)
       {
       super.onCreate(savedState);
-      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onCreate(ACTIVITY_NUMBER);
 
       try
         {
@@ -121,7 +121,7 @@ public class TutorialActivity extends BaseActivity
 
       if( mWebView!=null ) mWebView.onPause();
 
-      DistortedLibrary.onPause(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onPause(ACTIVITY_NUMBER);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -130,7 +130,7 @@ public class TutorialActivity extends BaseActivity
     protected void onResume() 
       {
       super.onResume();
-      DistortedLibrary.onResume(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onResume(ACTIVITY_NUMBER);
       TutorialSurfaceView view = findViewById(R.id.tutorialSurfaceView);
       view.onResume();
 
@@ -159,7 +159,7 @@ public class TutorialActivity extends BaseActivity
     protected void onDestroy() 
       {
       super.onDestroy();
-      DistortedLibrary.onDestroy(ACTIVITY_NUMBER);
+      DistortedLibrary.INSTANCE.onDestroy(ACTIVITY_NUMBER);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/tutorials/TutorialObjectLibInterface.java b/src/main/java/org/distorted/tutorials/TutorialObjectLibInterface.java
index b9a6325a..63f49d84 100644
--- a/src/main/java/org/distorted/tutorials/TutorialObjectLibInterface.java
+++ b/src/main/java/org/distorted/tutorials/TutorialObjectLibInterface.java
@@ -11,9 +11,7 @@ package org.distorted.tutorials;
 
 import com.google.firebase.crashlytics.FirebaseCrashlytics;
 
-import org.distorted.library.message.EffectMessageSender;
 import org.distorted.main.BuildConfig;
-import org.distorted.objectlib.helpers.BlockController;
 import org.distorted.objectlib.helpers.ObjectLibInterface;
 
 import java.lang.ref.WeakReference;
@@ -41,6 +39,7 @@ public class TutorialObjectLibInterface implements ObjectLibInterface
   public void onStickerTouched(int cubit, int face) { }
   public void onStickerUntouched() { }
   public void reportJSONError(String error, int ordinal) { }
+  public void reportBlockProblem(int type, int place, long pause, long resume, long time) { }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -67,78 +66,6 @@ public class TutorialObjectLibInterface implements ObjectLibInterface
       }
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportScramblingProblem(int place, long pause, long resume, long time)
-    {
-    String error = "SCRAMBLING BLOCK "+place+" blocked for "+time;
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("D", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause );
-      crashlytics.setCustomKey("resume", resume );
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportRotationProblem(int place, long pause, long resume, long time)
-    {
-    String error = "ROTATION BLOCK "+place+" blocked for "+time;
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("D", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause );
-      crashlytics.setCustomKey("resume", resume);
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void reportThreadProblem(int place, long pause, long resume, long time)
-    {
-    String error = EffectMessageSender.reportState();
-
-    if( BuildConfig.DEBUG )
-       {
-       android.util.Log.e("D", error);
-       }
-    else
-      {
-      Exception ex = new Exception(error);
-      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
-      crashlytics.setCustomKey("pause" , pause  );
-      crashlytics.setCustomKey("resume", resume );
-      crashlytics.recordException(ex);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void reportBlockProblem(int type, int place, long pause, long resume, long time)
-    {
-    switch(type)
-      {
-      case BlockController.TYPE_SCRAMBLING: reportScramblingProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_ROTATION  : reportRotationProblem(place,pause,resume,time); break;
-      case BlockController.TYPE_THREAD    : reportThreadProblem(place,pause,resume,time); break;
-      }
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public void onRemoveRotation(int axis, int rowBitmap, int degrees)
diff --git a/src/main/java/org/distorted/tutorials/TutorialRenderer.java b/src/main/java/org/distorted/tutorials/TutorialRenderer.java
index 96de585e..fca247d7 100644
--- a/src/main/java/org/distorted/tutorials/TutorialRenderer.java
+++ b/src/main/java/org/distorted/tutorials/TutorialRenderer.java
@@ -78,15 +78,15 @@ public class TutorialRenderer implements GLSurfaceView.Renderer, DistortedLibrar
    @Override
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
       {
-      DistortedLibrary.setMax(EffectType.VERTEX, ObjectControl.MAX_QUATS+1);
-      MeshBase.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
+      DistortedLibrary.INSTANCE.setMax(EffectType.VERTEX, ObjectControl.MAX_QUATS+1);
+      MeshBase.Companion.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
 
-      VertexEffectRotate.enable();
-      VertexEffectQuaternion.enable();
+      VertexEffectRotate.Companion.enable();
+      VertexEffectQuaternion.Companion.enable();
       BaseEffect.Type.enableEffects();
 
-      DistortedLibrary.onSurfaceCreated(this,1);
-      DistortedLibrary.setCull(true);
+      DistortedLibrary.INSTANCE.onSurfaceCreated(this,1);
+      DistortedLibrary.INSTANCE.setCull(true);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
