commit bc0a685bfc6c6366c53368aa17c81671875c851f
Author: Leszek Koltunski <leszek@distorted.org>
Date:   Tue Jun 14 23:08:01 2016 +0100

    Add License

diff --git a/src/main/java/org/distorted/examples/TableOfContents.java b/src/main/java/org/distorted/examples/TableOfContents.java
index 2b1d3fc..56e23ad 100644
--- a/src/main/java/org/distorted/examples/TableOfContents.java
+++ b/src/main/java/org/distorted/examples/TableOfContents.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples;
 
 import java.util.ArrayList;
diff --git a/src/main/java/org/distorted/examples/bean/BeanActivity.java b/src/main/java/org/distorted/examples/bean/BeanActivity.java
index 92c83c1..e7a361c 100644
--- a/src/main/java/org/distorted/examples/bean/BeanActivity.java
+++ b/src/main/java/org/distorted/examples/bean/BeanActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.bean;
 
diff --git a/src/main/java/org/distorted/examples/bean/BeanRenderer.java b/src/main/java/org/distorted/examples/bean/BeanRenderer.java
index a17248f..3a746da 100644
--- a/src/main/java/org/distorted/examples/bean/BeanRenderer.java
+++ b/src/main/java/org/distorted/examples/bean/BeanRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.bean;
 
diff --git a/src/main/java/org/distorted/examples/bean/BeanSurfaceView.java b/src/main/java/org/distorted/examples/bean/BeanSurfaceView.java
index a9b97bd..996ecda 100644
--- a/src/main/java/org/distorted/examples/bean/BeanSurfaceView.java
+++ b/src/main/java/org/distorted/examples/bean/BeanSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.bean;
 
diff --git a/src/main/java/org/distorted/examples/check/CheckActivity.java b/src/main/java/org/distorted/examples/check/CheckActivity.java
index 3fcba71..98f6322 100644
--- a/src/main/java/org/distorted/examples/check/CheckActivity.java
+++ b/src/main/java/org/distorted/examples/check/CheckActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.check;
 
diff --git a/src/main/java/org/distorted/examples/check/CheckRenderer.java b/src/main/java/org/distorted/examples/check/CheckRenderer.java
index 28c50a9..9ba04a6 100644
--- a/src/main/java/org/distorted/examples/check/CheckRenderer.java
+++ b/src/main/java/org/distorted/examples/check/CheckRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.check;
 
diff --git a/src/main/java/org/distorted/examples/check/CheckSurfaceView.java b/src/main/java/org/distorted/examples/check/CheckSurfaceView.java
index 9426098..50f1b0d 100644
--- a/src/main/java/org/distorted/examples/check/CheckSurfaceView.java
+++ b/src/main/java/org/distorted/examples/check/CheckSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.check;
 
diff --git a/src/main/java/org/distorted/examples/cubes/CubesActivity.java b/src/main/java/org/distorted/examples/cubes/CubesActivity.java
index 763365a..61e9d75 100644
--- a/src/main/java/org/distorted/examples/cubes/CubesActivity.java
+++ b/src/main/java/org/distorted/examples/cubes/CubesActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.cubes;
 
diff --git a/src/main/java/org/distorted/examples/cubes/CubesRenderer.java b/src/main/java/org/distorted/examples/cubes/CubesRenderer.java
index 619add5..97cd735 100644
--- a/src/main/java/org/distorted/examples/cubes/CubesRenderer.java
+++ b/src/main/java/org/distorted/examples/cubes/CubesRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.cubes;
 
