commit faa3ff56bbf5af5cc9fc48573cd0ea16658017bc
Author: Leszek Koltunski <leszek@distoretedandroid.org>
Date:   Tue Jun 27 11:57:06 2017 +0100

    Javadoc.

diff --git a/src/main/java/org/distorted/library/effect/Effect.java b/src/main/java/org/distorted/library/effect/Effect.java
index 3c333e8..51926d0 100644
--- a/src/main/java/org/distorted/library/effect/Effect.java
+++ b/src/main/java/org/distorted/library/effect/Effect.java
@@ -20,7 +20,9 @@
 package org.distorted.library.effect;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Abstract Effect of any type.
+ */
 public abstract class Effect
   {
   private final static int MAX_UNITY_DIM = 4;
@@ -47,10 +49,34 @@ public abstract class Effect
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public abstract boolean compute(float[] uniforms, int index, long currentDuration, long step );
+  Effect(EffectName name)
+    {
+    mName      = name;
+    mType      = name.getType();
+    mDimension = name.getDimension();
+    mSupportsC = name.supportsCenter();
+    mSupportsR = name.supportsRegion();
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
+    int n = name.ordinal();
+    float[] u = name.getUnity();
+    int l = name.getUnity().length;
 
+    for(int i=0; i<l; i++)
+      {
+      mUnity[n*MAX_UNITY_DIM+i] = u[i];
+      }
+
+    mUnityDim[n] = l;
+
+    mID = ((mNextID++)<<EffectType.LENGTH) + mType.ordinal();
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public static void onDestroy()
     {
     mNextID = 0;
@@ -59,7 +85,20 @@ public abstract class Effect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public abstract boolean compute(float[] uniforms, int index, long currentDuration, long step );
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Do the set of Uniforms written in buffer[index], buffer[index+1], etc represent a Unity, i.e a
+ * null Effect?
+ */
   public boolean isUnity(float[] buffer, int index)
     {
     int name = mName.ordinal();
@@ -82,75 +121,69 @@ public abstract class Effect
     return false;
     }
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Return the EffectType enum corresponding to this Effect.
+ *
+ * @see EffectType
+ */
   public EffectType getType()
     {
     return mType;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Return the EffectName enum corresponding to this Effect.
+ *
+ * @see EffectName
+ */
   public EffectName getName()
     {
     return mName;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Return the unique ID of this Effect.
+ */
   public long getID()
     {
     return mID;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Return a printable name of this Effect.
+ */
   public String getString()
     {
     return mName.name();
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Does this effect have a Center?
+ */
   public boolean supportsCenter()
     {
     return mSupportsC;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Does this effect support being masked by a Region?
+ */
   public boolean supportsRegion()
     {
     return mSupportsR;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Return the number of Uniforms needed to describe this effect.
+ */
   public int getDimension()
     {
     return mDimension;
     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  Effect(EffectName name)
-    {
-    mName      = name;
-    mType      = name.getType();
-    mDimension = name.getDimension();
-    mSupportsC = name.supportsCenter();
-    mSupportsR = name.supportsRegion();
-
-    int n = name.ordinal();
-    float[] u = name.getUnity();
-    int l = name.getUnity().length;
-
-    for(int i=0; i<l; i++)
-      {
-      mUnity[n*MAX_UNITY_DIM+i] = u[i];
-      }
-
-    mUnityDim[n] = l;
-
-    mID = ((mNextID++)<<EffectType.LENGTH) + mType.ordinal();
-    }
   }
diff --git a/src/main/java/org/distorted/library/effect/EffectQuality.java b/src/main/java/org/distorted/library/effect/EffectQuality.java
index 5e64be5..2017549 100644
--- a/src/main/java/org/distorted/library/effect/EffectQuality.java
+++ b/src/main/java/org/distorted/library/effect/EffectQuality.java
@@ -39,8 +39,13 @@ public enum EffectQuality
   LOW      ( 3 );
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public static final float MULTIPLIER = 0.5f;      // each next Quality level renders into 1/0.5 smaller buffers
+/**
+ * Each next Quality level renders into 1/MULTIPLIER smaller buffers.
+ */
+  public static final float MULTIPLIER = 0.5f;
+/**
+ * Numof of possible qualities.
+ */
   public static final int LENGTH = values().length;
 
   private final int level;
@@ -53,7 +58,11 @@ public enum EffectQuality
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public int getLevel()
     {
     return level;
diff --git a/src/main/java/org/distorted/library/effect/EffectType.java b/src/main/java/org/distorted/library/effect/EffectType.java
index bf0e142..d8b7b25 100644
--- a/src/main/java/org/distorted/library/effect/EffectType.java
+++ b/src/main/java/org/distorted/library/effect/EffectType.java
@@ -48,13 +48,27 @@ public enum EffectType
   POSTPROCESS;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public static final int LENGTH = values().length;  // The number of effect types.
-  public static final int MASK= (1<<LENGTH)-1;       // Needed when we do bitwise operations on Effect Types.
+/**
+ * Number of effect types.
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public static final int LENGTH = values().length;
+/**
+ * Needed when we do bitwise operations on Effect Types.
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public static final int MASK= (1<<LENGTH)-1;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-// called from EffectQueue
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public static void reset(int[] maxtable)
     {
     maxtable[0] =10;  // By default, there can be a maximum 10 MATRIX effects in a single
diff --git a/src/main/java/org/distorted/library/effect/FragmentEffect.java b/src/main/java/org/distorted/library/effect/FragmentEffect.java
index f4328c0..97df1ad 100644
--- a/src/main/java/org/distorted/library/effect/FragmentEffect.java
+++ b/src/main/java/org/distorted/library/effect/FragmentEffect.java
@@ -20,12 +20,15 @@
 package org.distorted.library.effect;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-// FRAGMENT EFFECTS
-
-
+/**
+ * Fragment Effect - an Effect that works by injecting certain code into the main Fragment shader.
+ */
 public abstract class FragmentEffect extends Effect
   {
-  public static final int NUM_UNIFORMS = 8; // 4-per effect interpolated values, 4 dimensional Region.
+/**
+ * 8: 4-per effect interpolated values, 4 dimensional Region.
+ */
+  public static final int NUM_UNIFORMS = 8;
   private static String mGLSL = "";
   private static int mNumEnabled = 0;
 
@@ -37,6 +40,7 @@ public abstract class FragmentEffect extends Effect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
+// prepare code to be injected into the 'main_fragment_shader' main() function.
 
   static void addEffect(EffectName not_smooth, EffectName yes_smooth, String code)
     {
@@ -64,24 +68,36 @@ public abstract class FragmentEffect extends Effect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public static String getGLSL()
     {
     return mGLSL + "{}";
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public static int getNumEnabled()
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public static void onDestroy()
     {
-    return mNumEnabled;
+    mNumEnabled = 0;
+    mGLSL = "";
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public static void onDestroy()
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Return the number of Fragment effects enabled.
+ */
+  public static int getNumEnabled()
     {
-    mNumEnabled = 0;
-    mGLSL = "";
+    return mNumEnabled;
     }
   }
\ No newline at end of file
diff --git a/src/main/java/org/distorted/library/effect/FragmentEffectAlpha.java b/src/main/java/org/distorted/library/effect/FragmentEffectAlpha.java
index a70fb54..73c574b 100644
--- a/src/main/java/org/distorted/library/effect/FragmentEffectAlpha.java
+++ b/src/main/java/org/distorted/library/effect/FragmentEffectAlpha.java
@@ -24,12 +24,28 @@ import org.distorted.library.type.Data4D;
 import org.distorted.library.type.Static4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Make a certain Region change its transparency level.
+ */
 public class FragmentEffectAlpha extends FragmentEffect
   {
   private Data1D mAlpha;
   private Data4D mRegion;
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
+    {
+    mRegion.get(uniforms, index+4, currentDuration, step);
+    return mAlpha.get(uniforms,index, currentDuration, step);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Makes a certain sub-region of the Object smoothly change its transparency level.
@@ -61,15 +77,9 @@ public class FragmentEffectAlpha extends FragmentEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
-    {
-    mRegion.get(uniforms, index+4, currentDuration, step);
-    return mAlpha.get(uniforms,index, currentDuration, step);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     addEffect( EffectName.ALPHA,EffectName.SMOOTH_ALPHA,
diff --git a/src/main/java/org/distorted/library/effect/FragmentEffectBrightness.java b/src/main/java/org/distorted/library/effect/FragmentEffectBrightness.java
index a6cc405..d0ec2e2 100644
--- a/src/main/java/org/distorted/library/effect/FragmentEffectBrightness.java
+++ b/src/main/java/org/distorted/library/effect/FragmentEffectBrightness.java
@@ -24,12 +24,29 @@ import org.distorted.library.type.Data4D;
 import org.distorted.library.type.Static4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Make a certain Region change its brightness level.
+ */
 public class FragmentEffectBrightness extends FragmentEffect
   {
   private Data1D mBrightness;
   private Data4D mRegion;
 
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
+    {
+    mRegion.get(uniforms,index+4,currentDuration,step);
+    return mBrightness.get(uniforms,index,currentDuration,step);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Makes a certain sub-region of the Object smoothly change its brightness level.
@@ -59,15 +76,9 @@ public class FragmentEffectBrightness extends FragmentEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
-    {
-    mRegion.get(uniforms,index+4,currentDuration,step);
-    return mBrightness.get(uniforms,index,currentDuration,step);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     addEffect( EffectName.BRIGHTNESS,EffectName.SMOOTH_BRIGHTNESS,
diff --git a/src/main/java/org/distorted/library/effect/FragmentEffectChroma.java b/src/main/java/org/distorted/library/effect/FragmentEffectChroma.java
index 9fe9e3e..207cd26 100644
--- a/src/main/java/org/distorted/library/effect/FragmentEffectChroma.java
+++ b/src/main/java/org/distorted/library/effect/FragmentEffectChroma.java
@@ -25,13 +25,30 @@ import org.distorted.library.type.Data4D;
 import org.distorted.library.type.Static4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Make a certain Region change its color.
+ */
 public class FragmentEffectChroma extends FragmentEffect
   {
   private Data1D mBlend;
   private Data3D mColor;
   private Data4D mRegion;
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
+    {
+    mRegion.get(uniforms,index+4,currentDuration,step);
+    mColor.get(uniforms,index+1,currentDuration,step);
+    return mBlend.get(uniforms,index,currentDuration,step);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
@@ -69,16 +86,9 @@ public class FragmentEffectChroma extends FragmentEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
-    {
-    mRegion.get(uniforms,index+4,currentDuration,step);
-    mColor.get(uniforms,index+1,currentDuration,step);
-    return mBlend.get(uniforms,index,currentDuration,step);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     addEffect( EffectName.CHROMA,EffectName.SMOOTH_CHROMA,
diff --git a/src/main/java/org/distorted/library/effect/FragmentEffectContrast.java b/src/main/java/org/distorted/library/effect/FragmentEffectContrast.java
index 93ac461..9b6eddb 100644
--- a/src/main/java/org/distorted/library/effect/FragmentEffectContrast.java
+++ b/src/main/java/org/distorted/library/effect/FragmentEffectContrast.java
@@ -24,12 +24,28 @@ import org.distorted.library.type.Data4D;
 import org.distorted.library.type.Static4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Make a certain Region change its contrast level.
+ */
 public class FragmentEffectContrast extends FragmentEffect
   {
   private Data1D mContrast;
   private Data4D mRegion;
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
+    {
+    mRegion.get(uniforms,index+4,currentDuration,step);
+    return mContrast.get(uniforms,index,currentDuration,step);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Makes a certain sub-region of the Object smoothly change its contrast level.
@@ -59,15 +75,9 @@ public class FragmentEffectContrast extends FragmentEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
-    {
-    mRegion.get(uniforms,index+4,currentDuration,step);
-    return mContrast.get(uniforms,index,currentDuration,step);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     addEffect( EffectName.CONTRAST,EffectName.SMOOTH_CONTRAST,
diff --git a/src/main/java/org/distorted/library/effect/FragmentEffectSaturation.java b/src/main/java/org/distorted/library/effect/FragmentEffectSaturation.java
index a183837..d1897cf 100644
--- a/src/main/java/org/distorted/library/effect/FragmentEffectSaturation.java
+++ b/src/main/java/org/distorted/library/effect/FragmentEffectSaturation.java
@@ -24,12 +24,28 @@ import org.distorted.library.type.Data4D;
 import org.distorted.library.type.Static4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Make a certain Region change its color saturation.
+ */
 public class FragmentEffectSaturation extends FragmentEffect
   {
   private Data1D mSaturation;
   private Data4D mRegion;
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
+    {
+    mRegion.get(uniforms,index+4,currentDuration,step);
+    return mSaturation.get(uniforms,index,currentDuration,step);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Makes a certain sub-region of the Object smoothly change its saturation level.
@@ -61,15 +77,9 @@ public class FragmentEffectSaturation extends FragmentEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
-    {
-    mRegion.get(uniforms,index+4,currentDuration,step);
-    return mSaturation.get(uniforms,index,currentDuration,step);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     addEffect( EffectName.SATURATION,EffectName.SMOOTH_SATURATION,
diff --git a/src/main/java/org/distorted/library/effect/MatrixEffect.java b/src/main/java/org/distorted/library/effect/MatrixEffect.java
index 0189e99..31b131a 100644
--- a/src/main/java/org/distorted/library/effect/MatrixEffect.java
+++ b/src/main/java/org/distorted/library/effect/MatrixEffect.java
@@ -20,14 +20,22 @@
 package org.distorted.library.effect;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-// MATRIX EFFECTS.
-
+/**
+ * Matrix Effect - an Effect that works by modifying the ModelView matrix.
+ */
 public abstract class MatrixEffect extends Effect
   {
-  public static final int NUM_UNIFORMS = 7; // 4 per-effect interpolated values + 3 dimensional center.
+/**
+ * 7: 4 per-effect interpolated values + 3 dimensional center.
+ */
+  public static final int NUM_UNIFORMS = 7;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public abstract void apply(float[] matrix, float[] uniforms, int index);
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/library/effect/MatrixEffectMove.java b/src/main/java/org/distorted/library/effect/MatrixEffectMove.java
index c901f8e..e088759 100644
--- a/src/main/java/org/distorted/library/effect/MatrixEffectMove.java
+++ b/src/main/java/org/distorted/library/effect/MatrixEffectMove.java
@@ -24,32 +24,30 @@ import android.opengl.Matrix;
 import org.distorted.library.type.Data3D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Move the Mesh by a 3D vector.
+ */
 public class MatrixEffectMove extends MatrixEffect
   {
   private Data3D mVector;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Moves the Object by a (possibly changing in time) vector.
+ * Only for use by the library itself.
  *
- * @param vector current coordinates of the vector we want to move the Object with.
+ * @y.exclude
  */
-  public MatrixEffectMove(Data3D vector)
-    {
-    super(EffectName.MOVE);
-    mVector = vector;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     return mVector.get(uniforms,index,currentDuration,step);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public void apply(float[] matrix, float[] uniforms, int index)
     {
     float sx = uniforms[NUM_UNIFORMS*index  ];
@@ -58,4 +56,18 @@ public class MatrixEffectMove extends MatrixEffect
 
     Matrix.translateM(matrix, 0, sx,-sy, sz);
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Move the Mesh by a 3D vector.
+ *
+ * @param vector current coordinates of the vector we want to move the Mesh with.
+ */
+  public MatrixEffectMove(Data3D vector)
+    {
+    super(EffectName.MOVE);
+    mVector = vector;
+    }
   }
diff --git a/src/main/java/org/distorted/library/effect/MatrixEffectQuaternion.java b/src/main/java/org/distorted/library/effect/MatrixEffectQuaternion.java
index 7e7b315..f2159f2 100644
--- a/src/main/java/org/distorted/library/effect/MatrixEffectQuaternion.java
+++ b/src/main/java/org/distorted/library/effect/MatrixEffectQuaternion.java
@@ -25,7 +25,9 @@ import org.distorted.library.type.Data3D;
 import org.distorted.library.type.Data4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Rotate the Mesh by a quaternion.
+ */
 public class MatrixEffectQuaternion extends MatrixEffect
   {
   private Data4D mQuaternion;
@@ -36,20 +38,10 @@ public class MatrixEffectQuaternion extends MatrixEffect
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Rotates the Object by quaternion.
+ * Only for use by the library itself.
  *
- * @param quaternion Quaternion describing the rotation.
- * @param center     Coordinates of the Point we are rotating around.
+ * @y.exclude
  */
-  public MatrixEffectQuaternion(Data4D quaternion, Data3D center )
-    {
-    super(EffectName.QUATERNION);
-    mQuaternion = quaternion;
-    mCenter = center;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     mCenter.get(uniforms,index+4,currentDuration,step);
@@ -57,7 +49,11 @@ public class MatrixEffectQuaternion extends MatrixEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public void apply(float[] matrix, float[] uniforms, int index)
     {
     float qX = uniforms[NUM_UNIFORMS*index  ];
@@ -119,4 +115,20 @@ public class MatrixEffectQuaternion extends MatrixEffect
     matrix[14] = mTmpMatrix2[14];
     matrix[15] = mTmpMatrix2[15];
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Rotate the Mesh by a quaternion.
+ *
+ * @param quaternion Quaternion describing the rotation.
+ * @param center     Coordinates of the Point we are rotating around.
+ */
+  public MatrixEffectQuaternion(Data4D quaternion, Data3D center )
+    {
+    super(EffectName.QUATERNION);
+    mQuaternion = quaternion;
+    mCenter = center;
+    }
   }
diff --git a/src/main/java/org/distorted/library/effect/MatrixEffectRotate.java b/src/main/java/org/distorted/library/effect/MatrixEffectRotate.java
index febdb97..3d2564a 100644
--- a/src/main/java/org/distorted/library/effect/MatrixEffectRotate.java
+++ b/src/main/java/org/distorted/library/effect/MatrixEffectRotate.java
@@ -25,7 +25,9 @@ import org.distorted.library.type.Data1D;
 import org.distorted.library.type.Data3D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Rotate the Mesh by 'angle' degrees around the center, along an axis.
+ */
 public class MatrixEffectRotate extends MatrixEffect
   {
   private Data1D mAngle;
@@ -33,23 +35,10 @@ public class MatrixEffectRotate extends MatrixEffect
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Rotates the Object by 'angle' degrees around the center.
- * Static axis of rotation is given by the last parameter.
+ * Only for use by the library itself.
  *
- * @param angle  Angle that we want to rotate the Object to. Unit: degrees
- * @param axis   Axis of rotation
- * @param center Coordinates of the Point we are rotating around.
+ * @y.exclude
  */
-  public MatrixEffectRotate(Data1D angle, Data3D axis, Data3D center)
-    {
-    super(EffectName.ROTATE);
-    mAngle = angle;
-    mAxis = axis;
-    mCenter = center;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     mCenter.get(uniforms,index+4,currentDuration,step);
@@ -58,7 +47,11 @@ public class MatrixEffectRotate extends MatrixEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public void apply(float[] matrix, float[] uniforms, int index)
     {
     float alpha = uniforms[NUM_UNIFORMS*index  ];
@@ -74,4 +67,22 @@ public class MatrixEffectRotate extends MatrixEffect
     Matrix.rotateM( matrix, 0, alpha, axisX, axisY, axisZ);
     Matrix.translateM(matrix, 0,-x, y,-z);
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Rotate the Mesh by 'angle' degrees around the center, along an axis.
+ *
+ * @param angle  Angle that we want to rotate the Object to. Unit: degrees
+ * @param axis   Axis of rotation
+ * @param center Coordinates of the Point we are rotating around.
+ */
+  public MatrixEffectRotate(Data1D angle, Data3D axis, Data3D center)
+    {
+    super(EffectName.ROTATE);
+    mAngle = angle;
+    mAxis = axis;
+    mCenter = center;
+    }
   }
diff --git a/src/main/java/org/distorted/library/effect/MatrixEffectScale.java b/src/main/java/org/distorted/library/effect/MatrixEffectScale.java
index 30e3958..4d36383 100644
--- a/src/main/java/org/distorted/library/effect/MatrixEffectScale.java
+++ b/src/main/java/org/distorted/library/effect/MatrixEffectScale.java
@@ -25,50 +25,62 @@ import org.distorted.library.type.Data3D;
 import org.distorted.library.type.Static3D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Scale the Mesh by 3D scale factors.
+ */
 public class MatrixEffectScale extends MatrixEffect
   {
   private Data3D mScale;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Scales the Object by (possibly changing in time) 3D scale factors.
+ * Only for use by the library itself.
  *
- * @param scale current x- , y- and z- scale factors.
+ * @y.exclude
  */
-  public MatrixEffectScale(Data3D scale)
+  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
-    super(EffectName.SCALE);
-    mScale = scale;
+    return mScale.get(uniforms,index,currentDuration,step);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Scales the Object by (possibly changing in time) 3D scale factors.
+ * Only for use by the library itself.
  *
- * @param scale Common x,y, and z scale factor.
+ * @y.exclude
  */
-  public MatrixEffectScale(float scale)
+  public void apply(float[] matrix, float[] uniforms, int index)
     {
-    super(EffectName.SCALE);
-    mScale = new Static3D(scale,scale,scale);
+    float sx = uniforms[NUM_UNIFORMS*index  ];
+    float sy = uniforms[NUM_UNIFORMS*index+1];
+    float sz = uniforms[NUM_UNIFORMS*index+2];
+
+    Matrix.scaleM(matrix, 0, sx, sy, sz);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Scale the Mesh by 3D scale factors.
+ *
+ * @param scale current x- , y- and z- scale factors.
+ */
+  public MatrixEffectScale(Data3D scale)
     {
-    return mScale.get(uniforms,index,currentDuration,step);
+    super(EffectName.SCALE);
+    mScale = scale;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void apply(float[] matrix, float[] uniforms, int index)
+/**
+ * Scale the Mesh by 3D scale factors.
+ *
+ * @param scale Common x,y, and z scale factor.
+ */
+  public MatrixEffectScale(float scale)
     {
-    float sx = uniforms[NUM_UNIFORMS*index  ];
-    float sy = uniforms[NUM_UNIFORMS*index+1];
-    float sz = uniforms[NUM_UNIFORMS*index+2];
-
-    Matrix.scaleM(matrix, 0, sx, sy, sz);
+    super(EffectName.SCALE);
+    mScale = new Static3D(scale,scale,scale);
     }
   }
diff --git a/src/main/java/org/distorted/library/effect/MatrixEffectShear.java b/src/main/java/org/distorted/library/effect/MatrixEffectShear.java
index 73809f3..a666e1e 100644
--- a/src/main/java/org/distorted/library/effect/MatrixEffectShear.java
+++ b/src/main/java/org/distorted/library/effect/MatrixEffectShear.java
@@ -24,30 +24,19 @@ import android.opengl.Matrix;
 import org.distorted.library.type.Data3D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Shear the Mesh.
+ */
 public class MatrixEffectShear extends MatrixEffect
   {
   private Data3D mShear, mCenter;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Shears the Object.
+ * Only for use by the library itself.
  *
- * @param shear   The 3-tuple of shear factors. The first controls level
- *                of shearing in the X-axis, second - Y-axis and the third -
- *                Z-axis. Each is the tangens of the shear angle, i.e 0 -
- *                no shear, 1 - shear by 45 degrees (tan(45deg)=1) etc.
- * @param center  Center of shearing, i.e. the point which stays unmoved.
+ * @y.exclude
  */
-  public MatrixEffectShear(Data3D shear, Data3D center)
-    {
-    super(EffectName.SHEAR);
-    mShear = shear;
-    mCenter = center;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     mCenter.get(uniforms,index+4,currentDuration,step);
@@ -55,7 +44,11 @@ public class MatrixEffectShear extends MatrixEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public void apply(float[] matrix, float[] uniforms, int index)
     {
     float sx = uniforms[NUM_UNIFORMS*index  ];
@@ -85,4 +78,23 @@ public class MatrixEffectShear extends MatrixEffect
 
     Matrix.translateM(matrix, 0,-x, y, -z);
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Shear the Mesh.
+ *
+ * @param shear   The 3-tuple of shear factors. The first controls level
+ *                of shearing in the X-axis, second - Y-axis and the third -
+ *                Z-axis. Each is the tangens of the shear angle, i.e 0 -
+ *                no shear, 1 - shear by 45 degrees (tan(45deg)=1) etc.
+ * @param center  Center of shearing, i.e. the point which stays unmoved.
+ */
+  public MatrixEffectShear(Data3D shear, Data3D center)
+    {
+    super(EffectName.SHEAR);
+    mShear = shear;
+    mCenter = center;
+    }
   }
diff --git a/src/main/java/org/distorted/library/effect/PostprocessEffect.java b/src/main/java/org/distorted/library/effect/PostprocessEffect.java
index 5a58cb4..4e413f9 100644
--- a/src/main/java/org/distorted/library/effect/PostprocessEffect.java
+++ b/src/main/java/org/distorted/library/effect/PostprocessEffect.java
@@ -28,14 +28,18 @@ import java.nio.FloatBuffer;
 import java.util.ArrayList;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-// POSTPROCESSING EFFECTS.
-
+/**
+ * Postprocessing Effect - an Effect that works by running a certain Shader Program(s) on a Framebuffer.
+ */
 public abstract class PostprocessEffect extends Effect
   {
-  public static final int NUM_UNIFORMS = 5; // 5 per-effect interpolated values.
+/**
+ * 5: 5 per-effect interpolated values.
+ */
+  public static final int NUM_UNIFORMS = 5;
 
-  static final int POS_DATA_SIZE= 2; // Blur Program: size of the position data in elements
-  static final int TEX_DATA_SIZE= 2; // Blur Program: size of the texture coordinate data in elements.
+  static final int POS_DATA_SIZE= 2;
+  static final int TEX_DATA_SIZE= 2;
 
   static final FloatBuffer mQuadPositions, mQuadTexture, mQuadTextureInv;
 
@@ -82,7 +86,11 @@ public abstract class PostprocessEffect extends Effect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public static void createPrograms()
     {
     Source source;
@@ -92,7 +100,7 @@ public abstract class PostprocessEffect extends Effect
       {
       source = mSources.remove(0);
 
-      //android.util.Log.d("postprocess", "compilaing: "+source.mName);
+      //android.util.Log.d("postprocess", "compiling: "+source.mName);
 
       try
         {
@@ -107,7 +115,11 @@ public abstract class PostprocessEffect extends Effect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public abstract int apply(float[] uniforms, int index, float qualityScale, DistortedFramebuffer buffer);
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/library/effect/PostprocessEffectBlur.java b/src/main/java/org/distorted/library/effect/PostprocessEffectBlur.java
index 3c366e8..b474b85 100644
--- a/src/main/java/org/distorted/library/effect/PostprocessEffectBlur.java
+++ b/src/main/java/org/distorted/library/effect/PostprocessEffectBlur.java
@@ -26,7 +26,9 @@ import org.distorted.library.program.DistortedProgram;
 import org.distorted.library.type.Data1D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Blur the Framebuffer.
+ */
 public class PostprocessEffectBlur extends PostprocessEffect
   {
   private static final int MAX_HALO = 50;
@@ -62,27 +64,69 @@ public class PostprocessEffectBlur extends PostprocessEffect
   private static int mIndex1, mIndex2;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Blur the object.
- *
- * @param blurRadius The 'strength' if the effect, in pixels. 0 = no blur, 10 = when blurring a given pixel,
- *                   take into account 10 pixels in each direction.
- */
-  public PostprocessEffectBlur(Data1D blurRadius)
+// This implements the 'Better separable implementation using GPU fixed function sampling' from
+// https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms
+
+  private void computeGaussianKernel(int radius)
     {
-    super(EffectName.BLUR);
-    mBlurRadius = blurRadius;
+    int offset = radius + radius*radius/4;
+
+    if( weightsCache[offset]==0.0f )
+      {
+      float z, x= 0.0f, P= (float)NUM_GAUSSIAN / (radius>3 ? radius:3);
+      mWeights[0] = GAUSSIAN[0];
+      float sum   = GAUSSIAN[0];
+      int j;
+
+      for(int i=1; i<=radius; i++)
+        {
+        x += P;
+        j = (int)x;
+        z = x-j;
+
+        mWeights[i] = (1-z)*GAUSSIAN[j] + z*GAUSSIAN[j+1];
+        sum += 2*mWeights[i];
+        }
+
+      for(int i=0; i<=radius; i++) mWeights[i] /= sum;
+
+      int numloops = radius/2;
+      weightsCache[offset] = mWeights[0];
+      offsetsCache[offset] = 0.0f;
+
+      for(int i=0; i<numloops; i++)
+        {
+        offsetsCache[offset+i+1] = mWeights[2*i+1]*(2*i+1) + mWeights[2*i+2]*(2*i+2);
+        weightsCache[offset+i+1] = mWeights[2*i+1] + mWeights[2*i+2];
+        offsetsCache[offset+i+1]/= weightsCache[offset+i+1];
+        }
+
+      if( radius%2 == 1 )
+        {
+        int index = offset + radius/2 +1;
+        offsetsCache[index]=radius;
+        weightsCache[index]=mWeights[radius];
+        }
+      }
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     return mBlurRadius.get(uniforms,index,currentDuration,step);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public int apply(float[] uniforms, int index, float qualityScale, DistortedFramebuffer buffer)
     {
     if( mProgram1 ==null)
@@ -145,7 +189,11 @@ public class PostprocessEffectBlur extends PostprocessEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     final String blurVertex =
@@ -214,49 +262,15 @@ public class PostprocessEffectBlur extends PostprocessEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-// This implements the 'Better separable implementation using GPU fixed function sampling' from
-// https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms
-
-  private void computeGaussianKernel(int radius)
+/**
+ * Blur the Framebuffer.
+ *
+ * @param blurRadius The 'strength' if the effect, in pixels. 0 = no blur, 10 = when blurring a given pixel,
+ *                   take into account 10 pixels in each direction.
+ */
+  public PostprocessEffectBlur(Data1D blurRadius)
     {
-    int offset = radius + radius*radius/4;
-
-    if( weightsCache[offset]==0.0f )
-      {
-      float z, x= 0.0f, P= (float)NUM_GAUSSIAN / (radius>3 ? radius:3);
-      mWeights[0] = GAUSSIAN[0];
-      float sum   = GAUSSIAN[0];
-      int j;
-
-      for(int i=1; i<=radius; i++)
-        {
-        x += P;
-        j = (int)x;
-        z = x-j;
-
-        mWeights[i] = (1-z)*GAUSSIAN[j] + z*GAUSSIAN[j+1];
-        sum += 2*mWeights[i];
-        }
-
-      for(int i=0; i<=radius; i++) mWeights[i] /= sum;
-
-      int numloops = radius/2;
-      weightsCache[offset] = mWeights[0];
-      offsetsCache[offset] = 0.0f;
-
-      for(int i=0; i<numloops; i++)
-        {
-        offsetsCache[offset+i+1] = mWeights[2*i+1]*(2*i+1) + mWeights[2*i+2]*(2*i+2);
-        weightsCache[offset+i+1] = mWeights[2*i+1] + mWeights[2*i+2];
-        offsetsCache[offset+i+1]/= weightsCache[offset+i+1];
-        }
-
-      if( radius%2 == 1 )
-        {
-        int index = offset + radius/2 +1;
-        offsetsCache[index]=radius;
-        weightsCache[index]=mWeights[radius];
-        }
-      }
+    super(EffectName.BLUR);
+    mBlurRadius = blurRadius;
     }
   }
diff --git a/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java b/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java
index 1c6f88e..4edcd6c 100644
--- a/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java
+++ b/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java
@@ -64,23 +64,58 @@ public class PostprocessEffectGlow extends PostprocessEffect
   private static int mIndex1, mIndex2;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
+// This implements the 'Better separable implementation using GPU fixed function sampling' from
+// https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms
 
-/**
- * Make the object glow with a specific color and a halo of specific radius.
- *
- * @param glowRadius The 'strength' if the effect, in pixels. 0 = no halo, 10 = halo of roughly 10 pixels
- *                   around the whole object.
- * @param color      RGBA of the color with which to draw the glow.
- */
-  public PostprocessEffectGlow(Data1D glowRadius, Data4D color)
+  private void computeGaussianKernel(int radius)
     {
-    super(EffectName.GLOW);
-    mGlowRadius = glowRadius;
-    mColor      = color;
+    int offset = radius + radius*radius/4;
+
+    if( weightsCache[offset]==0.0f )
+      {
+      float z, x= 0.0f, P= (float)NUM_GAUSSIAN / (radius>3 ? radius:3);
+      mWeights[0] = GAUSSIAN[0];
+      float sum   = GAUSSIAN[0];
+      int j;
+
+      for(int i=1; i<=radius; i++)
+        {
+        x += P;
+        j = (int)x;
+        z = x-j;
+
+        mWeights[i] = (1-z)*GAUSSIAN[j] + z*GAUSSIAN[j+1];
+        sum += 2*mWeights[i];
+        }
+
+      for(int i=0; i<=radius; i++) mWeights[i] /= sum;
+
+      int numloops = radius/2;
+      weightsCache[offset] = mWeights[0];
+      offsetsCache[offset] = 0.0f;
+
+      for(int i=0; i<numloops; i++)
+        {
+        offsetsCache[offset+i+1] = mWeights[2*i+1]*(2*i+1) + mWeights[2*i+2]*(2*i+2);
+        weightsCache[offset+i+1] = mWeights[2*i+1] + mWeights[2*i+2];
+        offsetsCache[offset+i+1]/= weightsCache[offset+i+1];
+        }
+
+      if( radius%2 == 1 )
+        {
+        int index = offset + radius/2 +1;
+        offsetsCache[index]=radius;
+        weightsCache[index]=mWeights[radius];
+        }
+      }
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     mColor.get(uniforms,index+1,currentDuration,step);
@@ -88,7 +123,11 @@ public class PostprocessEffectGlow extends PostprocessEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public int apply(float[] uniforms, int index, float qualityScale, DistortedFramebuffer buffer)
     {
     if( mProgram1 ==null)
@@ -151,7 +190,11 @@ public class PostprocessEffectGlow extends PostprocessEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     final String glowVertex =
@@ -220,49 +263,18 @@ public class PostprocessEffectGlow extends PostprocessEffect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-// This implements the 'Better separable implementation using GPU fixed function sampling' from
-// https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms
 
-  private void computeGaussianKernel(int radius)
+/**
+ * Make the object glow with a specific color and a halo of specific radius.
+ *
+ * @param glowRadius The 'strength' if the effect, in pixels. 0 = no halo, 10 = halo of roughly 10 pixels
+ *                   around the whole object.
+ * @param color      RGBA of the color with which to draw the glow.
+ */
+  public PostprocessEffectGlow(Data1D glowRadius, Data4D color)
     {
-    int offset = radius + radius*radius/4;
-
-    if( weightsCache[offset]==0.0f )
-      {
-      float z, x= 0.0f, P= (float)NUM_GAUSSIAN / (radius>3 ? radius:3);
-      mWeights[0] = GAUSSIAN[0];
-      float sum   = GAUSSIAN[0];
-      int j;
-
-      for(int i=1; i<=radius; i++)
-        {
-        x += P;
-        j = (int)x;
-        z = x-j;
-
-        mWeights[i] = (1-z)*GAUSSIAN[j] + z*GAUSSIAN[j+1];
-        sum += 2*mWeights[i];
-        }
-
-      for(int i=0; i<=radius; i++) mWeights[i] /= sum;
-
-      int numloops = radius/2;
-      weightsCache[offset] = mWeights[0];
-      offsetsCache[offset] = 0.0f;
-
-      for(int i=0; i<numloops; i++)
-        {
-        offsetsCache[offset+i+1] = mWeights[2*i+1]*(2*i+1) + mWeights[2*i+2]*(2*i+2);
-        weightsCache[offset+i+1] = mWeights[2*i+1] + mWeights[2*i+2];
-        offsetsCache[offset+i+1]/= weightsCache[offset+i+1];
-        }
-
-      if( radius%2 == 1 )
-        {
-        int index = offset + radius/2 +1;
-        offsetsCache[index]=radius;
-        weightsCache[index]=mWeights[radius];
-        }
-      }
+    super(EffectName.GLOW);
+    mGlowRadius = glowRadius;
+    mColor      = color;
     }
   }
diff --git a/src/main/java/org/distorted/library/effect/VertexEffect.java b/src/main/java/org/distorted/library/effect/VertexEffect.java
index 499629f..c8bfaa5 100644
--- a/src/main/java/org/distorted/library/effect/VertexEffect.java
+++ b/src/main/java/org/distorted/library/effect/VertexEffect.java
@@ -20,11 +20,15 @@
 package org.distorted.library.effect;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-// VERTEX EFFECTS
-
+/**
+ * Vertex Effect - an Effect that works by injecting certain code into the main Vertex shader.
+ */
 public abstract class VertexEffect extends Effect
   {
-  public static final int NUM_UNIFORMS = 12; // 5 per-effect interpolated values, 3-dimensional center, 4-dimensional Region
+/**
+ * 12: 5 per-effect interpolated values, 3-dimensional center, 4-dimensional Region
+ */
+  public static final int NUM_UNIFORMS = 12;
   private static String mGLSL = "";
   private static int mNumEnabled = 0;
 
@@ -36,6 +40,7 @@ public abstract class VertexEffect extends Effect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
+// prepare code to be injected into the 'main_vertex_shader' main() function.
 
   static void addEffect(EffectName name, String code)
     {
@@ -56,24 +61,36 @@ public abstract class VertexEffect extends Effect
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public static String getGLSL()
     {
     return mGLSL + "{}";
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public static int getNumEnabled()
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public static void onDestroy()
     {
-    return mNumEnabled;
+    mNumEnabled = 0;
+    mGLSL = "";
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public static void onDestroy()
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Return the number of Fragment effects enabled.
+ */
+  public static int getNumEnabled()
     {
-    mNumEnabled = 0;
-    mGLSL = "";
+    return mNumEnabled;
     }
   }
\ No newline at end of file
diff --git a/src/main/java/org/distorted/library/effect/VertexEffectDeform.java b/src/main/java/org/distorted/library/effect/VertexEffectDeform.java
index a576dc9..4d67b05 100644
--- a/src/main/java/org/distorted/library/effect/VertexEffectDeform.java
+++ b/src/main/java/org/distorted/library/effect/VertexEffectDeform.java
@@ -24,7 +24,9 @@ import org.distorted.library.type.Data4D;
 import org.distorted.library.type.Static4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Deform the Mesh by applying a 3D vector of force.
+ */
 public class VertexEffectDeform extends VertexEffect
   {
   private Data3D mVector, mCenter;
@@ -32,39 +34,10 @@ public class VertexEffectDeform extends VertexEffect
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Deform the shape of the whole Object with a (possibly changing in time) vector of force applied to
- * a (possibly changing in time) point on the Object.
- *
- * @param vector Vector of force that deforms the shape of the whole Object.
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
- * @param region Region that masks the Effect.
- */
-  public VertexEffectDeform(Data3D vector, Data3D center, Data4D region)
-    {
-    super(EffectName.DEFORM);
-    mVector = vector;
-    mCenter = center;
-    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Deform the shape of the whole Object with a (possibly changing in time) vector of force applied to
- * a (possibly changing in time) point on the Object.
+ * Only for use by the library itself.
  *
- * @param vector Vector of force that deforms the shape of the whole Object.
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ * @y.exclude
  */
-  public VertexEffectDeform(Data3D vector, Data3D center)
-    {
-    super(EffectName.DEFORM);
-    mVector = vector;
-    mCenter = center;
-    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     mCenter.get(uniforms,index+5,currentDuration,step);
@@ -76,6 +49,8 @@ public class VertexEffectDeform extends VertexEffect
     return ret;
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Deform the whole shape of the Object by force V. Algorithm is as follows:
 //
@@ -127,7 +102,10 @@ public class VertexEffectDeform extends VertexEffect
 //        even when we apply only small vertical force to it. The higher C is, the more 'uniform' movement
 //        along the force line is.
 //        0<=C<1 looks completely ridiculous and C<0 destroys the system.
-
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     addEffect( EffectName.DEFORM,
@@ -169,4 +147,37 @@ public class VertexEffectDeform extends VertexEffect
       + "n.xy += n.z*b*ps;"
       );
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Deform the whole Mesh with a (possibly changing in time) vector of force applied to
+ * a (possibly changing in time) point on the Object.
+ *
+ * @param vector Vector of force that deforms the shape of the whole Object.
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ * @param region Region that masks the Effect.
+ */
+  public VertexEffectDeform(Data3D vector, Data3D center, Data4D region)
+    {
+    super(EffectName.DEFORM);
+    mVector = vector;
+    mCenter = center;
+    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Deform the whole Mesh with a (possibly changing in time) vector of force applied to
+ * a (possibly changing in time) point on the Object.
+ *
+ * @param vector Vector of force that deforms the shape of the whole Object.
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ */
+  public VertexEffectDeform(Data3D vector, Data3D center)
+    {
+    super(EffectName.DEFORM);
+    mVector = vector;
+    mCenter = center;
+    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
+    }
   }
diff --git a/src/main/java/org/distorted/library/effect/VertexEffectDistort.java b/src/main/java/org/distorted/library/effect/VertexEffectDistort.java
index 76cb047..7f9a2f3 100644
--- a/src/main/java/org/distorted/library/effect/VertexEffectDistort.java
+++ b/src/main/java/org/distorted/library/effect/VertexEffectDistort.java
@@ -24,7 +24,9 @@ import org.distorted.library.type.Data4D;
 import org.distorted.library.type.Static4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Distort the Mesh by applying a 3D vector of force.
+ */
 public class VertexEffectDistort extends VertexEffect
   {
   private Data3D mVector, mCenter;
@@ -32,37 +34,10 @@ public class VertexEffectDistort extends VertexEffect
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Distort a (possibly changing in time) part of the Object by a (possibly changing in time) vector of force.
- *
- * @param vector vector of force the Center of the Effect is currently being dragged with.
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
- * @param region Region that masks the Effect.
- */
-  public VertexEffectDistort(Data3D vector, Data3D center, Data4D region)
-    {
-    super(EffectName.DISTORT);
-    mVector = vector;
-    mCenter = center;
-    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Distort the whole Object by a (possibly changing in time) vector of force.
+ * Only for use by the library itself.
  *
- * @param vector vector of force the Center of the Effect is currently being dragged with.
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ * @y.exclude
  */
-  public VertexEffectDistort(Data3D vector, Data3D center)
-    {
-    super(EffectName.DISTORT);
-    mVector = vector;
-    mCenter = center;
-    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     mCenter.get(uniforms,index+5,currentDuration,step);
@@ -75,6 +50,8 @@ public class VertexEffectDistort extends VertexEffect
     return ret;
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Point (Px,Py) gets moved by vector (Wx,Wy,Wz) where Wx/Wy = Vx/Vy i.e. Wx=aVx and Wy=aVy where
 // a=Py/Sy (N --> when (Px,Py) is above (Sx,Sy)) or a=Px/Sx (W) or a=(w-Px)/(w-Sx) (E) or a=(h-Py)/(h-Sy) (S)
@@ -127,7 +104,10 @@ public class VertexEffectDistort extends VertexEffect
 //
 // Thus we actually want to compute N(v.x,v.y) = a*(-(dx/|PS|)*f'(|PX|), -(dy/|PS|)*f'(|PX|), 1) and keep adding
 // the first two components. (a is the horizontal part)
-
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     addEffect(EffectName.DISTORT,
@@ -152,6 +132,37 @@ public class VertexEffectDistort extends VertexEffect
       + "n.xy += n.z*b*ps;"
       );
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Distort a (possibly changing in time) part of the Object by a (possibly changing in time) vector of force.
+ *
+ * @param vector vector of force the Center of the Effect is currently being dragged with.
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ * @param region Region that masks the Effect.
+ */
+  public VertexEffectDistort(Data3D vector, Data3D center, Data4D region)
+    {
+    super(EffectName.DISTORT);
+    mVector = vector;
+    mCenter = center;
+    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Distort the whole Object by a (possibly changing in time) vector of force.
+ *
+ * @param vector vector of force the Center of the Effect is currently being dragged with.
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ */
+  public VertexEffectDistort(Data3D vector, Data3D center)
+    {
+    super(EffectName.DISTORT);
+    mVector = vector;
+    mCenter = center;
+    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
+    }
   }
 
 
diff --git a/src/main/java/org/distorted/library/effect/VertexEffectPinch.java b/src/main/java/org/distorted/library/effect/VertexEffectPinch.java
index 424f554..e3c6913 100644
--- a/src/main/java/org/distorted/library/effect/VertexEffectPinch.java
+++ b/src/main/java/org/distorted/library/effect/VertexEffectPinch.java
@@ -25,7 +25,10 @@ import org.distorted.library.type.Data4D;
 import org.distorted.library.type.Static4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Pull all points around the center of the Effect towards a line passing through the center
+ * (that's if degree>=1) or push them away from the line (degree<=1).
+ */
 public class VertexEffectPinch extends VertexEffect
   {
   private Data2D mPinch;
@@ -34,39 +37,10 @@ public class VertexEffectPinch extends VertexEffect
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Pull all points around the center of the Effect towards a line passing through the center
- * (that's if degree>=1) or push them away from the line (degree<=1)
+ * Only for use by the library itself.
  *
- * @param pinch  The current degree of the Effect + angle the line forms with X-axis
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
- * @param region Region that masks the Effect.
+ * @y.exclude
  */
-  public VertexEffectPinch(Data2D pinch, Data3D center, Data4D region)
-    {
-    super(EffectName.PINCH);
-    mPinch  = pinch;
-    mCenter = center;
-    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Pull all points around the center of the Effect towards a line passing through the center
- * (that's if degree>=1) or push them away from the line (degree<=1)
- *
- * @param pinch  The current degree of the Effect + angle the line forms with X-axis
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
- */
-  public VertexEffectPinch(Data2D pinch, Data3D center)
-    {
-    super(EffectName.PINCH);
-    mPinch  = pinch;
-    mCenter = center;
-    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     mCenter.get(uniforms,index+5,currentDuration,step);
@@ -79,13 +53,18 @@ public class VertexEffectPinch extends VertexEffect
     return ret;
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Pull P=(v.x,v.y) towards the line that
 // a) passes through the center of the effect
 // b) forms angle defined in the 2nd interpolated value with the X-axis
 // with P' = P + (1-h)*dist(line to P)
 // when h>1 we are pushing points away from S: P' = P + (1/h-1)*dist(line to P)
-
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     addEffect(EffectName.PINCH,
@@ -99,4 +78,37 @@ public class VertexEffectPinch extends VertexEffect
       + "v.xy += t*dot(ps,dir)*dir;"
       );
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Pull all points around the center of the Effect towards a line passing through the center
+ * (that's if degree>=1) or push them away from the line (degree<=1)
+ *
+ * @param pinch  The current degree of the Effect + angle the line forms with X-axis
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ * @param region Region that masks the Effect.
+ */
+  public VertexEffectPinch(Data2D pinch, Data3D center, Data4D region)
+    {
+    super(EffectName.PINCH);
+    mPinch  = pinch;
+    mCenter = center;
+    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Pull all points around the center of the Effect towards a line passing through the center
+ * (that's if degree>=1) or push them away from the line (degree<=1)
+ *
+ * @param pinch  The current degree of the Effect + angle the line forms with X-axis
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ */
+  public VertexEffectPinch(Data2D pinch, Data3D center)
+    {
+    super(EffectName.PINCH);
+    mPinch  = pinch;
+    mCenter = center;
+    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
+    }
   }
diff --git a/src/main/java/org/distorted/library/effect/VertexEffectSink.java b/src/main/java/org/distorted/library/effect/VertexEffectSink.java
index e7de40e..29fae8f 100644
--- a/src/main/java/org/distorted/library/effect/VertexEffectSink.java
+++ b/src/main/java/org/distorted/library/effect/VertexEffectSink.java
@@ -25,7 +25,10 @@ import org.distorted.library.type.Data4D;
 import org.distorted.library.type.Static4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Pull all points around the center of the Effect towards the center point (if degree>=1) or push them
+ * away from it (degree<=1).
+ */
 public class VertexEffectSink extends VertexEffect
   {
   private Data1D mSink;
@@ -34,39 +37,10 @@ public class VertexEffectSink extends VertexEffect
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Pull all points around the center of the Effect towards the center (if degree>=1) or push them
- * away from the center (degree<=1)
- *
- * @param sink   The current degree of the Effect.
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
- * @param region Region that masks the Effect.
- */
-  public VertexEffectSink(Data1D sink, Data3D center, Data4D region)
-    {
-    super(EffectName.SINK);
-    mSink   = sink;
-    mCenter = center;
-    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Pull all points around the center of the Effect towards the center (if degree>=1) or push them
- * away from the center (degree<=1)
+ * Only for use by the library itself.
  *
- * @param sink   The current degree of the Effect.
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ * @y.exclude
  */
-  public VertexEffectSink(Data1D sink, Data3D center)
-    {
-    super(EffectName.SINK);
-    mSink   = sink;
-    mCenter = center;
-    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     mCenter.get(uniforms,index+5,currentDuration,step);
@@ -78,10 +52,15 @@ public class VertexEffectSink extends VertexEffect
     return ret;
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Pull P=(v.x,v.y) towards center of the effect with P' = P + (1-h)*dist(S-P)
 // when h>1 we are pushing points away from S: P' = P + (1/h-1)*dist(S-P)
-
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     addEffect(EffectName.SINK,
@@ -94,4 +73,37 @@ public class VertexEffectSink extends VertexEffect
       + "v.xy += t*ps;"
       );
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Pull all points around the center of the Effect towards the center point (if degree>=1) or push them
+ * away from it (degree<=1)
+ *
+ * @param sink   The current degree of the Effect.
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ * @param region Region that masks the Effect.
+ */
+  public VertexEffectSink(Data1D sink, Data3D center, Data4D region)
+    {
+    super(EffectName.SINK);
+    mSink   = sink;
+    mCenter = center;
+    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Pull all points around the center of the Effect towards the center point(if degree>=1) or push them
+ * away from it (degree<=1)
+ *
+ * @param sink   The current degree of the Effect.
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ */
+  public VertexEffectSink(Data1D sink, Data3D center)
+    {
+    super(EffectName.SINK);
+    mSink   = sink;
+    mCenter = center;
+    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
+    }
   }
diff --git a/src/main/java/org/distorted/library/effect/VertexEffectSwirl.java b/src/main/java/org/distorted/library/effect/VertexEffectSwirl.java
index 236a8e5..a5ee386 100644
--- a/src/main/java/org/distorted/library/effect/VertexEffectSwirl.java
+++ b/src/main/java/org/distorted/library/effect/VertexEffectSwirl.java
@@ -25,7 +25,9 @@ import org.distorted.library.type.Data4D;
 import org.distorted.library.type.Static4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * 'Swirl' part of the Mesh, i.e rotate part of it around a point.
+ */
 public class VertexEffectSwirl extends VertexEffect
   {
   private Data1D mSwirl;
@@ -34,37 +36,10 @@ public class VertexEffectSwirl extends VertexEffect
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Rotate part of the Object around the Center of the Effect by a certain angle.
- *
- * @param swirl  The angle of Swirl (in degrees). Positive values swirl clockwise.
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
- * @param region Region that masks the Effect.
- */
-  public VertexEffectSwirl(Data1D swirl, Data3D center, Data4D region)
-    {
-    super(EffectName.SWIRL);
-    mSwirl  = swirl;
-    mCenter = center;
-    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Rotate the whole Object around the Center of the Effect by a certain angle.
+ * Only for use by the library itself.
  *
- * @param swirl  The angle of Swirl (in degrees). Positive values swirl clockwise.
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ * @y.exclude
  */
-  public VertexEffectSwirl(Data1D swirl, Data3D center)
-    {
-    super(EffectName.SWIRL);
-    mSwirl  = swirl;
-    mCenter = center;
-    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     mCenter.get(uniforms,index+5,currentDuration,step);
@@ -77,11 +52,16 @@ public class VertexEffectSwirl extends VertexEffect
     return ret;
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Let d be the degree of the current vertex V with respect to center of the effect S and Region vRegion.
 // This effect rotates the current vertex V by vInterpolated.x radians clockwise around the circle dilated
 // by (1-d) around the center of the effect S.
-
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     addEffect(EffectName.SWIRL,
@@ -103,5 +83,36 @@ public class VertexEffectSwirl extends VertexEffect
       + "v.xy += min(d1_circle,d1_bitmap)*(PS - PS2/(1.0-d2)); \n"        // if d2=1 (i.e P=center) we should have P unchanged. How to do it?
       );
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Rotate part of the Mesh around the Center of the Effect by a certain angle.
+ *
+ * @param swirl  The angle of Swirl (in degrees). Positive values swirl clockwise.
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ * @param region Region that masks the Effect.
+ */
+  public VertexEffectSwirl(Data1D swirl, Data3D center, Data4D region)
+    {
+    super(EffectName.SWIRL);
+    mSwirl  = swirl;
+    mCenter = center;
+    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Rotate the whole Mesh around the Center of the Effect by a certain angle.
+ *
+ * @param swirl  The angle of Swirl (in degrees). Positive values swirl clockwise.
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ */
+  public VertexEffectSwirl(Data1D swirl, Data3D center)
+    {
+    super(EffectName.SWIRL);
+    mSwirl  = swirl;
+    mCenter = center;
+    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
+    }
   }
 
diff --git a/src/main/java/org/distorted/library/effect/VertexEffectWave.java b/src/main/java/org/distorted/library/effect/VertexEffectWave.java
index a53a89c..0315dd1 100644
--- a/src/main/java/org/distorted/library/effect/VertexEffectWave.java
+++ b/src/main/java/org/distorted/library/effect/VertexEffectWave.java
@@ -25,7 +25,9 @@ import org.distorted.library.type.Data5D;
 import org.distorted.library.type.Static4D;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
+/**
+ * Directional, sinusoidal wave effect.
+ */
 public class VertexEffectWave extends VertexEffect
   {
   private Data5D mWave;
@@ -34,58 +36,10 @@ public class VertexEffectWave extends VertexEffect
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Directional, sinusoidal wave effect.
- *
- * @param wave   A 5-dimensional data structure describing the wave: first member is the amplitude,
- *               second is the wave length, third is the phase (i.e. when phase = PI/2, the sine
- *               wave at the center does not start from sin(0), but from sin(PI/2) ) and the next two
- *               describe the 'direction' of the wave.
- *               <p>
- *               Wave direction is defined to be a 3D vector of length 1. To define such vectors, we
- *               need 2 floats: thus the third member is the angle Alpha (in degrees) which the vector
- *               forms with the XY-plane, and the fourth is the angle Beta (again in degrees) which
- *               the projection of the vector to the XY-plane forms with the Y-axis (counterclockwise).
- *               <p>
- *               <p>
- *               Example1: if Alpha = 90, Beta = 90, (then V=(0,0,1) ) and the wave acts 'vertically'
- *               in the X-direction, i.e. cross-sections of the resulting surface with the XZ-plane
- *               will be sine shapes.
- *               <p>
- *               Example2: if Alpha = 90, Beta = 0, the again V=(0,0,1) and the wave is 'vertical',
- *               but this time it waves in the Y-direction, i.e. cross sections of the surface and the
- *               YZ-plane with be sine shapes.
- *               <p>
- *               Example3: if Alpha = 0 and Beta = 45, then V=(sqrt(2)/2, -sqrt(2)/2, 0) and the wave
- *               is entirely 'horizontal' and moves point (x,y,0) in direction V by whatever is the
- *               value if sin at this point.
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
- * @param region Region that masks the Effect.
- */
-  public VertexEffectWave(Data5D wave, Data3D center, Data4D region)
-    {
-    super(EffectName.WAVE);
-    mWave   = wave;
-    mCenter = center;
-    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Directional, sinusoidal wave effect.
+ * Only for use by the library itself.
  *
- * @param wave   see {@link VertexEffectWave(Data5D,Data3D)}
- * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ * @y.exclude
  */
-  public VertexEffectWave(Data5D wave, Data3D center)
-    {
-    super(EffectName.WAVE);
-    mWave   = wave;
-    mCenter = center;
-    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
   public boolean compute(float[] uniforms, int index, long currentDuration, long step )
     {
     mCenter.get(uniforms,index+5,currentDuration,step);
@@ -100,6 +54,8 @@ public class VertexEffectWave extends VertexEffect
     return ret;
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Directional sinusoidal wave effect.
 //
@@ -163,7 +119,10 @@ public class VertexEffectWave extends VertexEffect
 // points very dark)
 //
 // Generally speaking I'd keep to amplitude < length, as the opposite case has some other problems as well.
-
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Have to call this before the shaders get compiled (i.e before Distorted.onCreate()) for the Effect to work.
+ */
   public static void enable()
     {
     addEffect(EffectName.WAVE,
@@ -226,4 +185,56 @@ public class VertexEffectWave extends VertexEffect
       +   "}"
       );
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Directional, sinusoidal wave effect.
+ *
+ * @param wave   A 5-dimensional data structure describing the wave: first member is the amplitude,
+ *               second is the wave length, third is the phase (i.e. when phase = PI/2, the sine
+ *               wave at the center does not start from sin(0), but from sin(PI/2) ) and the next two
+ *               describe the 'direction' of the wave.
+ *               <p>
+ *               Wave direction is defined to be a 3D vector of length 1. To define such vectors, we
+ *               need 2 floats: thus the third member is the angle Alpha (in degrees) which the vector
+ *               forms with the XY-plane, and the fourth is the angle Beta (again in degrees) which
+ *               the projection of the vector to the XY-plane forms with the Y-axis (counterclockwise).
+ *               <p>
+ *               <p>
+ *               Example1: if Alpha = 90, Beta = 90, (then V=(0,0,1) ) and the wave acts 'vertically'
+ *               in the X-direction, i.e. cross-sections of the resulting surface with the XZ-plane
+ *               will be sine shapes.
+ *               <p>
+ *               Example2: if Alpha = 90, Beta = 0, the again V=(0,0,1) and the wave is 'vertical',
+ *               but this time it waves in the Y-direction, i.e. cross sections of the surface and the
+ *               YZ-plane with be sine shapes.
+ *               <p>
+ *               Example3: if Alpha = 0 and Beta = 45, then V=(sqrt(2)/2, -sqrt(2)/2, 0) and the wave
+ *               is entirely 'horizontal' and moves point (x,y,0) in direction V by whatever is the
+ *               value if sin at this point.
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ * @param region Region that masks the Effect.
+ */
+  public VertexEffectWave(Data5D wave, Data3D center, Data4D region)
+    {
+    super(EffectName.WAVE);
+    mWave   = wave;
+    mCenter = center;
+    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Directional, sinusoidal wave effect.
+ *
+ * @param wave   see {@link VertexEffectWave(Data5D,Data3D)}
+ * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
+ */
+  public VertexEffectWave(Data5D wave, Data3D center)
+    {
+    super(EffectName.WAVE);
+    mWave   = wave;
+    mCenter = center;
+    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
+    }
   }
diff --git a/src/main/java/org/distorted/library/main/DistortedEffects.java b/src/main/java/org/distorted/library/main/DistortedEffects.java
index 5d1582b..b633cbf 100644
--- a/src/main/java/org/distorted/library/main/DistortedEffects.java
+++ b/src/main/java/org/distorted/library/main/DistortedEffects.java
@@ -45,10 +45,9 @@ import java.util.ArrayList;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Class containing Matrix,Vertex and Fragment effect queues. Postprocessing queue is held in a separate
- * class.
+ * Class containing Matrix, Vertex, Fragment and Postprocessing effect queues.
  * <p>
- * The queues hold actual effects to be applied to a given (DistortedTexture,MeshObject) combo.
+ * The queues hold actual effects to be applied to a given (InputSurface,MeshObject) combo.
  */
 public class DistortedEffects implements DistortedSlave
   {
@@ -477,7 +476,7 @@ public class DistortedEffects implements DistortedSlave
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Adds the calling class to the list of Listeners that get notified each time some event happens 
- * to one of the Effects in those queues. Nothing will happen if 'el' is already in the list.
+ * to one of the Effects in our queues. Nothing will happen if 'el' is already in the list.
  * 
  * @param el A class implementing the EffectListener interface that wants to get notifications.
  */
@@ -492,7 +491,7 @@ public class DistortedEffects implements DistortedSlave
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Removes the calling class from the list of Listeners.
+ * Removes the calling class from the list of Listeners that get notified if something happens to Effects in our queue.
  * 
  * @param el A class implementing the EffectListener interface that no longer wants to get notifications.
  */
@@ -536,7 +535,7 @@ public class DistortedEffects implements DistortedSlave
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Aborts all Effect by its ID.
+ * Aborts an Effect by its ID.
  *
  * @param id the Id of the Effect to be removed, as returned by getID().
  * @return Number of effects aborted.
@@ -593,7 +592,8 @@ public class DistortedEffects implements DistortedSlave
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
- * Returns the maximum number of effects of a given type.
+ * Returns the maximum number of effects of a given type that can be simultaneously applied to a
+ * single (InputSurface,MeshObject) combo.
  *
  * @param type {@link EffectType}
  * @return The maximum number of effects of a given type.
diff --git a/src/main/java/org/distorted/library/program/DistortedProgram.java b/src/main/java/org/distorted/library/program/DistortedProgram.java
index 0d401d4..e2440d8 100644
--- a/src/main/java/org/distorted/library/program/DistortedProgram.java
+++ b/src/main/java/org/distorted/library/program/DistortedProgram.java
@@ -41,7 +41,13 @@ public class DistortedProgram
   private String[] mAttributeName;
   private String[] mUniformName;
 
+/**
+ * List of Attributes (on OpenGL ES 3.0: 'in' variables) in the same order as declared in the shader source.
+ */
   public final int[] mAttribute;
+/**
+ * List of Uniforms in the same order as declared in the shader source.
+ */
   public final int[] mUniform;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -342,9 +348,11 @@ android.util.Log.d("Program", end.substring(0,40));
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-// feedback: List of 'out' variables (OpenGL ES >= 3.0 only!) that will be transferred back to CPU
-// using Transform Feedback.
-
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
   public DistortedProgram(final InputStream vertex, final InputStream fragment, final String vertexHeader, final String fragmentHeader, int glslVersion, final String[] feedback )
   throws FragmentCompilationException,VertexCompilationException,VertexUniformsException,FragmentUniformsException,LinkingException
     {
@@ -379,19 +387,27 @@ android.util.Log.d("Program", end.substring(0,40));
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public DistortedProgram(final String vertex, final String fragment)
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public DistortedProgram(final InputStream vertex, final InputStream fragment, final String vertexHeader, final String fragmentHeader,
+                          final String enabledVertex, final String enabledFragment, int glslVersion, final String[] feedback )
   throws FragmentCompilationException,VertexCompilationException,VertexUniformsException,FragmentUniformsException,LinkingException
     {
-    init(300);
+    init(glslVersion);
 
-    doAttributes(vertex  , true );
-    doAttributes(fragment, false);
+    String vertexShader   = readTextFileFromRawResource(vertex  , true );
+    String fragmentShader = readTextFileFromRawResource(fragment, false);
 
-    final int vertexShaderHandle   = compileShader(GLES30.GL_VERTEX_SHADER  , vertex  );
-    final int fragmentShaderHandle = compileShader(GLES30.GL_FRAGMENT_SHADER, fragment);
+    vertexShader   = insertEnabledEffects(vertexShader  ,enabledVertex  );
+    fragmentShader = insertEnabledEffects(fragmentShader,enabledFragment);
 
-    mProgramHandle = createAndLinkProgram(vertexShaderHandle, fragmentShaderHandle, mAttributeName, null );
+    final int vertexShaderHandle   = compileShader(GLES30.GL_VERTEX_SHADER  , vertexHeader   + vertexShader  );
+    final int fragmentShaderHandle = compileShader(GLES30.GL_FRAGMENT_SHADER, fragmentHeader + fragmentShader);
+
+    mProgramHandle = createAndLinkProgram(vertexShaderHandle, fragmentShaderHandle, mAttributeName, glslVersion>= 300 ? feedback:null );
 
     mAttribute = new int[mNumAttributes];
 
@@ -414,25 +430,46 @@ android.util.Log.d("Program", end.substring(0,40));
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-// feedback: List of 'out' variables (OpenGL ES >= 3.0 only!) that will be transferred back to CPU
-// using Transform Feedback.
-
-  public DistortedProgram(final InputStream vertex, final InputStream fragment, final String vertexHeader, final String fragmentHeader,
-                          final String enabledVertex, final String enabledFragment, int glslVersion, final String[] feedback )
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public DistortedProgram(final InputStream vertex, final InputStream fragment, final String vertexHeader, final String fragmentHeader, int glslVersion )
   throws FragmentCompilationException,VertexCompilationException,VertexUniformsException,FragmentUniformsException,LinkingException
     {
-    init(glslVersion);
+    this(vertex,fragment,vertexHeader,fragmentHeader,glslVersion,null);
+    }
 
-    String vertexShader   = readTextFileFromRawResource(vertex  , true );
-    String fragmentShader = readTextFileFromRawResource(fragment, false);
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Create a new Shader Program from two source strings.
+ * <p>
+ * Needs to be called from a thread holding the OpenGL context.
+ * Assumed to hold GLSL 'version 300 es' source.
+ *
+ * @param vertex   Vertex shader code.
+ * @param fragment Fragment shader code.
+ * @throws FragmentCompilationException
+ * @throws VertexCompilationException
+ * @throws VertexUniformsException
+ * @throws FragmentUniformsException
+ * @throws LinkingException
+ */
+  public DistortedProgram(final String vertex, final String fragment)
+  throws FragmentCompilationException,VertexCompilationException,VertexUniformsException,FragmentUniformsException,LinkingException
+    {
+    init(300);
 
-    vertexShader   = insertEnabledEffects(vertexShader  ,enabledVertex  );
-    fragmentShader = insertEnabledEffects(fragmentShader,enabledFragment);
+    doAttributes(vertex  , true );
+    doAttributes(fragment, false);
 
-    final int vertexShaderHandle   = compileShader(GLES30.GL_VERTEX_SHADER  , vertexHeader   + vertexShader  );
-    final int fragmentShaderHandle = compileShader(GLES30.GL_FRAGMENT_SHADER, fragmentHeader + fragmentShader);
+    final int vertexShaderHandle   = compileShader(GLES30.GL_VERTEX_SHADER  , vertex  );
+    final int fragmentShaderHandle = compileShader(GLES30.GL_FRAGMENT_SHADER, fragment);
 
-    mProgramHandle = createAndLinkProgram(vertexShaderHandle, fragmentShaderHandle, mAttributeName, glslVersion>= 300 ? feedback:null );
+    mProgramHandle = createAndLinkProgram(vertexShaderHandle, fragmentShaderHandle, mAttributeName, null );
 
     mAttribute = new int[mNumAttributes];
 
@@ -454,29 +491,6 @@ android.util.Log.d("Program", end.substring(0,40));
     else mUniform = null;
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// PUBLIC API
-///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Create a new Shader Program from source stored in resource files.
-   * <p>
-   * Needs to be called from a thread holding the OpenGL context.
-   *
-   * @param vertex   InputStream containing the opened Resource file from where to read vertex shader code.
-   * @param fragment InputStream containing the opened Resource file from where to read fragment shader code.
-   * @throws FragmentCompilationException
-   * @throws VertexCompilationException
-   * @throws VertexUniformsException
-   * @throws FragmentUniformsException
-   * @throws LinkingException
-   */
-
-  public DistortedProgram(final InputStream vertex, final InputStream fragment, final String vertexHeader, final String fragmentHeader, int glslVersion )
-  throws FragmentCompilationException,VertexCompilationException,VertexUniformsException,FragmentUniformsException,LinkingException
-    {
-    this(vertex,fragment,vertexHeader,fragmentHeader,glslVersion,null);
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Return the handle of the created program so that we can later, say, call glUseProgram.