@@ -25,9 +43,9 @@ import android.opengl.GLSurfaceView;
 
 class CubesRenderer implements GLSurfaceView.Renderer 
 {
-	private static final int SIZE = 100;
+    private static final int SIZE = 100;
 	
-	private int mCols, mRows;
+    private int mCols, mRows;
 	
     private GLSurfaceView mView;
     private DistortedCubes mCubes;
diff --git a/src/main/java/org/distorted/examples/cubes/CubesSurfaceView.java b/src/main/java/org/distorted/examples/cubes/CubesSurfaceView.java
index 8964ade..8942b12 100644
--- a/src/main/java/org/distorted/examples/cubes/CubesSurfaceView.java
+++ b/src/main/java/org/distorted/examples/cubes/CubesSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.cubes;
 
diff --git a/src/main/java/org/distorted/examples/deform/DeformActivity.java b/src/main/java/org/distorted/examples/deform/DeformActivity.java
index d5d1322..501cd5d 100644
--- a/src/main/java/org/distorted/examples/deform/DeformActivity.java
+++ b/src/main/java/org/distorted/examples/deform/DeformActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.deform;
 
diff --git a/src/main/java/org/distorted/examples/deform/DeformRenderer.java b/src/main/java/org/distorted/examples/deform/DeformRenderer.java
index 1038847..d20e7c7 100644
--- a/src/main/java/org/distorted/examples/deform/DeformRenderer.java
+++ b/src/main/java/org/distorted/examples/deform/DeformRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.deform;
 
diff --git a/src/main/java/org/distorted/examples/deform/DeformSurfaceView.java b/src/main/java/org/distorted/examples/deform/DeformSurfaceView.java
index 09ff288..31f1023 100644
--- a/src/main/java/org/distorted/examples/deform/DeformSurfaceView.java
+++ b/src/main/java/org/distorted/examples/deform/DeformSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.deform;
 
diff --git a/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsActivity.java b/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsActivity.java
index f4c36d9..578aab4 100644
--- a/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsActivity.java
+++ b/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.differentbitmaps;
 
diff --git a/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java b/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java
index 6e35e65..3228968 100644
--- a/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java
+++ b/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.differentbitmaps;
 
diff --git a/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsSurfaceView.java b/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsSurfaceView.java
index 1e586ee..02806ad 100644
--- a/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsSurfaceView.java
+++ b/src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.differentbitmaps;
 
diff --git a/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsActivity.java b/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsActivity.java
index b729416..d835750 100644
--- a/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsActivity.java
+++ b/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.differenteffects;
 
diff --git a/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsRenderer.java b/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsRenderer.java
index 6520f49..81fc116 100644
--- a/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsRenderer.java
+++ b/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.differenteffects;
 
diff --git a/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsSurfaceView.java b/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsSurfaceView.java
index 95f15e0..489bb3c 100644
--- a/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsSurfaceView.java
+++ b/src/main/java/org/distorted/examples/differenteffects/DifferentEffectsSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.differenteffects;
 
diff --git a/src/main/java/org/distorted/examples/effects3d/Effects3DActivity.java b/src/main/java/org/distorted/examples/effects3d/Effects3DActivity.java
index 20403c9..4009b54 100644
--- a/src/main/java/org/distorted/examples/effects3d/Effects3DActivity.java
+++ b/src/main/java/org/distorted/examples/effects3d/Effects3DActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.effects3d;
 
diff --git a/src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java b/src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java
index aaa8aed..ed16cc9 100644
--- a/src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java
+++ b/src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.effects3d;
 
diff --git a/src/main/java/org/distorted/examples/effects3d/Effects3DSurfaceView.java b/src/main/java/org/distorted/examples/effects3d/Effects3DSurfaceView.java
index b40f378..38eb9ae 100644
--- a/src/main/java/org/distorted/examples/effects3d/Effects3DSurfaceView.java
+++ b/src/main/java/org/distorted/examples/effects3d/Effects3DSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.effects3d;
 
diff --git a/src/main/java/org/distorted/examples/fbo/FBOActivity.java b/src/main/java/org/distorted/examples/fbo/FBOActivity.java
index da1976c..d02fc00 100644
--- a/src/main/java/org/distorted/examples/fbo/FBOActivity.java
+++ b/src/main/java/org/distorted/examples/fbo/FBOActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.fbo;
 
diff --git a/src/main/java/org/distorted/examples/fbo/FBORenderer.java b/src/main/java/org/distorted/examples/fbo/FBORenderer.java
index 0723824..5762eb9 100644
--- a/src/main/java/org/distorted/examples/fbo/FBORenderer.java
+++ b/src/main/java/org/distorted/examples/fbo/FBORenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.fbo;
 
diff --git a/src/main/java/org/distorted/examples/fbo/FBOSurfaceView.java b/src/main/java/org/distorted/examples/fbo/FBOSurfaceView.java
index d750ef7..bc28392 100644
--- a/src/main/java/org/distorted/examples/fbo/FBOSurfaceView.java
+++ b/src/main/java/org/distorted/examples/fbo/FBOSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.fbo;
 
diff --git a/src/main/java/org/distorted/examples/fov/FOVActivity.java b/src/main/java/org/distorted/examples/fov/FOVActivity.java
index e67cb7d..babd48f 100644
--- a/src/main/java/org/distorted/examples/fov/FOVActivity.java
+++ b/src/main/java/org/distorted/examples/fov/FOVActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.fov;
 
diff --git a/src/main/java/org/distorted/examples/fov/FOVRenderer.java b/src/main/java/org/distorted/examples/fov/FOVRenderer.java
index e91ad74..46bcc4c 100644
--- a/src/main/java/org/distorted/examples/fov/FOVRenderer.java
+++ b/src/main/java/org/distorted/examples/fov/FOVRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.fov;
 
diff --git a/src/main/java/org/distorted/examples/fov/FOVSurfaceView.java b/src/main/java/org/distorted/examples/fov/FOVSurfaceView.java
index a6f41b5..42fa614 100644
--- a/src/main/java/org/distorted/examples/fov/FOVSurfaceView.java
+++ b/src/main/java/org/distorted/examples/fov/FOVSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.fov;
 
diff --git a/src/main/java/org/distorted/examples/girl/GirlActivity.java b/src/main/java/org/distorted/examples/girl/GirlActivity.java
index ea622d2..660b6d9 100644
--- a/src/main/java/org/distorted/examples/girl/GirlActivity.java
+++ b/src/main/java/org/distorted/examples/girl/GirlActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.girl;
 
diff --git a/src/main/java/org/distorted/examples/girl/GirlRenderer.java b/src/main/java/org/distorted/examples/girl/GirlRenderer.java
index e8ff312..476f985 100644
--- a/src/main/java/org/distorted/examples/girl/GirlRenderer.java
+++ b/src/main/java/org/distorted/examples/girl/GirlRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.girl;
 
diff --git a/src/main/java/org/distorted/examples/girl/GirlSurfaceView.java b/src/main/java/org/distorted/examples/girl/GirlSurfaceView.java
index 7eefe95..5c42060 100644
--- a/src/main/java/org/distorted/examples/girl/GirlSurfaceView.java
+++ b/src/main/java/org/distorted/examples/girl/GirlSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.girl;
 
diff --git a/src/main/java/org/distorted/examples/interpolator/InterpolatorActivity.java b/src/main/java/org/distorted/examples/interpolator/InterpolatorActivity.java
index 8742a70..6203d97 100644
--- a/src/main/java/org/distorted/examples/interpolator/InterpolatorActivity.java
+++ b/src/main/java/org/distorted/examples/interpolator/InterpolatorActivity.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.interpolator;
 
 import org.distorted.library.Distorted;
diff --git a/src/main/java/org/distorted/examples/interpolator/InterpolatorRenderer.java b/src/main/java/org/distorted/examples/interpolator/InterpolatorRenderer.java
index 42863fd..53dbb2b 100644
--- a/src/main/java/org/distorted/examples/interpolator/InterpolatorRenderer.java
+++ b/src/main/java/org/distorted/examples/interpolator/InterpolatorRenderer.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.interpolator;
 
 import javax.microedition.khronos.egl.EGLConfig;
diff --git a/src/main/java/org/distorted/examples/interpolator/InterpolatorSurfaceView.java b/src/main/java/org/distorted/examples/interpolator/InterpolatorSurfaceView.java
index 4aed3d9..73541f2 100644
--- a/src/main/java/org/distorted/examples/interpolator/InterpolatorSurfaceView.java
+++ b/src/main/java/org/distorted/examples/interpolator/InterpolatorSurfaceView.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.interpolator;
 
 import android.content.Context;
diff --git a/src/main/java/org/distorted/examples/listener/ListenerActivity.java b/src/main/java/org/distorted/examples/listener/ListenerActivity.java
index 2678b33..a348d70 100644
--- a/src/main/java/org/distorted/examples/listener/ListenerActivity.java
+++ b/src/main/java/org/distorted/examples/listener/ListenerActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.listener;
 
diff --git a/src/main/java/org/distorted/examples/listener/ListenerRenderer.java b/src/main/java/org/distorted/examples/listener/ListenerRenderer.java
index 3e08bb1..6b614e6 100644
--- a/src/main/java/org/distorted/examples/listener/ListenerRenderer.java
+++ b/src/main/java/org/distorted/examples/listener/ListenerRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.listener;
 
diff --git a/src/main/java/org/distorted/examples/listener/ListenerSurfaceView.java b/src/main/java/org/distorted/examples/listener/ListenerSurfaceView.java
index e909cff..f7f3614 100644
--- a/src/main/java/org/distorted/examples/listener/ListenerSurfaceView.java
+++ b/src/main/java/org/distorted/examples/listener/ListenerSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.listener;
 
diff --git a/src/main/java/org/distorted/examples/macroblock/MacroblockActivity.java b/src/main/java/org/distorted/examples/macroblock/MacroblockActivity.java
index a508eb0..c5ec950 100644
--- a/src/main/java/org/distorted/examples/macroblock/MacroblockActivity.java
+++ b/src/main/java/org/distorted/examples/macroblock/MacroblockActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.macroblock;
 
diff --git a/src/main/java/org/distorted/examples/macroblock/MacroblockRenderer.java b/src/main/java/org/distorted/examples/macroblock/MacroblockRenderer.java
index e28a684..2df9a24 100644
--- a/src/main/java/org/distorted/examples/macroblock/MacroblockRenderer.java
+++ b/src/main/java/org/distorted/examples/macroblock/MacroblockRenderer.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.macroblock;
 
 import java.io.IOException;
diff --git a/src/main/java/org/distorted/examples/macroblock/MacroblockSurfaceView.java b/src/main/java/org/distorted/examples/macroblock/MacroblockSurfaceView.java
index 109fcc4..d81afc7 100644
--- a/src/main/java/org/distorted/examples/macroblock/MacroblockSurfaceView.java
+++ b/src/main/java/org/distorted/examples/macroblock/MacroblockSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.macroblock;
 
diff --git a/src/main/java/org/distorted/examples/monalisa/MonaLisaActivity.java b/src/main/java/org/distorted/examples/monalisa/MonaLisaActivity.java
index ea2662c..9816c7e 100644
--- a/src/main/java/org/distorted/examples/monalisa/MonaLisaActivity.java
+++ b/src/main/java/org/distorted/examples/monalisa/MonaLisaActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.monalisa;
 
diff --git a/src/main/java/org/distorted/examples/monalisa/MonaLisaRenderer.java b/src/main/java/org/distorted/examples/monalisa/MonaLisaRenderer.java
index 8fb7da2..bd37245 100644
--- a/src/main/java/org/distorted/examples/monalisa/MonaLisaRenderer.java
+++ b/src/main/java/org/distorted/examples/monalisa/MonaLisaRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.monalisa;
 
diff --git a/src/main/java/org/distorted/examples/monalisa/MonaLisaSurfaceView.java b/src/main/java/org/distorted/examples/monalisa/MonaLisaSurfaceView.java
index 20e8fb5..9796d33 100644
--- a/src/main/java/org/distorted/examples/monalisa/MonaLisaSurfaceView.java
+++ b/src/main/java/org/distorted/examples/monalisa/MonaLisaSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.monalisa;
 
diff --git a/src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java b/src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java
index aa152ca..68e328f 100644
--- a/src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java
+++ b/src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.movingeffects;
 
 import org.distorted.library.Distorted;
diff --git a/src/main/java/org/distorted/examples/movingeffects/MovingEffectsRenderer.java b/src/main/java/org/distorted/examples/movingeffects/MovingEffectsRenderer.java
index ffca3b4..2f7b029 100644
--- a/src/main/java/org/distorted/examples/movingeffects/MovingEffectsRenderer.java
+++ b/src/main/java/org/distorted/examples/movingeffects/MovingEffectsRenderer.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.movingeffects;
 
 import javax.microedition.khronos.egl.EGLConfig;
diff --git a/src/main/java/org/distorted/examples/movingeffects/MovingEffectsSurfaceView.java b/src/main/java/org/distorted/examples/movingeffects/MovingEffectsSurfaceView.java
index 8577673..4822e99 100644
--- a/src/main/java/org/distorted/examples/movingeffects/MovingEffectsSurfaceView.java
+++ b/src/main/java/org/distorted/examples/movingeffects/MovingEffectsSurfaceView.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.movingeffects;
 
 import android.content.Context;
diff --git a/src/main/java/org/distorted/examples/olimpic/OlimpicActivity.java b/src/main/java/org/distorted/examples/olimpic/OlimpicActivity.java
index 32dd3e1..3042e97 100644
--- a/src/main/java/org/distorted/examples/olimpic/OlimpicActivity.java
+++ b/src/main/java/org/distorted/examples/olimpic/OlimpicActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.olimpic;
 
diff --git a/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java b/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
index 497aa7f..e32ba30 100644
--- a/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
+++ b/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.olimpic;
 
diff --git a/src/main/java/org/distorted/examples/olimpic/OlimpicSurfaceView.java b/src/main/java/org/distorted/examples/olimpic/OlimpicSurfaceView.java
index ddbf240..9e72586 100644
--- a/src/main/java/org/distorted/examples/olimpic/OlimpicSurfaceView.java
+++ b/src/main/java/org/distorted/examples/olimpic/OlimpicSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.olimpic;
 
diff --git a/src/main/java/org/distorted/examples/plainmonalisa/EglCore.java b/src/main/java/org/distorted/examples/plainmonalisa/EglCore.java
index 0441160..22c59bb 100644
--- a/src/main/java/org/distorted/examples/plainmonalisa/EglCore.java
+++ b/src/main/java/org/distorted/examples/plainmonalisa/EglCore.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.plainmonalisa;
 
 import android.graphics.SurfaceTexture;
@@ -11,30 +30,17 @@ import android.util.Log;
 import android.view.Surface;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Core EGL state (display, context, config).
- * <p>
- * The EGLContext must only be attached to one thread at a time.  This class is not thread-safe.
- */
+
 public final class EglCore
   {
   private static final String TAG = "EglCore";
 
-  /**
-   * Constructor flag: surface must be recordable.  This discourages EGL from using a
-   * pixel format that cannot be converted efficiently to something usable by the video
-   * encoder.
-   */
-  public static final int FLAG_RECORDABLE = 0x01;
-
-  /**
-   * Constructor flag: ask for GLES3, fall back to GLES2 if not available.  Without this
-   * flag, GLES2 is used.
-   */
-  public static final int FLAG_TRY_GLES3 = 0x02;
+  public static final int FLAG_RECORDABLE = 0x01;           // Surface must be recordable.  This discourages EGL from using a
+                                                            // pixel format that cannot be converted efficiently to something 
+                                                            // usable by the video encoder.
+  public static final int FLAG_TRY_GLES3 = 0x02;            // Ask for GLES3, fall back to GLES2 if not available.
 
-  // Android-specific extension.
-  private static final int EGL_RECORDABLE_ANDROID = 0x3142;
+  private static final int EGL_RECORDABLE_ANDROID = 0x3142; // Android-specific extension
 
   private EGLDisplay mEGLDisplay = EGL14.EGL_NO_DISPLAY;
   private EGLContext mEGLContext = EGL14.EGL_NO_CONTEXT;
@@ -42,23 +48,14 @@ public final class EglCore
   private int mGlVersion = -1;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Prepares EGL display and context.
-   * <p>
-   * Equivalent to EglCore(null, 0).
-   */
+
   public EglCore()
     {
     this(null, 0);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Prepares EGL display and context.
-   * <p>
-   * @param sharedContext The context to share, or null if sharing is not desired.
-   * @param flags Configuration bit flags, e.g. FLAG_RECORDABLE.
-   */
+
   public EglCore(EGLContext sharedContext, int flags)
     {
     if (mEGLDisplay != EGL14.EGL_NO_DISPLAY)
@@ -132,12 +129,7 @@ public final class EglCore
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Finds a suitable EGLConfig.
-   *
-   * @param flags Bit flags from constructor.
-   * @param version Must be 2 or 3.
-   */
+
   private EGLConfig getConfig(int flags, int version)
     {
     int renderableType = EGL14.EGL_OPENGL_ES2_BIT;
@@ -182,12 +174,7 @@ public final class EglCore
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Discards all resources held by this class, notably the EGL context.  This must be
-   * called from the thread where the context was created.
-   * <p>
-   * On completion, no context will be current.
-   */
+
   public void release()
     {
     if (mEGLDisplay != EGL14.EGL_NO_DISPLAY)
@@ -226,21 +213,14 @@ public final class EglCore
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Destroys the specified surface.  Note the EGLSurface won't actually be destroyed if it's
-   * still current in a context.
-   */
+
   public void releaseSurface(EGLSurface eglSurface)
     {
     EGL14.eglDestroySurface(mEGLDisplay, eglSurface);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Creates an EGL surface associated with a Surface.
-   * <p>
-   * If this is destined for MediaCodec, the EGLConfig should have the "recordable" attribute.
-   */
+
   public EGLSurface createWindowSurface(Object surface)
     {
     if (!(surface instanceof Surface) && !(surface instanceof SurfaceTexture))
@@ -248,7 +228,6 @@ public final class EglCore
       throw new RuntimeException("invalid surface: " + surface);
       }
 
-    // Create a window surface, and attach it to the Surface we received.
     int[] surfaceAttribs = { EGL14.EGL_NONE };
     EGLSurface eglSurface = EGL14.eglCreateWindowSurface(mEGLDisplay, mEGLConfig, surface, surfaceAttribs, 0);
     checkEglError("eglCreateWindowSurface");
@@ -261,14 +240,11 @@ public final class EglCore
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Makes our EGL context current, using the supplied surface for both "draw" and "read".
-   */
+
   public void makeCurrent(EGLSurface eglSurface)
     {
     if (mEGLDisplay == EGL14.EGL_NO_DISPLAY)
       {
-      // called makeCurrent() before create?
       Log.d(TAG, "NOTE: makeCurrent w/o display");
       }
     if (!EGL14.eglMakeCurrent(mEGLDisplay, eglSurface, eglSurface, mEGLContext))
@@ -278,9 +254,7 @@ public final class EglCore
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Makes no context current.
-   */
+
   public void makeNothingCurrent()
     {
     if (!EGL14.eglMakeCurrent(mEGLDisplay, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT))
@@ -290,29 +264,21 @@ public final class EglCore
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Returns the GLES version this context is configured for (currently 2 or 3).
-   */
+
   public int getGlVersion()
     {
     return mGlVersion;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Calls eglSwapBuffers.  Use this to "publish" the current frame.
-   *
-   * @return false on failure
-   */
+
   public boolean swapBuffers(EGLSurface eglSurface)
     {
     return EGL14.eglSwapBuffers(mEGLDisplay, eglSurface);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Checks for EGL errors.  Throws an exception if an error has been raised.
-   */
+
   private void checkEglError(String msg)
     {
     int error;
@@ -323,4 +289,3 @@ public final class EglCore
       }
     }
   }
-///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/examples/plainmonalisa/PlainMonaLisaActivity.java b/src/main/java/org/distorted/examples/plainmonalisa/PlainMonaLisaActivity.java
index c3b4c60..3163417 100644
--- a/src/main/java/org/distorted/examples/plainmonalisa/PlainMonaLisaActivity.java
+++ b/src/main/java/org/distorted/examples/plainmonalisa/PlainMonaLisaActivity.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.plainmonalisa;
 
 import org.distorted.library.Distorted;
diff --git a/src/main/java/org/distorted/examples/plainmonalisa/PlainMonaLisaSurfaceView.java b/src/main/java/org/distorted/examples/plainmonalisa/PlainMonaLisaSurfaceView.java
index b0df0e7..6dc2852 100644
--- a/src/main/java/org/distorted/examples/plainmonalisa/PlainMonaLisaSurfaceView.java
+++ b/src/main/java/org/distorted/examples/plainmonalisa/PlainMonaLisaSurfaceView.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.plainmonalisa;
 
 import android.content.Context;
diff --git a/src/main/java/org/distorted/examples/plainmonalisa/RenderHandler.java b/src/main/java/org/distorted/examples/plainmonalisa/RenderHandler.java
index 9de4cae..6c8e420 100644
--- a/src/main/java/org/distorted/examples/plainmonalisa/RenderHandler.java
+++ b/src/main/java/org/distorted/examples/plainmonalisa/RenderHandler.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.plainmonalisa;
 
 import android.os.Handler;
@@ -7,13 +26,8 @@ import android.util.Log;
 import java.lang.ref.WeakReference;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
+// Used for messages sent from the UI thread to the render thread.
 
-/**
- * Handler for RenderThread.  Used for messages sent from the UI thread to the render thread.
- * <p>
- * The object is created on the render thread, and the various "send" methods are called
- * from the UI thread.
- */
 public class RenderHandler extends Handler
   {
   private static final String TAG = "RenderHandler";
@@ -23,69 +37,49 @@ public class RenderHandler extends Handler
   private static final int MSG_DO_FRAME = 2;
   private static final int MSG_SHUTDOWN = 4;
 
-  // This shouldn't need to be a weak ref, since we'll go away when the Looper quits,
-  // but no real harm in it.
   private WeakReference<RenderThread> mWeakRenderThread;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Call from render thread.
-   */
+
   public RenderHandler(RenderThread rt)
-      {
-      mWeakRenderThread = new WeakReference<>(rt);
-      }
+    {
+    mWeakRenderThread = new WeakReference<>(rt);
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Sends the "surface created" message.
-   * <p>
-   * Call from UI thread.
-   */
+
   public void sendSurfaceCreated()
     {
     sendMessage(obtainMessage(RenderHandler.MSG_SURFACE_CREATED));
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Sends the "surface changed" message, forwarding what we got from the SurfaceHolder.
-   * <p>
-   * Call from UI thread.
-   */
-  public void sendSurfaceChanged(@SuppressWarnings("unused") int format, int width, int height)
+
+  public void sendSurfaceChanged(int format, int width, int height)
     {
     sendMessage(obtainMessage(RenderHandler.MSG_SURFACE_CHANGED, width, height));
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Sends the "do frame" message, forwarding the Choreographer event.
-   * <p>
-   * Call from UI thread.
-   */
+
   public void sendDoFrame(long frameTimeNanos)
     {
     sendMessage(obtainMessage(RenderHandler.MSG_DO_FRAME, (int) (frameTimeNanos >> 32), (int) frameTimeNanos));
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Sends the "shutdown" message, which tells the render thread to halt.
-   * <p>
-   * Call from UI thread.
-   */
+
   public void sendShutdown()
-      {
-      sendMessage(obtainMessage(RenderHandler.MSG_SHUTDOWN));
-      }
+    {
+    sendMessage(obtainMessage(RenderHandler.MSG_SHUTDOWN));
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
   @Override  // runs on RenderThread
   public void handleMessage(Message msg)
     {
     int what = msg.what;
-    //Log.d(TAG, "RenderHandler [" + this + "]: what=" + what);
+
     RenderThread renderThread = mWeakRenderThread.get();
 
     if (renderThread == null)
diff --git a/src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java b/src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java
index 51c4d1a..f4fa972 100644
--- a/src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java
+++ b/src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.plainmonalisa;
 
 import android.graphics.Bitmap;
@@ -24,11 +43,7 @@ import java.io.IOException;
 import java.io.InputStream;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * This class handles all OpenGL rendering.
- * <p>
- * Start the render thread after the Surface has been created.
- */
+
 public class RenderThread extends Thread
   {
   private static final String TAG = "RenderThread";
@@ -55,9 +70,7 @@ public class RenderThread extends Thread
   SurfaceView mView;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Pass in the SurfaceView's SurfaceHolder.  Note the Surface may not yet exist.
-   */
+
   public RenderThread(SurfaceHolder holder, SurfaceView view)
     {
     mSurfaceHolder = holder;
@@ -74,13 +87,7 @@ public class RenderThread extends Thread
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Thread entry point.
-   * <p>
-   * The thread should not be started until the Surface associated with the SurfaceHolder
-   * has been created.  That way we don't have to wait for a separate "surface created"
-   * message to arrive.
-   */
+
   @Override
   public void run()
     {
@@ -117,11 +124,7 @@ public class RenderThread extends Thread
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Waits until the render thread is ready to receive messages.
-   * <p>
-   * Call from the UI thread.
-   */
+
   public void waitUntilReady()
     {
     synchronized (mStartLock)
@@ -132,15 +135,13 @@ public class RenderThread extends Thread
           {
           mStartLock.wait();
           }
-        catch (InterruptedException ie) { /* not expected */ }
+        catch (InterruptedException ie) {  }
         }
       }
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Shuts everything down.
-   */
+
   void shutdown()
     {
     Log.d(TAG, "shutdown");
@@ -148,18 +149,14 @@ public class RenderThread extends Thread
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Returns the render thread's Handler.  This may be called from any thread.
-   */
+
   public RenderHandler getHandler()
-      {
-      return mHandler;
-      }
+    {
+    return mHandler;
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Prepares the surface.
-   */
+
   void surfaceCreated()
     {
     Surface surface = mSurfaceHolder.getSurface();
@@ -253,4 +250,3 @@ public class RenderThread extends Thread
       }
     }
   }
-///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/examples/quaternion/QuaternionActivity.java b/src/main/java/org/distorted/examples/quaternion/QuaternionActivity.java
index 352fef9..6ef57a5 100644
--- a/src/main/java/org/distorted/examples/quaternion/QuaternionActivity.java
+++ b/src/main/java/org/distorted/examples/quaternion/QuaternionActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.quaternion;
 
@@ -9,43 +27,43 @@ import android.os.Bundle;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 public class QuaternionActivity extends Activity
-{
-    private QuaternionSurfaceView mView;
+  {
+  private QuaternionSurfaceView mView;
     
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onCreate(Bundle icicle) 
-      {
-      super.onCreate(icicle);
-      mView = new QuaternionSurfaceView(this);
-      setContentView(mView);     
-      }
+  @Override
+  protected void onCreate(Bundle icicle) 
+    {
+    super.onCreate(icicle);
+    mView = new QuaternionSurfaceView(this);
+    setContentView(mView);     
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onPause() 
-      {
-      mView.onPause();  
-      super.onPause();
-      }
+  @Override
+  protected void onPause() 
+    {
+    mView.onPause();  
+    super.onPause();
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onResume() 
-      {
-      super.onResume();
-      mView.onResume();  
-      }
+  @Override
+  protected void onResume() 
+    {
+    super.onResume();
+    mView.onResume();  
+    }
     
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onDestroy() 
-      {
-      Distorted.onDestroy();  
-      super.onDestroy();
-      }
-}
+  @Override
+  protected void onDestroy() 
+    {
+    Distorted.onDestroy();  
+    super.onDestroy();
+    }
+  }
diff --git a/src/main/java/org/distorted/examples/quaternion/QuaternionRenderer.java b/src/main/java/org/distorted/examples/quaternion/QuaternionRenderer.java
index 0f7fc76..99f084f 100644
--- a/src/main/java/org/distorted/examples/quaternion/QuaternionRenderer.java
+++ b/src/main/java/org/distorted/examples/quaternion/QuaternionRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.quaternion;
 
@@ -26,104 +44,104 @@ import android.opengl.GLSurfaceView;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 class QuaternionRenderer implements GLSurfaceView.Renderer 
-{
-	private static final int NUM_QUATERNIONS = 5;
-	private static final int SIZE = 100;
+  {
+  private static final int NUM_QUATERNIONS = 5;
+  private static final int SIZE = 100;
 	
-    private GLSurfaceView mView;
-    private DistortedCubes mCube;
-    private Random mRnd = new Random(System.currentTimeMillis());
-    private InterpolatorQuat mRot;
+  private GLSurfaceView mView;
+  private DistortedCubes mCube;
+  private Random mRnd = new Random(System.currentTimeMillis());
+  private InterpolatorQuat mRot;
     
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public QuaternionRenderer(GLSurfaceView v) 
-      {
-      mView = v;
-      mCube = new DistortedCubes( 3, "000010000", SIZE);
+  public QuaternionRenderer(GLSurfaceView v) 
+    {
+    mView = v;
+    mCube = new DistortedCubes( 3, "000010000", SIZE);
       
-      mRot = new InterpolatorQuat();
+    mRot = new InterpolatorQuat();
       
-      float x,y,z,w, len;
+    float x,y,z,w, len;
       
-      for(int i=0; i<NUM_QUATERNIONS; i++)
-        {
-        x = 2*mRnd.nextFloat()-1;  
-        y = 2*mRnd.nextFloat()-1;  
-        z = 2*mRnd.nextFloat()-1;  
-        w = 2*mRnd.nextFloat()-1;  
+    for(int i=0; i<NUM_QUATERNIONS; i++)
+      {
+      x = 2*mRnd.nextFloat()-1;  
+      y = 2*mRnd.nextFloat()-1;  
+      z = 2*mRnd.nextFloat()-1;  
+      w = 2*mRnd.nextFloat()-1;  
     	 
-        len = (float)Math.sqrt( x*x+y*y+z*z+w*w );
+      len = (float)Math.sqrt( x*x+y*y+z*z+w*w );
     		
-        mRot.add(new Float4D(x/len,y/len,z/len,w/len));
-        }
-    
-      mRot.setCount(0);
-      mRot.setDuration(8000);
-      mRot.setMode(Interpolator.MODE_LOOP);
+      mRot.add(new Float4D(x/len,y/len,z/len,w/len));
       }
+    
+    mRot.setCount(0);
+    mRot.setDuration(8000);
+    mRot.setMode(Interpolator.MODE_LOOP);
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
    
-    public void onDrawFrame(GL10 glUnused) 
-      {
-      GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
-      GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
+  public void onDrawFrame(GL10 glUnused) 
+    {
+    GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+    GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
       
-      mCube.draw(System.currentTimeMillis());
-      }
+    mCube.draw(System.currentTimeMillis());
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public void onSurfaceChanged(GL10 glUnused, int width, int height) 
-      {
-      mCube.abortEffects(EffectTypes.MATRIX);
+  public void onSurfaceChanged(GL10 glUnused, int width, int height) 
+    {
+    mCube.abortEffects(EffectTypes.MATRIX);
 
-      if( width > height )
-        {
-        mCube.move((width-height)/2 ,0, 0);
-        mCube.scale(height/(3.0f*SIZE));
-        }  
-      else
-        {   
-        mCube.move(0 ,(height-width)/2, 0);
-        mCube.scale(width/(3.0f*SIZE));
-        }
+    if( width > height )
+      {
+      mCube.move((width-height)/2 ,0, 0);
+      mCube.scale(height/(3.0f*SIZE));
+      }  
+    else
+      {   
+      mCube.move(0 ,(height-width)/2, 0);
+      mCube.scale(width/(3.0f*SIZE));
+      }
      
-      mCube.quaternion( new Float3D(3*SIZE/2,3*SIZE/2,0), mRot);
+    mCube.quaternion( new Float3D(3*SIZE/2,3*SIZE/2,0), mRot);
        
-      Distorted.onSurfaceChanged(width, height); 
-      }
+    Distorted.onSurfaceChanged(width, height); 
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
-      {
-      InputStream is = mView.getContext().getResources().openRawResource(R.raw.grid);
-      Bitmap bitmap;
+  public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
+    {
+    InputStream is = mView.getContext().getResources().openRawResource(R.raw.grid);
+    Bitmap bitmap;
         
+    try 
+      {
+      bitmap = BitmapFactory.decodeStream(is);
+      } 
+    finally 
+      {
       try 
         {
-        bitmap = BitmapFactory.decodeStream(is);
+        is.close();
         } 
-      finally 
-        {
-        try 
-          {
-          is.close();
-          } 
-        catch(IOException e) { }
-        }  
+      catch(IOException e) { }
+      }  
       
-      mCube.setBitmap(bitmap);
+    mCube.setBitmap(bitmap);
       
-      try
-        {
-        Distorted.onSurfaceCreated(mView.getContext());
-        }
-      catch(Exception ex)
-        {
-        android.util.Log.e("Quaternion", ex.getMessage() );
-        }
+    try
+      {
+      Distorted.onSurfaceCreated(mView.getContext());
+      }
+    catch(Exception ex)
+      {
+      android.util.Log.e("Quaternion", ex.getMessage() );
       }
-}
+    }
+  }
diff --git a/src/main/java/org/distorted/examples/quaternion/QuaternionSurfaceView.java b/src/main/java/org/distorted/examples/quaternion/QuaternionSurfaceView.java
index c38fc1f..238158b 100644
--- a/src/main/java/org/distorted/examples/quaternion/QuaternionSurfaceView.java
+++ b/src/main/java/org/distorted/examples/quaternion/QuaternionSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.quaternion;
 
@@ -8,24 +26,22 @@ import android.os.Build;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 class QuaternionSurfaceView extends GLSurfaceView 
-{
-///////////////////////////////////////////////////////////////////////////////////////////////////
-   
-    public QuaternionSurfaceView(Context c) 
-      {
-      super(c);
+  {
+  public QuaternionSurfaceView(Context c) 
+    {
+    super(c);
       
-      if(!isInEditMode())
-        {
-        setEGLContextClientVersion(2);
-        
-        if( Build.FINGERPRINT.startsWith("generic") )
-          { 
-          setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
-          }
+    if(!isInEditMode())
+      {
+      setEGLContextClientVersion(2);
         
-        setRenderer(new QuaternionRenderer(this));
+      if( Build.FINGERPRINT.startsWith("generic") )
+        { 
+        setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
         }
+        
+      setRenderer(new QuaternionRenderer(this));
       }
-}
+    }
+  }
 
diff --git a/src/main/java/org/distorted/examples/save/SaveActivity.java b/src/main/java/org/distorted/examples/save/SaveActivity.java
index 1d45996..4f1b53f 100644
--- a/src/main/java/org/distorted/examples/save/SaveActivity.java
+++ b/src/main/java/org/distorted/examples/save/SaveActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.save;
 
@@ -14,78 +32,78 @@ import android.widget.SeekBar;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 public class SaveActivity extends Activity implements SeekBar.OnSeekBarChangeListener
-{
-    private Button mSave;
-    private SeekBar barSize;
+  {
+  private Button mSave;
+  private SeekBar barSize;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onCreate(Bundle icicle) 
-      {
-      super.onCreate(icicle);
-      
-      setContentView(R.layout.savelayout);
+  @Override
+  protected void onCreate(Bundle icicle) 
+    {
+    super.onCreate(icicle);
+     
+    setContentView(R.layout.savelayout);
            
-      mSave = (Button)findViewById(R.id.saveButton);
+    mSave = (Button)findViewById(R.id.saveButton);
 
-      barSize  = (SeekBar)findViewById(R.id.saveSeekBar);
-      barSize.setOnSeekBarChangeListener(this);
-      barSize.setProgress(50);
-      }
+    barSize  = (SeekBar)findViewById(R.id.saveSeekBar);
+    barSize.setOnSeekBarChangeListener(this);
+    barSize.setProgress(50);
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onPause() 
-      {
-      GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.saveSurfaceView);
-      mView.onPause();
+  @Override
+  protected void onPause() 
+    {
+    GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.saveSurfaceView);
+    mView.onPause();
       
-      super.onPause();
-      }
+    super.onPause();
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onResume() 
-      {
-      super.onResume();
+  @Override
+  protected void onResume() 
+    {
+    super.onResume();
       
-      GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.saveSurfaceView);
-      mView.onResume();
-      }
+    GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.saveSurfaceView);
+    mView.onResume();
+    }
  
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onDestroy() 
-      {
-      Distorted.onDestroy();  
-      super.onDestroy();
-      }
+  @Override
+  protected void onDestroy() 
+    {
+    Distorted.onDestroy();  
+    super.onDestroy();
+    }
    
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void Save(View v)
-      {
-      SaveRenderer.Save();
-      }
+  public void Save(View v)
+    {
+    SaveRenderer.Save();
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void onProgressChanged(SeekBar bar, int progress, boolean fromUser)
-      {
-      float s = (progress>50 ? ((progress-50)/16.0f + 1.0f):(0.015f*progress + 0.25f));
-      SaveRenderer.setSize(s);
-      }
+  public void onProgressChanged(SeekBar bar, int progress, boolean fromUser)
+    {
+    float s = (progress>50 ? ((progress-50)/16.0f + 1.0f):(0.015f*progress + 0.25f));
+    SaveRenderer.setSize(s);
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void onStartTrackingTouch(SeekBar bar) { }
+  public void onStartTrackingTouch(SeekBar bar) { }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void onStopTrackingTouch(SeekBar bar)  { }
+  public void onStopTrackingTouch(SeekBar bar)  { }
 
-}
+  }
diff --git a/src/main/java/org/distorted/examples/save/SaveRenderer.java b/src/main/java/org/distorted/examples/save/SaveRenderer.java
index da2412d..975f42e 100644
--- a/src/main/java/org/distorted/examples/save/SaveRenderer.java
+++ b/src/main/java/org/distorted/examples/save/SaveRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.save;
 
diff --git a/src/main/java/org/distorted/examples/save/SaveSurfaceView.java b/src/main/java/org/distorted/examples/save/SaveSurfaceView.java
index 44eb047..9938c4d 100644
--- a/src/main/java/org/distorted/examples/save/SaveSurfaceView.java
+++ b/src/main/java/org/distorted/examples/save/SaveSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.save;
 
@@ -9,21 +27,19 @@ import android.util.AttributeSet;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 class SaveSurfaceView extends GLSurfaceView 
-{
-///////////////////////////////////////////////////////////////////////////////////////////////////
-   
+  {
   public SaveSurfaceView(Context c, AttributeSet attrs)
-      {
-      super(c, attrs);
+    {
+    super(c, attrs);
      
-      setEGLContextClientVersion(2);
-        
-      if( Build.FINGERPRINT.startsWith("generic") )
-        { 
-        setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
-        }
-        
-      setRenderer(new SaveRenderer(this));
+    setEGLContextClientVersion(2);
+      
+    if( Build.FINGERPRINT.startsWith("generic") )
+      { 
+      setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
       }
-}
+        
+    setRenderer(new SaveRenderer(this));
+    }
+  }
 
diff --git a/src/main/java/org/distorted/examples/scratchpad/ScratchpadActivity.java b/src/main/java/org/distorted/examples/scratchpad/ScratchpadActivity.java
index e5ba42b..7e318de 100644
--- a/src/main/java/org/distorted/examples/scratchpad/ScratchpadActivity.java
+++ b/src/main/java/org/distorted/examples/scratchpad/ScratchpadActivity.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.scratchpad;
 
 import org.distorted.library.Distorted;
@@ -11,165 +30,167 @@ import android.widget.SeekBar.OnSeekBarChangeListener;
 import android.widget.SeekBar;
 import android.widget.TextView;
 
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 public class ScratchpadActivity extends Activity implements OnSeekBarChangeListener
-    {
-    private static final float D_MULT=200.0f;
-    private static final float C_MULT=  0.1f;
+  {
+  private static final float D_MULT=200.0f;
+  private static final float C_MULT=  0.1f;
    
-    private long effectID;
+  private long effectID;
    
-    private SeekBar barD, barC, barI;
-    private TextView textD, textC, textI;
+  private SeekBar barD, barC, barI;
+  private TextView textD, textC, textI;
    
-///////////////////////////////////////////////////////////////////
-    @Override
-    protected void onCreate(Bundle savedInstanceState) 
-      {
-      super.onCreate(savedInstanceState);
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  protected void onCreate(Bundle savedInstanceState) 
+    {
+    super.onCreate(savedInstanceState);
  
-      setContentView(R.layout.scratchpadlayout);
+    setContentView(R.layout.scratchpadlayout);
       
-      barD = (SeekBar)findViewById(R.id.scratchpadSeekDuration);
-      barD.setOnSeekBarChangeListener(this); 
-      barC = (SeekBar)findViewById(R.id.scratchpadSeekCount);
-      barC.setOnSeekBarChangeListener(this); 
-      barI = (SeekBar)findViewById(R.id.scratchpadSeekID);
-      barI.setOnSeekBarChangeListener(this); 
+    barD = (SeekBar)findViewById(R.id.scratchpadSeekDuration);
+    barD.setOnSeekBarChangeListener(this); 
+    barC = (SeekBar)findViewById(R.id.scratchpadSeekCount);
+    barC.setOnSeekBarChangeListener(this); 
+    barI = (SeekBar)findViewById(R.id.scratchpadSeekID);
+    barI.setOnSeekBarChangeListener(this); 
         
-      textD = (TextView)findViewById(R.id.scratchpadTextDuration);
-      textC = (TextView)findViewById(R.id.scratchpadTextCount);
-      textI = (TextView)findViewById(R.id.scratchpadTextID);
+    textD = (TextView)findViewById(R.id.scratchpadTextDuration);
+    textC = (TextView)findViewById(R.id.scratchpadTextCount);
+    textI = (TextView)findViewById(R.id.scratchpadTextID);
       
-      barD.setProgress(100);
-      barC.setProgress(10);
-      barI.setProgress(0);
+    barD.setProgress(100);
+    barC.setProgress(10);
+    barI.setProgress(0);
       
-      textD.setText("Dur: 20 s");
-      textC.setText("Cou: 1.0");
-      textI.setText("ID: 0");
-      }
+    textD.setText("Dur: 20 s");
+    textC.setText("Cou: 1.0");
+    textI.setText("ID: 0");
+    }
 
-///////////////////////////////////////////////////////////////////
-    @Override
-    protected void onResume() 
-      {
-      super.onResume();
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  protected void onResume() 
+    {
+    super.onResume();
       
-      GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.scratchpadSurfaceView);
-      mView.onResume();
-      }
+    GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.scratchpadSurfaceView);
+    mView.onResume();
+    }
 
-///////////////////////////////////////////////////////////////////
-    @Override
-    protected void onPause() 
-      {
-      GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.scratchpadSurfaceView);
-      mView.onPause();
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  protected void onPause() 
+    {
+    GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.scratchpadSurfaceView);
+    mView.onPause();
       
-      super.onPause();
-      }
+    super.onPause();
+    }
     
-///////////////////////////////////////////////////////////////////
-    @Override
-    public void onStop()
-      {
-      super.onStop();
-      }
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-///////////////////////////////////////////////////////////////////
-    @Override
-    public void onDestroy()
-      {
-      Distorted.onDestroy();
-      super.onDestroy();
-      }     
+  @Override
+  public void onStop()
+    {
+    super.onStop();
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public void onDestroy()
+    {
+    Distorted.onDestroy();
+    super.onDestroy();
+    }     
  
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public void Distort(View v)
-      {
-      ScratchpadSurfaceView.setEffect(0);
-      }     
+  public void Distort(View v)
+    {
+    ScratchpadSurfaceView.setEffect(0);
+    }     
     
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void Sink(View v)
-      {
-      ScratchpadSurfaceView.setEffect(1);
-      }       
+  public void Sink(View v)
+    {
+    ScratchpadSurfaceView.setEffect(1);
+    }       
 
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public void Transparency(View v)
-      {
-      ScratchpadSurfaceView.setEffect(2);
-      }     
+  public void Transparency(View v)
+    {
+    ScratchpadSurfaceView.setEffect(2);
+    }     
     
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void Macroblock(View v)
-      {
-      ScratchpadSurfaceView.setEffect(3);
-      }       
+  public void Macroblock(View v)
+    {
+    ScratchpadSurfaceView.setEffect(3);
+    }       
  
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void Brightness(View v)
-      {
-      ScratchpadSurfaceView.setEffect(4);
-      }       
+  public void Brightness(View v)
+    {
+    ScratchpadSurfaceView.setEffect(4);
+    }       
      
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void Print(View v)
-      {
-      ScratchpadRenderer.mBackground.printEffect(effectID);
-      }
+  public void Print(View v)
+    {
+    ScratchpadRenderer.mBackground.printEffect(effectID);
+    }
 
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void Abort(View v)
-      {
-      ScratchpadRenderer.mBackground.abortEffect(effectID);
-      }
+  public void Abort(View v)
+    {
+    ScratchpadRenderer.mBackground.abortEffect(effectID);
+    }
 
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public void onProgressChanged(SeekBar bar, int progress, boolean fromUser) 
-      {
-      float v, t; 
-      int i;
+  public void onProgressChanged(SeekBar bar, int progress, boolean fromUser) 
+    {
+    float v, t; 
+    int i;
       
-      switch (bar.getId()) 
-        {
-        case R.id.scratchpadSeekDuration: v = progress*D_MULT;
-                                          i = (int)(v/100);
-                                          t = i/10.0f;
-                                          ScratchpadSurfaceView.setDuration((int)v);
-                                          textD.setText("Dur: "+(int)t+" s");
-                                          break;
-        case R.id.scratchpadSeekCount   : v = progress*C_MULT;
-                                          i = (int)(v*10);
-                                          t = i/10.0f;
-                                          ScratchpadSurfaceView.setCount(v);
-                                          textC.setText("Cou: "+t);
-                                          break;
-        case R.id.scratchpadSeekID      : effectID = progress;
-                                          textI.setText("ID: "+progress);
-                                          break;                        
-        }
+    switch (bar.getId()) 
+      {
+      case R.id.scratchpadSeekDuration: v = progress*D_MULT;
+                                        i = (int)(v/100);
+                                        t = i/10.0f;
+                                        ScratchpadSurfaceView.setDuration((int)v);
+                                        textD.setText("Dur: "+(int)t+" s");
+                                        break;
+      case R.id.scratchpadSeekCount   : v = progress*C_MULT;
+                                        i = (int)(v*10);
+                                        t = i/10.0f;
+                                        ScratchpadSurfaceView.setCount(v);
+                                        textC.setText("Cou: "+t);
+                                        break;
+      case R.id.scratchpadSeekID      : effectID = progress;
+                                        textI.setText("ID: "+progress);
+                                        break;                        
       }
+    }
 
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void onStartTrackingTouch(SeekBar bar) { }
+  public void onStartTrackingTouch(SeekBar bar) { }
     
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void onStopTrackingTouch(SeekBar bar)  { }
-    
-///////////////////////////////////////////////////////////////////
-// end of file
-}
+  public void onStopTrackingTouch(SeekBar bar)  { }
+  }
diff --git a/src/main/java/org/distorted/examples/scratchpad/ScratchpadRenderer.java b/src/main/java/org/distorted/examples/scratchpad/ScratchpadRenderer.java
index 3185472..9e6466e 100644
--- a/src/main/java/org/distorted/examples/scratchpad/ScratchpadRenderer.java
+++ b/src/main/java/org/distorted/examples/scratchpad/ScratchpadRenderer.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.scratchpad;
 
 import javax.microedition.khronos.egl.EGLConfig;
@@ -17,78 +36,76 @@ import org.distorted.library.EffectTypes;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 public class ScratchpadRenderer implements GLSurfaceView.Renderer 
-   {  
-   public static final int NUMLINES = 10;
-   public static final int BWID = 300;
-   public static final int BHEI = 400;
+  {  
+  public static final int NUMLINES = 10;
+  public static final int BWID = 300;
+  public static final int BHEI = 400;
    
-   private GLSurfaceView mView;
-   public static DistortedBitmap mBackground;
-   private Paint mPaint;
-   private int texWidth, texHeight;
+  private GLSurfaceView mView;
+  public static DistortedBitmap mBackground;
+  private Paint mPaint;
+  private int texWidth, texHeight;
     
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-   public ScratchpadRenderer(GLSurfaceView v)
-     {    
-     mPaint = new Paint();
-     mPaint.setAntiAlias(true);
-     mPaint.setFakeBoldText(true);
-     mPaint.setStyle(Style.FILL);
+  public ScratchpadRenderer(GLSurfaceView v)
+    {    
+    mPaint = new Paint();
+    mPaint.setAntiAlias(true);
+    mPaint.setFakeBoldText(true);
+    mPaint.setStyle(Style.FILL);
       
-     mView = v;
+    mView = v;
       
-     texWidth = BWID;
-     texHeight= BHEI;
-     }
+    texWidth = BWID;
+    texHeight= BHEI;
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
    
-   public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
-     {      
-     mBackground = new DistortedBitmap(texWidth,texHeight, 80);
-     Bitmap bitmap = Bitmap.createBitmap(texWidth,texHeight, Bitmap.Config.ARGB_8888);
-     Canvas canvas = new Canvas(bitmap);  
+  public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
+    {      
+    mBackground = new DistortedBitmap(texWidth,texHeight, 80);
+    Bitmap bitmap = Bitmap.createBitmap(texWidth,texHeight, Bitmap.Config.ARGB_8888);
+    Canvas canvas = new Canvas(bitmap);  
       
-     mPaint.setColor(0xff008800);
-     canvas.drawRect(0, 0, texWidth, texHeight, mPaint);
-     mPaint.setColor(0xffffffff);
+    mPaint.setColor(0xff008800);
+    canvas.drawRect(0, 0, texWidth, texHeight, mPaint);
+    mPaint.setColor(0xffffffff);
          
-     for(int i=0; i<=NUMLINES ; i++ )
-       {
-       canvas.drawRect(texWidth*i/NUMLINES - 1,                       0,  texWidth*i/NUMLINES + 1,  texHeight               , mPaint);
-       canvas.drawRect(                      0, texHeight*i/NUMLINES -1,  texWidth               ,  texHeight*i/NUMLINES + 1, mPaint);  
-       }
+    for(int i=0; i<=NUMLINES ; i++ )
+      {
+      canvas.drawRect(texWidth*i/NUMLINES - 1,                       0,  texWidth*i/NUMLINES + 1,  texHeight               , mPaint);
+      canvas.drawRect(                      0, texHeight*i/NUMLINES -1,  texWidth               ,  texHeight*i/NUMLINES + 1, mPaint);  
+      }
           
-     mBackground.setBitmap(bitmap);
+    mBackground.setBitmap(bitmap);
           
-     try
-       {
-       Distorted.onSurfaceCreated(mView.getContext());
-       }
-     catch(Exception ex)
-       {
-       android.util.Log.e("Scratchpad", ex.getMessage() );
-       }
-     }
+    try
+      {
+      Distorted.onSurfaceCreated(mView.getContext());
+      }
+    catch(Exception ex)
+      {
+      android.util.Log.e("Scratchpad", ex.getMessage() );
+      }
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-   public void onSurfaceChanged(GL10 glUnused, int width, int height)
-     {
-     mBackground.abortEffects(EffectTypes.MATRIX);
-     mBackground.scale((float)width/texWidth,(float)height/texHeight,1);
-     Distorted.onSurfaceChanged(width,height);
-     ScratchpadSurfaceView.setScreenSize(width,height);     
-     }
+  public void onSurfaceChanged(GL10 glUnused, int width, int height)
+    {
+    mBackground.abortEffects(EffectTypes.MATRIX);
+    mBackground.scale((float)width/texWidth,(float)height/texHeight,1);
+    Distorted.onSurfaceChanged(width,height);
+    ScratchpadSurfaceView.setScreenSize(width,height);     
+    }
    
 ///////////////////////////////////////////////////////////////////////////////////////////////////
    
-   public void onDrawFrame(GL10 glUnused)
-     {   
-     GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);
-     mBackground.draw(System.currentTimeMillis());
-     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-}
+  public void onDrawFrame(GL10 glUnused)
+    {   
+    GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);
+    mBackground.draw(System.currentTimeMillis());
+    }
+  }
diff --git a/src/main/java/org/distorted/examples/scratchpad/ScratchpadSurfaceView.java b/src/main/java/org/distorted/examples/scratchpad/ScratchpadSurfaceView.java
index 9b07eb6..f1fed52 100644
--- a/src/main/java/org/distorted/examples/scratchpad/ScratchpadSurfaceView.java
+++ b/src/main/java/org/distorted/examples/scratchpad/ScratchpadSurfaceView.java
@@ -1,3 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 package org.distorted.examples.scratchpad;
 
 import android.content.Context;
@@ -11,117 +30,117 @@ import org.distorted.library.Float3D;
 import org.distorted.library.Float4D;
 import org.distorted.library.Interpolator3D;
 
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 public class ScratchpadSurfaceView extends GLSurfaceView
-    {
-    private ScratchpadRenderer mRenderer;
-    private static int mCurrentEffect;
-    private static int mDuration;
-    private static float mCount;
-    private static int mScrW, mScrH;
+  {
+  private ScratchpadRenderer mRenderer;
+  private static int mCurrentEffect;
+  private static int mDuration;
+  private static float mCount;
+  private static int mScrW, mScrH;
     
-    private static Float4D region;
-    private static Float2D  point;
+  private static Float4D region;
+  private static Float2D  point;
     
-    private static Interpolator3D di;
-    private static Float3D v0, v1, v2, v3;
+  private static Interpolator3D di;
+  private static Float3D v0, v1, v2, v3;
      
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public ScratchpadSurfaceView(Context c, AttributeSet attrs) 
-      {
-      super(c, attrs);
+  public ScratchpadSurfaceView(Context c, AttributeSet attrs) 
+    {
+    super(c, attrs);
       
-      mDuration = 10000;
-      mCount    = 1.0f;
+    mDuration = 10000;
+    mCount    = 1.0f;
       
-      di = new Interpolator3D();
+    di = new Interpolator3D();
 
-      di.setDuration(mDuration);
-      di.setCount(mCount);
+    di.setDuration(mDuration);
+    di.setCount(mCount);
       
-      if(!isInEditMode())
-        {
-        setFocusable(true);
-        setFocusableInTouchMode(true);
-        
-        setEGLContextClientVersion(2);
+    if(!isInEditMode())
+      {
+      setFocusable(true);
+      setFocusableInTouchMode(true);
+       
+      setEGLContextClientVersion(2);
         
-        if( Build.FINGERPRINT.startsWith("generic") ) // when running on the emulator, insert a magic line that is
-          {                                           // supposed to cure the 'no config chosen' crash on emulator startup
-          setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
-          }
+      if( Build.FINGERPRINT.startsWith("generic") ) // when running on the emulator, insert a magic line that is
+        {                                           // supposed to cure the 'no config chosen' crash on emulator startup
+        setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
+        }
         
-        mRenderer = new ScratchpadRenderer(this);
-        setRenderer(mRenderer);
+      mRenderer = new ScratchpadRenderer(this);
+      setRenderer(mRenderer);
         
-        point = new Float2D(0,0);
-        region= new Float4D(0,0,60,60);
+      point = new Float2D(0,0);
+      region= new Float4D(0,0,60,60);
             
-        int h = 30;
-        int r = 20;
+      int h = 30;
+      int r = 20;
         
-        v0 = new Float3D( 0, r, h );
-        v1 = new Float3D(-r, 0, h );
-        v2 = new Float3D( 0,-r, h );
-        v3 = new Float3D( r, 0, h );
+      v0 = new Float3D( 0, r, h );
+      v1 = new Float3D(-r, 0, h );
+      v2 = new Float3D( 0,-r, h );
+      v3 = new Float3D( r, 0, h );
         
-        di.add(v0);
-        di.add(v1);
-        di.add(v2);
-        di.add(v3);
+      di.add(v0);
+      di.add(v1);
+      di.add(v2);
+      di.add(v3);
         
-        setEffect(0);  
-        }
+      setEffect(0);  
       }
+    }
 
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public static void setScreenSize(int width, int height)
-      {
-      mScrW = width;
-      mScrH = height;
-      }
+  public static void setScreenSize(int width, int height)
+    {
+    mScrW = width;
+    mScrH = height;
+    }
 
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public static int getEffect()
-      {
-      return mCurrentEffect;
-      }
+  public static int getEffect()
+    {
+    return mCurrentEffect;
+    }
    
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-   public static void setEffect(int effect)
-     {
-     mCurrentEffect = effect;
-     }
+  public static void setEffect(int effect)
+    {
+    mCurrentEffect = effect;
+    }
 
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public static void setDuration(int duration)
-      {
-      mDuration = duration;
-      di.setDuration(duration);
-      }
+  public static void setDuration(int duration)
+    {
+    mDuration = duration;
+    di.setDuration(duration);
+    }
 
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public static void setCount(float count)
-      {
-      mCount = count;
-      di.setCount(count);
-      }
+  public static void setCount(float count)
+    {
+    mCount = count;
+    di.setCount(count);
+    }
   
-///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override public boolean onTouchEvent(MotionEvent event) 
-      {
-      int action = event.getAction();
-      int x, y;
+  @Override public boolean onTouchEvent(MotionEvent event) 
+    {
+    int action = event.getAction();
+    int x, y;
       
-      switch(action)
+    switch(action)
       {
       case MotionEvent.ACTION_DOWN: x = (int)event.getX()*ScratchpadRenderer.BWID/mScrW;
                                     y = (int)event.getY()*ScratchpadRenderer.BHEI/mScrH;
@@ -143,10 +162,6 @@ public class ScratchpadSurfaceView extends GLSurfaceView
                                     break;
       }
             
-      return true;
-      }
- 
-///////////////////////////////////////////////////////////////////
-// end of file
-
+    return true;
+    }
   }
diff --git a/src/main/java/org/distorted/examples/sink/SinkActivity.java b/src/main/java/org/distorted/examples/sink/SinkActivity.java
index 0a2e456..789fbb6 100644
--- a/src/main/java/org/distorted/examples/sink/SinkActivity.java
+++ b/src/main/java/org/distorted/examples/sink/SinkActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.sink;
 
@@ -9,43 +27,43 @@ import android.os.Bundle;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 public class SinkActivity extends Activity 
-{
-    private SinkSurfaceView mView;
+  {
+  private SinkSurfaceView mView;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onCreate(Bundle icicle) 
-      {
-      super.onCreate(icicle);
-      mView = new SinkSurfaceView(this);
-      setContentView(mView);
-      }
+  @Override
+  protected void onCreate(Bundle icicle) 
+    {
+    super.onCreate(icicle);
+    mView = new SinkSurfaceView(this);
+    setContentView(mView);
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onPause() 
-      {
-      mView.onPause();  
-      super.onPause();
-      }
+  @Override
+  protected void onPause() 
+    {
+    mView.onPause();  
+    super.onPause();
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onResume() 
-      {
-      super.onResume();
-      mView.onResume();
-      }
+  @Override
+  protected void onResume() 
+    {
+    super.onResume();
+    mView.onResume();
+    }
  
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onDestroy() 
-      {
-      Distorted.onDestroy();  
-      super.onDestroy();
-      }    
-}
+  @Override
+  protected void onDestroy() 
+    {
+    Distorted.onDestroy();  
+    super.onDestroy();
+    }    
+  }
diff --git a/src/main/java/org/distorted/examples/sink/SinkRenderer.java b/src/main/java/org/distorted/examples/sink/SinkRenderer.java
index 6f913d3..3c45295 100644
--- a/src/main/java/org/distorted/examples/sink/SinkRenderer.java
+++ b/src/main/java/org/distorted/examples/sink/SinkRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.sink;
 
@@ -23,90 +41,90 @@ import android.opengl.GLSurfaceView;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 class SinkRenderer implements GLSurfaceView.Renderer 
-{
-   private GLSurfaceView mView;
-   private DistortedBitmap sinkBmp;
-   private Float2D pLeft, pRight;
-   private Float4D Region;
-   private int bmpHeight, bmpWidth;
+  {
+  private GLSurfaceView mView;
+  private DistortedBitmap sinkBmp;
+  private Float2D pLeft, pRight;
+  private Float4D Region;
+  private int bmpHeight, bmpWidth;
     
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-   public SinkRenderer(GLSurfaceView v) 
-      { 
-      mView = v;
+  public SinkRenderer(GLSurfaceView v) 
+    { 
+    mView = v;
       
-      pLeft = new Float2D(214, 206);
-      pRight= new Float2D(390, 212);
-      Region= new Float4D(0,0,60,60);
-      }
+    pLeft = new Float2D(214, 206);
+    pRight= new Float2D(390, 212);
+    Region= new Float4D(0,0,60,60);
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
    
-    public void onDrawFrame(GL10 glUnused) 
-      {
-      GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
-      GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
+  public void onDrawFrame(GL10 glUnused) 
+    {
+    GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+    GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
       
-      sinkBmp.draw(System.currentTimeMillis());
-      }
+    sinkBmp.draw(System.currentTimeMillis());
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public void onSurfaceChanged(GL10 glUnused, int width, int height) 
-      { 
-      sinkBmp.abortEffects(EffectTypes.MATRIX);
+  public void onSurfaceChanged(GL10 glUnused, int width, int height) 
+    { 
+    sinkBmp.abortEffects(EffectTypes.MATRIX);
          
-      if( bmpHeight/bmpWidth > height/width )
-        {
-        int w = (height*bmpWidth)/bmpHeight;
-        sinkBmp.move((width-w)/2 ,0, 0);
-        sinkBmp.scale((float)height/bmpHeight);
-        }
-      else
-        {
-        int h = (width*bmpHeight)/bmpWidth;
-        sinkBmp.move(0 ,(height-h)/2, 0);
-        sinkBmp.scale((float)width/bmpWidth);
-        }
-      
-      Distorted.onSurfaceChanged(width, height); 
+    if( bmpHeight/bmpWidth > height/width )
+      {
+      int w = (height*bmpWidth)/bmpHeight;
+      sinkBmp.move((width-w)/2 ,0, 0);
+      sinkBmp.scale((float)height/bmpHeight);
+      }
+    else
+      {
+      int h = (width*bmpHeight)/bmpWidth;
+      sinkBmp.move(0 ,(height-h)/2, 0);
+      sinkBmp.scale((float)width/bmpWidth);
       }
+      
+    Distorted.onSurfaceChanged(width, height); 
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
-      {
-      InputStream is = mView.getContext().getResources().openRawResource(R.raw.dog);
-      Bitmap bitmap;
+  public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
+    {
+    InputStream is = mView.getContext().getResources().openRawResource(R.raw.dog);
+    Bitmap bitmap;
         
+    try 
+      {
+      bitmap = BitmapFactory.decodeStream(is);
+      } 
+    finally 
+      {
       try 
         {
-        bitmap = BitmapFactory.decodeStream(is);
+        is.close();
         } 
-      finally 
-        {
-        try 
-          {
-          is.close();
-          } 
-        catch(IOException e) { }
-        }  
+      catch(IOException e) { }
+      }  
       
-      bmpHeight = bitmap.getHeight();
-      bmpWidth  = bitmap.getWidth();
+    bmpHeight = bitmap.getHeight();
+    bmpWidth  = bitmap.getWidth();
       
-      sinkBmp = new DistortedBitmap(bitmap, 30);
-      sinkBmp.sink( 10.0f, Region, pLeft, 2000, 0.0f);
-      sinkBmp.sink(10.0f, Region, pRight,2000, 0.0f);
+    sinkBmp = new DistortedBitmap(bitmap, 30);
+    sinkBmp.sink( 10.0f, Region, pLeft, 2000, 0.0f);
+    sinkBmp.sink(10.0f, Region, pRight,2000, 0.0f);
       
-      try
-        {
-        Distorted.onSurfaceCreated(mView.getContext());
-        }
-      catch(Exception ex)
-        {
-        android.util.Log.e("Sink", ex.getMessage() );
-        }
+    try
+      {
+      Distorted.onSurfaceCreated(mView.getContext());
+      }
+    catch(Exception ex)
+      {
+      android.util.Log.e("Sink", ex.getMessage() );
       }
-}
+    }
+  }
diff --git a/src/main/java/org/distorted/examples/sink/SinkSurfaceView.java b/src/main/java/org/distorted/examples/sink/SinkSurfaceView.java
index 63f6091..2e97b27 100644
--- a/src/main/java/org/distorted/examples/sink/SinkSurfaceView.java
+++ b/src/main/java/org/distorted/examples/sink/SinkSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.sink;
 
@@ -8,20 +26,18 @@ import android.os.Build;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 class SinkSurfaceView extends GLSurfaceView 
-{
-///////////////////////////////////////////////////////////////////////////////////////////////////
-   
-    public SinkSurfaceView(Context context) 
-      {
-      super(context);
-      setEGLContextClientVersion(2);
+  {
+  public SinkSurfaceView(Context context) 
+    {
+    super(context);
+    setEGLContextClientVersion(2);
         
-      if( Build.FINGERPRINT.startsWith("generic") )
-        { 
-        setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
-        }
-        
-      setRenderer(new SinkRenderer(this));
+    if( Build.FINGERPRINT.startsWith("generic") )
+      { 
+      setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
       }
-}
+        
+    setRenderer(new SinkRenderer(this));
+    }
+  }
 
diff --git a/src/main/java/org/distorted/examples/starwars/StarWarsActivity.java b/src/main/java/org/distorted/examples/starwars/StarWarsActivity.java
index 6577601..51b78af 100644
--- a/src/main/java/org/distorted/examples/starwars/StarWarsActivity.java
+++ b/src/main/java/org/distorted/examples/starwars/StarWarsActivity.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.starwars;
 
@@ -9,44 +27,43 @@ import android.os.Bundle;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 public class StarWarsActivity extends Activity 
-{
-    private StarWarsSurfaceView mView;
+  {
+  private StarWarsSurfaceView mView;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onCreate(Bundle icicle) 
-      {
-      super.onCreate(icicle);
-      mView = new StarWarsSurfaceView(this);
-      setContentView(mView);
-      }
+  @Override
+  protected void onCreate(Bundle icicle) 
+    {
+    super.onCreate(icicle);
+    mView = new StarWarsSurfaceView(this);
+    setContentView(mView);
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onPause() 
-      {
-      mView.onPause();  
-      super.onPause();
-      }
+  @Override
+  protected void onPause() 
+    {
+    mView.onPause();  
+    super.onPause();
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onResume() 
-      {
-      super.onResume();
-      mView.onResume();
-      }
+  @Override
+  protected void onResume() 
+    {
+    super.onResume();
+    mView.onResume();
+    }
     
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    @Override
-    protected void onDestroy() 
-      {
-      Distorted.onDestroy();  
-      super.onDestroy();
-      }
-    
-}
+  @Override
+  protected void onDestroy() 
+    {
+    Distorted.onDestroy();  
+    super.onDestroy();
+    }
+  }
diff --git a/src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java b/src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
index b1cb748..7a25b50 100644
--- a/src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
+++ b/src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.starwars;
 
@@ -33,13 +51,13 @@ import android.opengl.GLSurfaceView;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 class StarWarsRenderer implements GLSurfaceView.Renderer, EffectListener
-{
-   private final String[] mGFFAString = 
+  {
+  private final String[] mGFFAString = 
          
             { "A long time ago, in a galaxy far,",
               "far away...." };                    // yes, there really was a four-dot ellipsis
 
-   private final String[] mCRAWLString = 
+  private final String[] mCRAWLString = 
       
             { "It is a period of civil war.",      // in the original 1977 version, there was no 
               "Rebel spaceships, striking",        // 'Episode IV New Hope' subtitle line before
@@ -65,324 +83,323 @@ class StarWarsRenderer implements GLSurfaceView.Renderer, EffectListener
               "her people and restore",
               "freedom to the galaxy...." };      // four-dot.
    
-   private final int NUM_STARS = 40;
+  private final int NUM_STARS = 40;
    
-   private final int CRAWL_COLOR = 0xffffe81f;
-   private final int GFFA_COLOR  = 0xff0000ff;
-   private final int FONT_HEIGHT      = 40;
-   private final int VERTICAL_SPACING = 10;
-   private final String CRAWL_TYPEFACE = "News Gothic";
+  private final int CRAWL_COLOR = 0xffffe81f;
+  private final int GFFA_COLOR  = 0xff0000ff;
+  private final int FONT_HEIGHT      = 40;
+  private final int VERTICAL_SPACING = 10;
+  private final String CRAWL_TYPEFACE = "News Gothic";
    
-   private final int CRAWL_WIDTH = 500;
-   private final int CRAWL_HEIGHT= (FONT_HEIGHT+VERTICAL_SPACING)*(mCRAWLString.length+1);
+  private final int CRAWL_WIDTH = 500;
+  private final int CRAWL_HEIGHT= (FONT_HEIGHT+VERTICAL_SPACING)*(mCRAWLString.length+1);
    
-   private final int GFFA_WIDTH = 600;
-   private final int GFFA_HEIGHT= (FONT_HEIGHT+VERTICAL_SPACING)*(mGFFAString.length+1);
+  private final int GFFA_WIDTH = 600;
+  private final int GFFA_HEIGHT= (FONT_HEIGHT+VERTICAL_SPACING)*(mGFFAString.length+1);
    
-   private final float CRAWL_ANGLE = -30.0f;
+  private final float CRAWL_ANGLE = -30.0f;
    
-   private GLSurfaceView mView;
-   private DistortedBitmap mScreen, mGFFA, mLogo, mCrawl, mCrawlBackground;
-   private DistortedBitmap[] mStars;
-   private long gffaID, logoID, crawlID;
+  private GLSurfaceView mView;
+  private DistortedBitmap mScreen, mGFFA, mLogo, mCrawl, mCrawlBackground;
+  private DistortedBitmap[] mStars;
+  private long gffaID, logoID, crawlID;
     
-   private Random mRnd = new Random(0);
-   private DistortedNode mRoot, mBackground;
+  private Random mRnd = new Random(0);
+  private DistortedNode mRoot, mBackground;
     
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-   public StarWarsRenderer(GLSurfaceView v) 
-     {
-     mView = v;
+  public StarWarsRenderer(GLSurfaceView v) 
+    {
+    mView = v;
      
-     Distorted.setFov(60.0f);
-     }
+    Distorted.setFov(60.0f);
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
    
-    public void onDrawFrame(GL10 glUnused) 
-      {
-      GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
-      GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
+  public void onDrawFrame(GL10 glUnused) 
+    {
+    GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+    GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
      
-      mRoot.draw(System.currentTimeMillis());
-      }
+    mRoot.draw(System.currentTimeMillis());
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public void onSurfaceChanged(GL10 glUnused, int width, int height) 
-      { 
-      Distorted.onSurfaceChanged(width, height); 
-      setupScreen(width,height);
-      }
+  public void onSurfaceChanged(GL10 glUnused, int width, int height) 
+    { 
+    Distorted.onSurfaceChanged(width, height); 
+    setupScreen(width,height);
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
-      {
-      setupBitmaps();
+  public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
+    {
+    setupBitmaps();
          
-      try
-        {
-        Distorted.onSurfaceCreated(mView.getContext());
-        }
-      catch(Exception ex)
-        {
-        android.util.Log.e("Star Wars", ex.getMessage() );
-        }
+    try
+      {
+      Distorted.onSurfaceCreated(mView.getContext());
+      }
+    catch(Exception ex)
+      {
+      android.util.Log.e("Star Wars", ex.getMessage() );
       }
+    }
     
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    private void setupScreen(int w, int h)
-      {
-      mScreen = new DistortedBitmap(w,h,1);
-      mRoot = new DistortedNode(mScreen);
+  private void setupScreen(int w, int h)
+    {
+    mScreen = new DistortedBitmap(w,h,1);
+    mRoot = new DistortedNode(mScreen);
       
-      mCrawlBackground = new DistortedBitmap(w,(int)(Math.sqrt(3.0)*h),1);
+    mCrawlBackground = new DistortedBitmap(w,(int)(Math.sqrt(3.0)*h),1);
        
-      int randomA, randomX, randomY, randomTime;
-      float randomS, randomAlpha1, randomAlpha2;
+    int randomA, randomX, randomY, randomTime;
+    float randomS, randomAlpha1, randomAlpha2;
        
-      Float3D rot = new Float3D(0,0,0);
-      
-      for(int i=0; i<NUM_STARS; i++)
-        {
-        randomX = mRnd.nextInt(w);
-        randomY = mRnd.nextInt(h);
-        randomS = 0.2f+ mRnd.nextFloat();
-        randomA = (int)(180*mRnd.nextFloat());
-        randomAlpha1 = 0.2f + 0.8f*mRnd.nextFloat();
-        randomAlpha2 = 0.8f + 0.2f*mRnd.nextFloat();
-        randomTime = 500+mRnd.nextInt(2000);
+    Float3D rot = new Float3D(0,0,0);
       
-        mStars[i].move( randomX,randomY,0);
-        mStars[i].scale(randomS);
-        mStars[i].rotate( rot, randomA);
-      
-        Interpolator1D di = new Interpolator1D();
-        di.setDuration(randomTime);
-        di.setCount(0.0f);
-        di.setNoise(0.3f);
-        di.add(new Float1D(randomAlpha1));
-        di.add(new Float1D(randomAlpha2));
-      
-        mStars[i].alpha(di, null, new Float2D(0,0));
-      
-        mRoot.attach(mStars[i]);
-        }
+    for(int i=0; i<NUM_STARS; i++)
+      {
+      randomX = mRnd.nextInt(w);
+      randomY = mRnd.nextInt(h);
+      randomS = 0.2f+ mRnd.nextFloat();
+      randomA = (int)(180*mRnd.nextFloat());
+      randomAlpha1 = 0.2f + 0.8f*mRnd.nextFloat();
+      randomAlpha2 = 0.8f + 0.2f*mRnd.nextFloat();
+      randomTime = 500+mRnd.nextInt(2000);
       
-      float scale = (0.5f*w/mGFFA.getWidth());
+      mStars[i].move( randomX,randomY,0);
+      mStars[i].scale(randomS);
+      mStars[i].rotate( rot, randomA);
       
       Interpolator1D di = new Interpolator1D();
-      di.setDuration(6000);
-      di.setCount(0.5f);
-      di.add(new Float1D(1.0f));
-      di.add(new Float1D(1.0f));
-      di.add(new Float1D(0.0f));
+      di.setDuration(randomTime);
+      di.setCount(0.0f);
+      di.setNoise(0.3f);
+      di.add(new Float1D(randomAlpha1));
+      di.add(new Float1D(randomAlpha2));
       
-      mGFFA.move( w/5, h/3, 0);
-      mGFFA.scale(scale);
-      mGFFA.alpha(di, null, new Float2D(0,0));
+      mStars[i].alpha(di, null, new Float2D(0,0));
       
-      mRoot.attach(mGFFA);
-      mGFFA.addEventListener(this); 
+      mRoot.attach(mStars[i]);
       }
+      
+    float scale = (0.5f*w/mGFFA.getWidth());
+    
+    Interpolator1D di = new Interpolator1D();
+    di.setDuration(6000);
+    di.setCount(0.5f);
+    di.add(new Float1D(1.0f));
+    di.add(new Float1D(1.0f));
+    di.add(new Float1D(0.0f));
+    
+    mGFFA.move( w/5, h/3, 0);
+    mGFFA.scale(scale);
+    mGFFA.alpha(di, null, new Float2D(0,0));
+      
+    mRoot.attach(mGFFA);
+    mGFFA.addEventListener(this); 
+    }
     
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    private void setupBitmaps()
-      {
-      InputStream is1 = mView.getContext().getResources().openRawResource(R.raw.starwars);
-      InputStream is2 = mView.getContext().getResources().openRawResource(R.raw.star);
+  private void setupBitmaps()
+    {
+    InputStream is1 = mView.getContext().getResources().openRawResource(R.raw.starwars);
+    InputStream is2 = mView.getContext().getResources().openRawResource(R.raw.star);
     
-      Bitmap bitmapStar, bitmapGFFA, bitmapLogo, bitmapText;
-        
+    Bitmap bitmapStar, bitmapGFFA, bitmapLogo, bitmapText;
+      
+    try 
+      {
+      bitmapLogo = BitmapFactory.decodeStream(is1);
+      bitmapStar = BitmapFactory.decodeStream(is2);
+      } 
+    finally 
+      {
       try 
         {
-        bitmapLogo = BitmapFactory.decodeStream(is1);
-        bitmapStar = BitmapFactory.decodeStream(is2);
-        } 
-      finally 
-        {
-        try 
-          {
-          is1.close();
-          is2.close();
-          } 
-        catch(IOException e) { }
+        is1.close();
+        is2.close();
         } 
+      catch(IOException e) { }
+      } 
       
-      Paint paint = new Paint();
-      paint.setAntiAlias(true);
-      paint.setTextAlign(Paint.Align.LEFT);
-      paint.setTextSize(FONT_HEIGHT);
-      paint.setColor(GFFA_COLOR);
+    Paint paint = new Paint();
+    paint.setAntiAlias(true);
+    paint.setTextAlign(Paint.Align.LEFT);
+    paint.setTextSize(FONT_HEIGHT);
+    paint.setColor(GFFA_COLOR);
       
-      Typeface tf = Typeface.create(CRAWL_TYPEFACE, Typeface.BOLD);
-      paint.setTypeface(tf);     
+    Typeface tf = Typeface.create(CRAWL_TYPEFACE, Typeface.BOLD);
+    paint.setTypeface(tf);     
  
-      ///// create GFFA ///////////////////
-      mGFFA  = new DistortedBitmap(GFFA_WIDTH, GFFA_HEIGHT, 1);
-      bitmapGFFA = Bitmap.createBitmap(GFFA_WIDTH,GFFA_HEIGHT,Bitmap.Config.ARGB_8888);
-      bitmapGFFA.eraseColor(0x00000000);
-      Canvas gffaCanvas = new Canvas(bitmapGFFA);
+    ///// create GFFA ///////////////////
+    mGFFA  = new DistortedBitmap(GFFA_WIDTH, GFFA_HEIGHT, 1);
+    bitmapGFFA = Bitmap.createBitmap(GFFA_WIDTH,GFFA_HEIGHT,Bitmap.Config.ARGB_8888);
+    bitmapGFFA.eraseColor(0x00000000);
+    Canvas gffaCanvas = new Canvas(bitmapGFFA);
       
-      for(int i=0; i<mGFFAString.length; i++)
-        {
-        gffaCanvas.drawText(mGFFAString[i], 0, (i+1)*(FONT_HEIGHT+VERTICAL_SPACING), paint);  
-        }
+    for(int i=0; i<mGFFAString.length; i++)
+      {
+      gffaCanvas.drawText(mGFFAString[i], 0, (i+1)*(FONT_HEIGHT+VERTICAL_SPACING), paint);  
+      }
   
-      mGFFA.setBitmap(bitmapGFFA);
+    mGFFA.setBitmap(bitmapGFFA);
       
-      ///// create Logo ///////////////////
-      mLogo  = new DistortedBitmap(bitmapLogo, 1);
+    ///// create Logo ///////////////////
+    mLogo  = new DistortedBitmap(bitmapLogo, 1);
       
-      ///// create CRAWL //////////////////
-      mCrawl = new DistortedBitmap(CRAWL_WIDTH, CRAWL_HEIGHT, 1);
-      bitmapText = Bitmap.createBitmap(CRAWL_WIDTH,CRAWL_HEIGHT,Bitmap.Config.ARGB_8888);
-      bitmapText.eraseColor(0x00000000);
-      Canvas textCanvas = new Canvas(bitmapText);
-      paint.setColor(CRAWL_COLOR);
+    ///// create CRAWL //////////////////
+    mCrawl = new DistortedBitmap(CRAWL_WIDTH, CRAWL_HEIGHT, 1);
+    bitmapText = Bitmap.createBitmap(CRAWL_WIDTH,CRAWL_HEIGHT,Bitmap.Config.ARGB_8888);
+    bitmapText.eraseColor(0x00000000);
+    Canvas textCanvas = new Canvas(bitmapText);
+    paint.setColor(CRAWL_COLOR);
   
-      for(int i=0; i<mCRAWLString.length; i++)
-        {
-        displayJustified(mCRAWLString[i], 0, (i+1)*(FONT_HEIGHT+VERTICAL_SPACING), CRAWL_WIDTH, textCanvas, paint);  
-        }
-      
-      mCrawl.setBitmap(bitmapText);
+    for(int i=0; i<mCRAWLString.length; i++)
+      {
+      displayJustified(mCRAWLString[i], 0, (i+1)*(FONT_HEIGHT+VERTICAL_SPACING), CRAWL_WIDTH, textCanvas, paint);  
+      }
       
-      ///// create Stars ///////////////////
+    mCrawl.setBitmap(bitmapText);
       
-      mStars = new DistortedBitmap[NUM_STARS];
+    ///// create Stars ///////////////////
       
-      mStars[0] = new DistortedBitmap(bitmapStar,1);
+    mStars = new DistortedBitmap[NUM_STARS];
       
-      for(int i=1; i<NUM_STARS; i++)
-        {
-        mStars[i] = new DistortedBitmap(mStars[0], Distorted.CLONE_BITMAP|Distorted.CLONE_VERTEX);  
-        }
+    mStars[0] = new DistortedBitmap(bitmapStar,1);
       
-      gffaID = mGFFA.getID();
-      logoID = mLogo.getID();
-      crawlID= mCrawl.getID();
+    for(int i=1; i<NUM_STARS; i++)
+      {
+      mStars[i] = new DistortedBitmap(mStars[0], Distorted.CLONE_BITMAP|Distorted.CLONE_VERTEX);  
       }
+      
+    gffaID = mGFFA.getID();
+    logoID = mLogo.getID();
+    crawlID= mCrawl.getID();
+    }
  
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-   private void displayJustified(String str, int x, int y, int length, Canvas c, Paint paint)
-      { 
-      int len       = str.length();
-      int numspaces = retNumSpaces(str);
+  private void displayJustified(String str, int x, int y, int length, Canvas c, Paint paint)
+    { 
+    int len       = str.length();
+    int numspaces = retNumSpaces(str);
     
-      if( len>0 && str.charAt(len-1) == ' ' ) numspaces--;
+    if( len>0 && str.charAt(len-1) == ' ' ) numspaces--;
 
-      float left=x,w = (numspaces>0 ? (length-paint.measureText(str))/numspaces : 0);
-      String tmp;
-      int begin,end=0;
+    float left=x,w = (numspaces>0 ? (length-paint.measureText(str))/numspaces : 0);
+    String tmp;
+    int begin,end=0;
 
-      while( end<len )
-        {
-        begin=end;
-        end = str.indexOf(' ', begin)+1;
-        if( end<=0 ) end = len;
+    while( end<len )
+      {
+      begin=end;
+      end = str.indexOf(' ', begin)+1;
+      if( end<=0 ) end = len;
 
-        tmp = str.substring(begin,end);
-        c.drawText( tmp, left, y, paint);
-        left+= (paint.measureText(tmp)+w);
-        }  
-      }
+      tmp = str.substring(begin,end);
+      c.drawText( tmp, left, y, paint);
+      left+= (paint.measureText(tmp)+w);
+      }  
+    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
    
-   private int retNumSpaces(String str)
-      {
-      int begin=0, ret=0;
-
-      while( true )
-        {
-        begin = str.indexOf(' ', begin) +1;
+  private int retNumSpaces(String str)
+    {
+    int begin=0, ret=0;
 
-        if( begin>0 ) ret++;
-        else break;
-        }
+    while( true )
+      {
+      begin = str.indexOf(' ', begin) +1;
 
-      return ret;
+      if( begin>0 ) ret++;
+      else break;
       }
+
+    return ret;
+    }
     
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void effectMessage(final EffectMessage em, final long effectID, final int effectName, final long bitmapID, final String message)
+  public void effectMessage(final EffectMessage em, final long effectID, final int effectName, final long bitmapID, final String message)
+    {
+    if( em==EffectMessage.EFFECT_FINISHED )
       {
-      if( em==EffectMessage.EFFECT_FINISHED )
+      if( bitmapID == gffaID )
         {
-        if( bitmapID == gffaID )
-          {
-          mRoot.detach(mGFFA);   
-          mGFFA.removeEventListener(this);
+        mRoot.detach(mGFFA);   
+        mGFFA.removeEventListener(this);
        
-          int screenW=mScreen.getWidth();
-          int screenH=mScreen.getHeight();
+        int screenW=mScreen.getWidth();
+        int screenH=mScreen.getHeight();
         
-          int logoW = mLogo.getWidth();
-          int logoH = mLogo.getHeight();
+        int logoW = mLogo.getWidth();
+        int logoH = mLogo.getHeight();
       
-          int initSize= (int)(3.0f*screenW/logoW);
-          int finaSize= (int)(0.1f*screenW/logoW);
+        int initSize= (int)(3.0f*screenW/logoW);
+        int finaSize= (int)(0.1f*screenW/logoW);
       
-          Interpolator3D di = new Interpolator3D();
+        Interpolator3D di = new Interpolator3D();
       
-          di.add(new Float3D(initSize,initSize,1));
-          di.add(new Float3D(finaSize,finaSize,1));
-          di.setCount(0.5f);
-          di.setDuration(10000);
+        di.add(new Float3D(initSize,initSize,1));
+        di.add(new Float3D(finaSize,finaSize,1));
+        di.setCount(0.5f);
+        di.setDuration(10000);
       
-          mLogo.move( screenW/2, screenH/2, 0);
-          mLogo.scale(di);
-          mLogo.move( -logoW/2, -logoH/2, 0);
+        mLogo.move( screenW/2, screenH/2, 0);
+        mLogo.scale(di);
+        mLogo.move( -logoW/2, -logoH/2, 0);
       
-          mRoot.attach(mLogo);
-          mLogo.addEventListener(this);
-          }
-        else if( bitmapID==logoID )
-          {
-          mRoot.detach(mLogo);   
-          mLogo.removeEventListener(this);
-        
-          int crawlW = mCrawl.getWidth();
-          int crawlH = mCrawl.getHeight();
-          int screenW= mScreen.getWidth();
-          int screenH= mScreen.getHeight();
-          int backH  = mCrawlBackground.getHeight();
-          float scale= (float)screenW/crawlW;
+        mRoot.attach(mLogo);
+        mLogo.addEventListener(this);
+        }
+      else if( bitmapID==logoID )
+        {
+        mRoot.detach(mLogo);   
+        mLogo.removeEventListener(this);
         
-          Interpolator3D di = new Interpolator3D();
-          di.setCount(0.5f);
-          di.setDuration(60000);
-          di.add(new Float3D(screenW/2,+backH       , 0));
-          di.add(new Float3D(screenW/2,-scale*crawlH, 0));
+        int crawlW = mCrawl.getWidth();
+        int crawlH = mCrawl.getHeight();
+        int screenW= mScreen.getWidth();
+        int screenH= mScreen.getHeight();
+        int backH  = mCrawlBackground.getHeight();
+        float scale= (float)screenW/crawlW;
+      
+        Interpolator3D di = new Interpolator3D();
+        di.setCount(0.5f);
+        di.setDuration(60000);
+        di.add(new Float3D(screenW/2,+backH       , 0));
+        di.add(new Float3D(screenW/2,-scale*crawlH, 0));
         
-          mCrawlBackground.move(0,screenH-backH,0);
-          mCrawlBackground.rotate(new Float3D(screenW/2,backH,0), CRAWL_ANGLE, 1.0f, 0.0f, 0.0f);
+        mCrawlBackground.move(0,screenH-backH,0);
+        mCrawlBackground.rotate(new Float3D(screenW/2,backH,0), CRAWL_ANGLE, 1.0f, 0.0f, 0.0f);
         
-          final int transpDistance = 5;
-          mCrawlBackground.smooth_alpha((1-transpDistance/2)*1.0f, new Float4D(0,0,transpDistance*backH,transpDistance*backH), new Float2D(screenW/2,(1-transpDistance)*backH));
+        final int transpDistance = 5;
+        mCrawlBackground.smooth_alpha((1-transpDistance/2)*1.0f, new Float4D(0,0,transpDistance*backH,transpDistance*backH), new Float2D(screenW/2,(1-transpDistance)*backH));
         
-          mCrawl.move(di);
-          mCrawl.scale(scale);
-          mCrawl.move(-crawlW/2,0,0);
+        mCrawl.move(di);
+        mCrawl.scale(scale);
+        mCrawl.move(-crawlW/2,0,0);
         
-          mBackground = mRoot.attach(mCrawlBackground);
-          mBackground.attach(mCrawl);
-          mCrawl.addEventListener(this);
-          }
-        else if( bitmapID==crawlID )
-          {
-          mRoot.detach(mBackground);
-          mBackground.detach(mCrawl);
-          mCrawl.removeEventListener(this);
-          }
+        mBackground = mRoot.attach(mCrawlBackground);
+        mBackground.attach(mCrawl);
+        mCrawl.addEventListener(this);
+        }
+      else if( bitmapID==crawlID )
+        {
+        mRoot.detach(mBackground);
+        mBackground.detach(mCrawl);
+        mCrawl.removeEventListener(this);
         }
       }
-}
-///////////////////////////////////////////////////////////////////////////////////////////////////
+    }
+  }
diff --git a/src/main/java/org/distorted/examples/starwars/StarWarsSurfaceView.java b/src/main/java/org/distorted/examples/starwars/StarWarsSurfaceView.java
index 3098bdb..42ce42d 100644
--- a/src/main/java/org/distorted/examples/starwars/StarWarsSurfaceView.java
+++ b/src/main/java/org/distorted/examples/starwars/StarWarsSurfaceView.java
@@ -1,3 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 package org.distorted.examples.starwars;
 
@@ -8,20 +26,18 @@ import android.os.Build;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 class StarWarsSurfaceView extends GLSurfaceView 
-{
-///////////////////////////////////////////////////////////////////////////////////////////////////
-   
-    public StarWarsSurfaceView(Context context) 
-      {
-      super(context);
-      setEGLContextClientVersion(2);
+  {
+  public StarWarsSurfaceView(Context context) 
+    {
+    super(context);
+    setEGLContextClientVersion(2);
         
-      if( Build.FINGERPRINT.startsWith("generic") )
-        { 
-        setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
-        }
-        
-      setRenderer(new StarWarsRenderer(this));
+    if( Build.FINGERPRINT.startsWith("generic") )
+      { 
+      setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
       }
-}
+        
+    setRenderer(new StarWarsRenderer(this));
+    }
+  }
 
