[SCM] GeoGebra: Dynamic mathematics software for education branch, patch/ScientificFormat.java, updated. ca13f2af54f374faa01b9cbc5d6e863d1fe29ac4

Giovanni Mascellani gio at alioth.debian.org
Wed Jul 7 16:32:54 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GeoGebra: Dynamic mathematics software for education".

The branch, patch/ScientificFormat.java has been updated
       via  ca13f2af54f374faa01b9cbc5d6e863d1fe29ac4 (commit)
       via  b5e82e7963f12a85bbf0d6b5c145349b22572ed0 (commit)
       via  f4eb82a738a412c48c68332c3be687de2e37d291 (commit)
       via  0ba42107eeaa83fdb68432738fa5f7584e7f38cc (commit)
       via  5134b5bcf0fdcdb8f49cd36f59d967eafedd90c1 (commit)
       via  d4ef1da521b082fdf85d26f89fa90882ea0c28a2 (commit)
       via  8f07878c70d49afc8402db9b14a52c1d8b75c4d1 (commit)
       via  761e7a411f65916a9e496febc9dc54441f46d876 (commit)
       via  1faa7fea9e4e76557de108d5649174d12272a541 (commit)
       via  f386e79d097035a07a7112f25b4b69934a23c76e (commit)
       via  1a7990b916bdc5092396ea13ad0d37276b9cea0a (commit)
       via  ff44aced33e7380f8b598d4e6eb5cd96d7b914b5 (commit)
       via  1271a2c367f57f441044dd6b4a89d8cdecada986 (commit)
       via  a65ef9e34e675c6d6e46f57e1779d2efad7449c4 (commit)
      from  d5d8c02cbab10fc7c39caa4bb56fd3ecf8c6d61e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ca13f2af54f374faa01b9cbc5d6e863d1fe29ac4
Merge: d5d8c02 b5e82e7
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Tue Jul 6 12:58:37 2010 +0200

    Merge commit 'refs/top-bases/patch/ScientificFormat.java' into patch/ScientificFormat.java

-----------------------------------------------------------------------

Summary of changes:
 _README.txt                                        |   10 +-
 build.xml                                          |    4 +-
 debian/TODO                                        |    2 +
 debian/control                                     |   46 +-
 debian/copyright                                   |  125 +-
 debian/dirs                                        |    2 +
 debian/geogebra.sh                                 |   10 +
 debian/get_orig_source.sh                          |   29 +
 debian/install                                     |    1 +
 debian/rules                                       |    3 +
 geogebra/GeoGebra.java                             |   17 +-
 geogebra/euclidian/Clipping.java                   |  348 ---
 geogebra/euclidian/DrawConic.java                  |  116 +-
 geogebra/euclidian/DrawConicPart.java              |   32 +-
 geogebra/euclidian/DrawLine.java                   |   54 +-
 geogebra/euclidian/DrawParametricCurve.java        |   10 +-
 geogebra/euclidian/DrawSegment.java                |    3 +-
 geogebra/euclidian/DrawVector.java                 |   68 +-
 geogebra/euclidian/Drawable.java                   |    1 +
 geogebra/euclidian/EuclidianController.java        |   28 +-
 geogebra/euclidian/EuclidianView.java              |   46 +-
 geogebra/euclidian/GeneralPathClipped.java         |    4 +-
 geogebra/euclidian/clipping/ClipLine.java          |  355 +++
 geogebra/euclidian/clipping/ClipShape.java         |  536 ++++
 .../euclidian/clipping/DoubleArrayFactory.java     |  115 +
 geogebra/euclidian/clipping/MutableInteger.java    |   75 +
 geogebra/export/WorksheetExportDialog.java         |   36 +-
 geogebra/export/pstricks/GeoGebraExport.java       |    2 +
 geogebra/export/pstricks/GeoGebraToPgf.java        |   22 +-
 geogebra/export/pstricks/GeoGebraToPstricks.java   |   20 +-
 geogebra/gui/CheckboxCreationDialog.java           |    2 +
 geogebra/gui/ContextMenuGeoElement.java            |    6 +-
 geogebra/gui/DefaultGuiManager.java                |  115 +-
 geogebra/gui/PropertiesDialogGeoElement.java       |    5 +-
 geogebra/gui/RenameInputHandler.java               |    8 +-
 geogebra/gui/SliderDialog.java                     |    3 +-
 geogebra/gui/_license.txt                          |    2 +-
 geogebra/gui/app/GeoGebraFrame.java                |   10 +-
 geogebra/gui/menubar/GeoGebraMenuBar.java          |    8 +
 geogebra/gui/view/algebra/AlgebraController.java   |   55 +-
 geogebra/gui/view/spreadsheet/ContextMenu.java     |    3 +-
 geogebra/io/MyXMLHandler.java                      |  254 +--
 geogebra/io/MyXMLio.java                           |    7 -
 geogebra/kernel/AlgoSequence.java                  |   21 +
 geogebra/kernel/AlgoTableText.java                 |    3 +-
 geogebra/kernel/AlgoText.java                      |   22 +-
 geogebra/kernel/AnimationManager.java              |   17 +-
 geogebra/kernel/GeoAngle.java                      |    2 +-
 geogebra/kernel/GeoAxis.java                       |    2 +-
 geogebra/kernel/GeoBoolean.java                    |    4 +-
 geogebra/kernel/GeoConic.java                      |   20 +-
 geogebra/kernel/GeoElement.java                    |    6 +-
 geogebra/kernel/GeoLine.java                       |    8 +
 geogebra/kernel/GeoList.java                       |   13 +
 geogebra/kernel/GeoNumeric.java                    |    6 +-
 geogebra/kernel/GeoPoint.java                      |   22 +-
 geogebra/kernel/GeoPolygon.java                    |    4 +
 geogebra/kernel/GeoRay.java                        |    9 +-
 geogebra/kernel/GeoSegment.java                    |   29 +-
 geogebra/kernel/GeoVector.java                     |    2 +
 geogebra/kernel/Kernel.java                        |   55 +-
 geogebra/kernel/Relation.java                      |   14 +
 geogebra/kernel/UndoManager.java                   |   15 +-
 geogebra/kernel/arithmetic/ExpressionNode.java     |  249 ++-
 geogebra/kernel/arithmetic/Function.java           |    2 +-
 geogebra/kernel/commands/AlgebraProcessor.java     |    8 +-
 geogebra/kernel/commands/CmdPolygon.java           |    2 +
 geogebra/kernel/commands/CmdText.java              |   12 +
 geogebra/kernel/complex/Complex.java               |  596 ----
 geogebra/kernel/complex/ComplexPoly.java           |  425 ---
 geogebra/kernel/parser/Parser.jj                   |    4 +-
 geogebra/kernel/roots/RealRoot.java                |  540 ----
 geogebra/kernel/roots/RealRootFunction.java        |   38 -
 geogebra/main/AppletImplementation.java            | 3107 ++++++++++----------
 geogebra/main/Application.java                     |  123 +-
 geogebra/main/GlobalKeyDispatcher.java             |    6 +-
 geogebra/plugin/GgbAPI.java                        |   26 +-
 geogebra/properties/command.properties             |    2 +-
 geogebra/properties/command_ca.properties          |   17 +-
 geogebra/properties/command_da.properties          |    4 +-
 geogebra/properties/command_nl.properties          |    6 +-
 geogebra/properties/command_sq.properties          |    8 +-
 geogebra/properties/command_vi.properties          |  612 ++--
 geogebra/properties/error_nl.properties            |    2 +-
 geogebra/properties/error_ro.properties            |   10 +-
 geogebra/properties/error_sq.properties            |    4 +-
 geogebra/properties/error_vi.properties            |   16 +-
 geogebra/properties/javaui_vi.properties           |   16 +-
 geogebra/properties/menu.properties                |   16 +-
 geogebra/properties/menu_ca.properties             |    4 +-
 geogebra/properties/menu_da.properties             |   12 +-
 geogebra/properties/menu_de.properties             |    2 +-
 geogebra/properties/menu_nl.properties             |    6 +-
 geogebra/properties/menu_no_NO.properties          |    2 +-
 geogebra/properties/menu_ro.properties             |   24 +-
 geogebra/properties/menu_sq.properties             |    6 +-
 geogebra/properties/menu_vi.properties             |   72 +-
 geogebra/properties/plain.properties               |    2 +-
 geogebra/properties/plain_ar.properties            |    8 +-
 geogebra/properties/plain_ca.properties            |   18 +-
 geogebra/properties/plain_da.properties            |    6 +-
 geogebra/properties/plain_nl.properties            |    8 +-
 geogebra/properties/plain_ro.properties            |    8 +-
 geogebra/properties/plain_sq.properties            |    8 +-
 geogebra/properties/plain_vi.properties            |   88 +-
 105 files changed, 4308 insertions(+), 4689 deletions(-)

diff --git a/_README.txt b/_README.txt
index 385157a..07ad351 100644
--- a/_README.txt
+++ b/_README.txt
@@ -4,15 +4,9 @@ http://www.geogebra.org/
 IMPORTANT NOTE concerning LICENSES
 
 The software GeoGebra is licensed under GNU GPL v2 (or later).
-However, as part of this CVS repository you will also find libraries 
+However, as part of this SVN repository you will also find libraries 
 and plug-in files that are subject to other licenses.
-You are free to copy, distribute and transmit all files in this 
-repository for non-commercial purposes. For details please read 
-on and see the file LICENSE.txt
-
-* GeoGebra Language Files (geogebra.properties folder)
-   Creative Commons Attribution-NonCommercial-NoDerivs 3.0 License 
-   http://creativecommons.org/licenses/by-nc-nd/3.0/
+For details please read on and see the file LICENSE.txt
 
 Other libraries and plugins used      
 * MathPiper, https://mathrider.dev.java.net/
diff --git a/build.xml b/build.xml
index 7081f5f..e67d26f 100644
--- a/build.xml
+++ b/build.xml
@@ -76,7 +76,7 @@ office at geogebra.org
 		<mkdir dir="${build.dir}/unsigned/unpacked"/>
 		<mkdir dir="${propertiestemp.dir}"/>
 		<delete>
-		    <fileset dir="${build.dir}" includes="**/geogebra*.jar, **/gluegen-rt.jar, **/jogl.jar, **/*.jar.pack.gz, **/*.html"/>
+		    <fileset dir="${build.dir}" includes="**/geogebra*.jar, **/gluegen-rt.jar, **/jogl.jar, **/jlatexmath.jar ,**/*.jar.pack.gz, **/*.html"/>
 		</delete>		
 	</target>
 	
@@ -468,7 +468,7 @@ office at geogebra.org
 				build="${build}"
 				bundleid="geogebra.GeoGebra"
 				icon="installer/geogebra.icns"
-				infostring="GeoGebra ${fullversion}, (C) 2001-2009 International GeoGebra Institute"
+				infostring="GeoGebra ${fullversion}, (C) 2001-2010 International GeoGebra Institute"
 				jvmversion="1.4.2+"
 				shortname="GeoGebra"
 				signature="GGB"
diff --git a/debian/TODO b/debian/TODO
new file mode 100644
index 0000000..81f4519
--- /dev/null
+++ b/debian/TODO
@@ -0,0 +1,2 @@
+ * Verify hoteqn and jasymca (embedded copies?)
+ * verify exportable JARs
diff --git a/debian/control b/debian/control
index e1b84e7..89207ec 100644
--- a/debian/control
+++ b/debian/control
@@ -2,12 +2,46 @@ Source: geogebra
 Section: java
 Priority: extra
 Maintainer: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-Build-Depends: cdbs, debhelper (>= 7), ant, ant-optional, javacc, default-jdk
+Build-Depends:
+ cdbs,
+ debhelper (>= 7),
+ ant,
+ ant-optional,
+ javacc,
+ default-jdk,
+ quilt,
+ mathpiper,
+ libfreehep-xml-java,
+ libfreehep-util-java,
+ libfreehep-graphics2d-java,
+ libfreehep-graphicsio-java,
+ libfreehep-graphicsio-svg-java,
+ libfreehep-graphicsio-pdf-java,
+ libfreehep-graphicsio-emf-java
 Standards-Version: 3.8.4
-Homepage: <insert the upstream URL, if relevant>
+Homepage: http://www.geogebra.org/
 
 Package: geogebra
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: <insert up to 60 chars description>
- <insert long description, indented with spaces>
+Architecture: all
+Depends:
+ default-jre | java5-runtime,
+ mathpiper,
+ libfreehep-xml-java,
+ libfreehep-util-java,
+ libfreehep-graphics2d-java,
+ libfreehep-graphicsio-java,
+ libfreehep-graphicsio-svg-java,
+ libfreehep-graphicsio-pdf-java,
+ libfreehep-graphicsio-emf-java,
+ ${misc:Depends}
+Description: Dynamic mathematics software for education
+ GeoGebra is a dynamic geometry system. You can do constructions with points,
+ vectors, segments, lines, conic sections as well as functions and change
+ them dynamically afterwards. On the other hand, equations and coordinates
+ can be entered directly.
+ .
+ Support for many geometric constructions is provided, as well as support
+ for many elementary calculus-based tools (derivatives, osculating circle, ...).
+ .
+ GeoGebra files can be exported in many different formats, or as interactive
+ applets for web pages.
diff --git a/debian/copyright b/debian/copyright
index cd4abee..8fef2c2 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,37 +1,110 @@
-This work was packaged for Debian by:
+Files: *
+Copyright: 2001 - 
+License: GPL-2+
 
-    Giovanni Mascellani <mascellani at poisson.phc.unipi.it> on Fri, 12 Mar 2010 16:12:24 +0100
+Files: jasymca/*
+Copyright: 2006, Helmut Dersch <der at hs-furtwangen.de>
+License: GPL-2+
 
-It was downloaded from:
+Files: geogebra/gui/hoteqn/*
+Copyright: 2006, Stefan Möller and Christian Schmid
+License: GPL
 
-    <url://example.com>
+Files: geogebra/gui/inputbar/AutoComplete.java
+Copyright: 1999-2001, Matt Welsh
+License: ??
 
-Upstream Author(s):
+Files: geogebra/kernel/optimization/ExtremumFinder.java
+Copyright: 1998, Steve Verrill <steve at www1.fpl.fs.fed.us>
+           2004, Markus Hohenwarter
+License: PD
+ This software was translated from the FORTRAN version
+ to Java by a US government employee on official time.  
+ Thus this software is also in the public domain.
 
-    <put author's name and email here>
-    <likewise for another author>
+Files: geogebra/kernel/complex/Complex.java,
+       geogebra/kernel/complex/ComplexPoly.java,
+       geogebra/kernel/roots/RealRootFunction.java,
+       geogebra/kernel/roots/RealRoot.java
+Copyright:  2002-2004, Michael Thomas Flanagan <m.flanagan at ee.ucl.ac.uk>
+License: non-free !!!
+ PERMISSION TO COPY:
+ Permission to use, copy and modify this software and its documentation for
+ NON-COMMERCIAL purposes is granted, without fee, provided that an acknowledgement
+ to the author, Michael Thomas Flanagan at www.ee.ucl.ac.uk/~mflanaga, appears in all copies.
+ .
+ Dr Michael Thomas Flanagan makes no representations about the suitability
+ or fitness of the software for any or for a particular purpose.
+ Michael Thomas Flanagan shall not be liable for any damages suffered
+ as a result of using, modifying or distributing this software or its derivatives.
 
-Copyright:
+Files: geogebra/util/Base64.java
+Copyright: 2003, Casey Marshall <rsdio at metastatic.org>
+           1996, Internet Software Consortium
+           1995, International Business Machines, Inc.
+License: GPL-2+
+ With exception... blah blah...
 
-    <Copyright (C) YYYY Firstname Lastname>
-    <likewise for another author>
+Files: geogebra/SplashWindow.java
+Copyright: 1999-2003, Werner Randelshofer
+License: GPL-2+
 
-License:
+Files: jasymca/MPN.java, jasymca/Random.java
+Copyright: 1998, 1999, 2000, 2001, 2002, Free Software Foundation, Inc
+License: GPL-2+
+ This file is part of GNU Classpath.
+ .
+ GNU Classpath 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, or (at your option)
+ any later version.
+  .
+ GNU Classpath 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 GNU Classpath; see the file COPYING.  If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA.
+ .
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library.  Thus, the terms and
+ conditions of the GNU General Public License cover the whole
+ combination.
+ .
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module.  An independent module is a module which is not derived from
+ or based on this library.  If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so.  If you do not wish to do so, delete this
+ exception statement from your version.
 
-    <Put the license of the package here indented by 4 spaces>
+Files: geogebra/kernel/AlgoCurvature.java,
+       geogebra/kernel/AlgoLengthFunction.java,
+       geogebra/kernel/AlgoLengthFunction2Points.java,
+       geogebra/kernel/AlgoTangentCurve.java,
+       geogebra/kernel/AlgoCurvatureCurve.java,
+       geogebra/kernel/AlgoLengthCurve.java,
+       geogebra/kernel/AlgoCurvatureVectorCurve.java,
+       geogebra/kernel/AlgoLengthCurve2Points.java
+Copyright: 2007, Victor Franco Espino
+           Markus Hohenwarter
+License: ??
 
-The Debian packaging is:
+Files: geogebra/kernel/AlgoListLCM.java,
+       geogebra/kernel/AlgoFactor.java,
+       geogebra/kernel/AlgoTake.java,
+       geogebra/kernel/AlgoBinomial.java
+Copyright: 2008, Michael Borcherds
+License: GPL-2
 
-    Copyright (C) 2010 Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
-
-# Please chose a license for your packaging work. If the program you package
-# uses a mainstream license, using the same license is the safest choice.
-# Please avoid to pick license terms that are more restrictive than the
-# packaged work, as it may make Debian's contributions unacceptable upstream.
-# If you just want it to be GPL version 3, leave the following lines in.
-
-and is licensed under the GPL version 3,
-see "/usr/share/common-licenses/GPL-3".
-
-# Please also look if there are files or directories which have a
-# different copyright/license attached and list them here.
+Files: debian/*
+Copyright: 2010, Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
+License: GPL-3+
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..ddbb9d3
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1,2 @@
+usr/share/geogebra
+usr/bin
diff --git a/debian/geogebra.sh b/debian/geogebra.sh
new file mode 100755
index 0000000..1699404
--- /dev/null
+++ b/debian/geogebra.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Simple script to start GeoGebra
+
+if [ -z "$JAVACMD" ] ; then
+	JAVACMD=java
+fi
+
+exec $JAVACMD $JAVA_OPTS -jar /usr/share/geogebra/geogebra.jar "$@"
+	
+
diff --git a/debian/get_orig_source.sh b/debian/get_orig_source.sh
new file mode 100755
index 0000000..769a384
--- /dev/null
+++ b/debian/get_orig_source.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# Input: $TAG, $VERSION
+
+DESTDIR="../tarballs/geogebra-$VERSION"
+DESTTGZ="../tarballs/geogebra_$VERSION.orig.tar.gz"
+
+# Downloads code from SVN repository
+test -d ../tarballs/. || mkdir -p ../tarballs
+svn export "http://geogebra.uni.lu/svn/tags/$TAG/geogebra/" "$DESTDIR"
+
+# Removes all upstream JARs
+find "$DESTDIR" -name '*.jar' | xargs rm -vf
+
+# Removes code with problematic license
+rm -fr "$DESTDIR/installer"
+rm -fr "$DESTDIR/geogebra/kernel/complex"
+rm -f "$DESTDIR/geogebra/kernel/roots/RealRoot.java"
+rm -f "$DESTDIR/geogebra/kernel/roots/RealRootFunction.java"
+
+# Removes embedded copies of other software
+rm -fr "$DESTDIR/org"
+
+# Builds tarball
+tar czf "$DESTTGZ" -C `dirname "$DESTDIR"` `basename "$DESTDIR"`
+
+# Deletes snapshot dir
+rm -fr "$DESTDIR"
+
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..c9e25e7
--- /dev/null
+++ b/debian/install
@@ -0,0 +1 @@
+build/geogebra.jar build/geogebra_main.jar build/geogebra_gui.jar build/geogebra_cas.jar build/geogebra_export.jar build/geogebra_properties.jar usr/share/geogebra
diff --git a/debian/rules b/debian/rules
index 837e768..1d8d87b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,3 +22,6 @@ DEB_JARS += /usr/share/java/freehep-graphicsio-svg.jar
 DEB_JARS += /usr/share/java/freehep-graphicsio-pdf.jar
 DEB_JARS += /usr/share/java/freehep-graphicsio-emf.jar
 
+install/geogebra::
+	install -m 755 $(CURDIR)/debian/geogebra.sh $(CURDIR)/debian/geogebra/usr/bin/geogebra
+
diff --git a/geogebra/GeoGebra.java b/geogebra/GeoGebra.java
index cf5f663..2fc7cce 100644
--- a/geogebra/GeoGebra.java
+++ b/geogebra/GeoGebra.java
@@ -19,8 +19,8 @@ import java.net.URL;
 public class GeoGebra extends Object {
 	
 	// GeoGebra version
-	public static final String BUILD_DATE = "January 24, 2010";
-	public static final String VERSION_STRING = "3.2.40.0";
+	public static final String BUILD_DATE = "June 19, 2010";
+	public static final String VERSION_STRING = "3.2.42.0";
 	public static final String SHORT_VERSION_STRING = "3.2"; // used for online archive
 		
 	// File format versions
@@ -29,7 +29,7 @@ public class GeoGebra extends Object {
 	
 	// pre-releases and I2G
 	public static final boolean IS_PRE_RELEASE = !VERSION_STRING.endsWith(".0");
-	public static final boolean DISABLE_I2G = !IS_PRE_RELEASE;
+	public static final boolean DISABLE_I2G = true;
 
 	// URLs
 	public final static String GEOGEBRA_ONLINE_ARCHIVE_BASE = "http://www.geogebra.org/webstart/" + SHORT_VERSION_STRING +"/";
@@ -40,8 +40,16 @@ public class GeoGebra extends Object {
 	public final static int MAX_HEAP_SPACE = 512;
 	
     public static void main(String[] args) {  
+
+    	Frame splashFrame = null;
+    	boolean showSplash = true;
+    	for (int i = 0 ; i < args.length ; i++) {
+    		if (args[i].equals("--showSplash=false")) showSplash = false;
+    		else if (args[i].equals("--help")) showSplash = false;
+    	}
+    	
+    	if (showSplash) {
     	  // Show splash screen
-		  Frame splashFrame = null;
 		  URL imageURL = GeoGebra.class.getResource("/geogebra/splash.png");
 		  if (imageURL != null) {
 		      splashFrame = SplashWindow.splash(
@@ -50,6 +58,7 @@ public class GeoGebra extends Object {
 		  } else {
 		      System.err.println("Splash image not found");
 		  }
+    	}
 		  
 		  // Start GeoGebra
 		  try {        			  		
diff --git a/geogebra/euclidian/Clipping.java b/geogebra/euclidian/Clipping.java
deleted file mode 100644
index 0135afd..0000000
--- a/geogebra/euclidian/Clipping.java
+++ /dev/null
@@ -1,348 +0,0 @@
-package geogebra.euclidian;
-
-
-
-	// ============================================================================
-	// File:               Clipping.java
-	//
-	// Project:            DXF Viewer and general purpose
-	//
-	// Purpose:            Workaround for Java 1.2/1.3 problem with line drawing
-	//
-	// Author:             Rammi
-	//
-	// Copyright Notice:   (c) 2000  Rammi (rammi at caff.de)
-//	                     This source code is in the public domain. 
-//	                     USE AT YOUR OWN RISK!
-	//=============================================================================
-
-	// package de.caff.gimmicks;
-
-	import java.awt.geom.Point2D;
-
-	/**
-	 *  Clipping of lines to the inside of a rectangle.
-	 *  This is useful as a workaround for Java bug id 4252578 (i.e. the
-	 *  JVM hangs when you try to draw a line with starting and/or end point
-	 *  a long distance outside the image area) which came in with JDK 1.2 and 
-	 *  is still there in JDK 1.3.
-	 *  It's also useful because all Java versions have problems with lines
-	 *  outside the image area which are sometimes drawn completely wrong.
-	 *  
-	 *  @author Rammi (rammi at caff.de)
-	 */
-	public class Clipping {
-	  // some constants
-	  /** Flag for point lying left of clipping area. */
-	  public final static int LEFT     = 0x01;
-	  /** Flag for point lying between horizontal bounds of area. */
-	  public final static int H_CENTER = 0x02;
-	  /** Flag for point lying right of clipping area. */
-	  public final static int RIGHT    = 0x04;
-
-	  /** Flag for point lying &quot;below&quot; clipping area. */
-	  public final static int BELOW    = 0x10;
-	  /** Flag for point lying between vertical bounds of clipping area. */
-	  public final static int V_CENTER = 0x20;
-	  /** Flag for point lying &quot;above&quot; clipping area. */
-	  public final static int ABOVE    = 0x40;
-
-	  /** Mask for points which are inside. */
-	  public final static int INSIDE   = H_CENTER | V_CENTER;
-	  /** Mask for points which are outside. */
-	  public final static int OUTSIDE  = LEFT | RIGHT | BELOW | ABOVE;
-
-	  /**
-	   *  Calculate the clipping points of a line with a rectangle.
-	   *  @param  x1     starting x of line
-	   *  @param  y1     starting y of line
-	   *  @param  mask1  clipping info mask for starting point
-	   *  @param  x2     ending x of line
-	   *  @param  y2     ending y of line
-	   *  @param  mask2  clipping info mask for ending point
-	   *  @param  xmin   lower left x of rectangle
-	   *  @param  xmax   upper right x of rectangle
-	   *  @param  ymin   lower left y of rectangle
-	   *  @param  ymax   upper right y of rectangle
-	   *  @return <code>null</code> (does not clip) or array of two points
-	   */
-	  public static Point2D.Double[] getClipped(double x1, double y1, 
-					   double x2,   double y2, 
-					   int xmin, int xmax,
-					   int ymin, int ymax)
-	  {
-	    int mask1 = 0;		// position mask for first point
-	    int mask2 = 0;		// position mask for second point
-
-	    if (x1 < xmin) {
-	      mask1 |= LEFT;
-	    }
-	    else if (x1 >= xmax) {
-	      mask1 |= RIGHT;
-	    }
-	    else {
-	      mask1 |= H_CENTER;
-	    }
-	    if (y1 < ymin) {
-	      // btw: I know that in AWT y runs from down but I more used to
-	      //      y pointing up and it makes no difference for the algorithms
-	      mask1 |= BELOW;
-	    }
-	    else if (y1 >= ymax) {
-	      mask1 |= ABOVE;
-	    }
-	    else {
-	      mask1 |= V_CENTER;
-	    }
-	    if (x2 < xmin) {
-	      mask2 |= LEFT;
-	    }
-	    else if (x2 >= xmax) {
-	      mask2 |= RIGHT;
-	    }
-	    else {
-	      mask2 |= H_CENTER;
-	    }
-	    if (y2 < ymin) {
-	      mask2 |= BELOW;
-	    }
-	    else if (y2 >= ymax) {
-	      mask2 |= ABOVE;
-	    }
-	    else {
-	      mask2 |= V_CENTER;
-	    }
-
-
-	    int mask = mask1 | mask2;
-	    
-	    if ((mask & OUTSIDE) == 0) {
-	      // fine. everything's internal
-	      Point2D.Double[] ret = new Point2D.Double[2];
-	      ret[0] = new Point2D.Double(x1, y1);
-	      ret[1] = new Point2D.Double(x2, y2);
-	      return ret;
-	    }
-	    else if ((mask & (H_CENTER|LEFT))  == 0  || // everything's right
-		     (mask & (H_CENTER|RIGHT)) == 0  || // everything's left
-		     (mask & (V_CENTER|BELOW)) == 0  || // everything's above
-		     (mask & (V_CENTER|ABOVE)) == 0) {  // everything's below
-	      // nothing to do
-	      return null;
-	    }
-	    else {
-	      // need clipping
-	      return getClipped(x1, y1, mask1, x2, y2, mask2,
-				xmin, xmax, ymin, ymax);
-	    }
-	  }
-
-
-	  /**
-	   *  Calculate the clipping points of a line with a rectangle.
-	   *  @param  x1     starting x of line
-	   *  @param  y1     starting y of line
-	   *  @param  mask1  clipping info mask for starting point
-	   *  @param  x2     ending x of line
-	   *  @param  y2     ending y of line
-	   *  @param  mask2  clipping info mask for ending point
-	   *  @param  xmin   lower left x of rectangle
-	   *  @param  ymin   lower left y of rectangle
-	   *  @param  xmax   upper right x of rectangle
-	   *  @param  ymax   upper right y of rectangle
-	   *  @return <code>null</code> (does not clip) or array of two points
-	   */
-	  private static Point2D.Double[] getClipped(double x1, double y1, int mask1,
-					      double x2, double y2, int mask2,
-					      double xmin, double xmax,
-					      double ymin, double ymax)
-	  {
-	    int mask = mask1 ^ mask2;
-	    Point2D.Double p1 = null;
-
-	    /*
-	    System.out.println("mask1 = "+mask1);
-	    System.out.println("mask2 = "+mask2);
-	    System.out.println("mask = "+mask);
-	    */
-
-	    if (mask1 == INSIDE) {
-	      // point 1 is internal
-	      p1 = new Point2D.Double(x1, y1);
-	      if (mask == 0) {
-		// both masks are the same, so the second point is inside, too
-		Point2D.Double[] ret = new Point2D.Double[2];
-		ret[0] = p1;
-		ret[1] = new Point2D.Double(x2, y2);
-		return ret;
-	      }
-	    }
-	    else if (mask2 == INSIDE) {
-	      // point 2 is internal
-	      p1 = new Point2D.Double(x2, y2);
-	    }
-
-	    if ((mask & LEFT) != 0) {
-	      //      System.out.println("Trying left");
-	      // try to calculate intersection with left line
-	      Point2D.Double p = intersect(x1, y1, x2, y2, xmin, ymin, xmin, ymax);
-	      if (p != null) {
-		if (p1 == null) {
-		  p1 = p;
-		}
-		else {
-		  Point2D.Double[] ret = new Point2D.Double[2];
-		  ret[0] = p1;
-		  ret[1] = p;
-		  return ret;
-		}
-	      }
-	    }
-	    if ((mask & RIGHT) != 0) {
-	      //      System.out.println("Trying right");
-	      // try to calculate intersection with left line
-	      Point2D.Double p = intersect(x1, y1, x2, y2, xmax, ymin, xmax, ymax);
-	      if (p != null) {
-		if (p1 == null) {
-		  p1 = p;
-		}
-		else {
-		  Point2D.Double[] ret = new Point2D.Double[2];
-		  ret[0] = p1;
-		  ret[1] = p;
-		  return ret;
-		}
-	      }
-	    }
-	    if (mask1 == (LEFT|BELOW)  ||  mask1 == (RIGHT|BELOW)) {
-	      // for exactly these two special cases use different sequence!
-
-	      if ((mask & ABOVE) != 0) {
-		//      System.out.println("Trying top");
-		// try to calculate intersection with lower line
-		Point2D.Double p = intersect(x1, y1, x2, y2, xmin, ymax, xmax, ymax);
-		if (p != null) {
-		  if (p1 == null) {
-		    p1 = p;
-		  }
-		  else {
-		    Point2D.Double[] ret = new Point2D.Double[2];
-		    ret[0] = p1;
-		    ret[1] = p;
-		    return ret;
-		  }
-		}
-	      }
-	      if ((mask & BELOW) != 0) {
-		//      System.out.println("Trying bottom");
-		// try to calculate intersection with lower line
-		Point2D.Double p = intersect(x1, y1, x2, y2, xmin, ymin, xmax, ymin);
-		if (p != null) {
-		  if (p1 == null) {
-		    p1 = p;
-		  }
-		  else {
-		    Point2D.Double[] ret = new Point2D.Double[2];
-		    ret[0] = p1;
-		    ret[1] = p;
-		    return ret;
-		  }
-		}
-	      }
-	    }
-	    else {
-	      if ((mask & BELOW) != 0) {
-		//      System.out.println("Trying bottom");
-		// try to calculate intersection with lower line
-		Point2D.Double p = intersect(x1, y1, x2, y2, xmin, ymin, xmax, ymin);
-		if (p != null) {
-		  if (p1 == null) {
-		    p1 = p;
-		  }
-		  else {
-		    Point2D.Double[] ret = new Point2D.Double[2];
-		    ret[0] = p1;
-		    ret[1] = p;
-		    return ret;
-		  }
-		}
-	      }
-	      if ((mask & ABOVE) != 0) {
-		//      System.out.println("Trying top");
-		// try to calculate intersection with lower line
-		Point2D.Double p = intersect(x1, y1, x2, y2, xmin, ymax, xmax, ymax);
-		if (p != null) {
-		  if (p1 == null) {
-		    p1 = p;
-		  }
-		  else {
-		    Point2D.Double[] ret = new Point2D.Double[2];
-		    ret[0] = p1;
-		    ret[1] = p;
-		    return ret;
-		  }
-		}
-	      }
-	    }
-
-	    // no (or not enough) intersections found
-	    return null;
-	  }
-
-	  /**
-	   *  Intersect two lines.
-	   *  @param  x11  starting x of 1st line
-	   *  @param  y11  starting y of 1st line
-	   *  @param  x12  ending x of 1st line
-	   *  @param  y12  ending y of 1st line
-	   *  @param  x21  starting x of 2nd line
-	   *  @param  y21  starting y of 2nd line
-	   *  @param  x22  ending x of 2nd line
-	   *  @param  y22  ending y of 2nd line
-	   *  @return intersection point or <code>null</code>
-	   */
-	  private static Point2D.Double intersect(double x11, double y11,
-					 double x12, double y12,
-					 double x21, double y21,
-					 double x22, double y22)
-	  {
-	    double dx1 = x12 - x11;
-	    double dy1 = y12 - y11;
-	    double dx2 = x22 - x21;
-	    double dy2 = y22 - y21;
-	    double det = (dx2*dy1-dy2*dx1);
-
-	  
-//	    System.out.println("intersect");
-//	    System.out.println("x1  = "+x11);
-//	    System.out.println("y1  = "+y11);
-//	    System.out.println("x2  = "+x21);
-//	    System.out.println("y2  = "+y21);
-//	    System.out.println("dx1 = "+dx1);
-//	    System.out.println("dy1 = "+dy1);
-//	    System.out.println("dx2 = "+dx2);
-//	    System.out.println("dy2 = "+dy2);
-	
-
-	    if (det != 0.0) {
-	      double mu = ((x11 - x21)*dy1 - (y11 - y21)*dx1)/det;
-	      //      System.out.println("mu = "+mu);
-	      if (mu >= 0.0  &&  mu <= 1.0) {
-		Point2D.Double p = new Point2D.Double((x21 + mu*dx2),
-				    (y21 + mu*dy2));
-		//	System.out.println("p = "+p);
-		return p;
-	      }
-	    }
-	    
-	    return null;
-	  }
-
-
-	}
-
-
-
-
-
-
diff --git a/geogebra/euclidian/DrawConic.java b/geogebra/euclidian/DrawConic.java
index c2f1bf0..930479e 100644
--- a/geogebra/euclidian/DrawConic.java
+++ b/geogebra/euclidian/DrawConic.java
@@ -18,6 +18,7 @@ the Free Software Foundation.
 
 package geogebra.euclidian;
 
+import geogebra.euclidian.clipping.ClipShape;
 import geogebra.kernel.AlgoCirclePointRadius;
 import geogebra.kernel.AlgoCircleThreePoints;
 import geogebra.kernel.AlgoCircleTwoPoints;
@@ -53,9 +54,11 @@ final public class DrawConic extends Drawable implements Previewable {
     // plotpoints per quadrant for hyperbola
     private static final int PLOT_POINTS = 32;
 	static final int MAX_PLOT_POINTS = 300;
+	
     // maximum of pixels for a standard circle radius
     // bigger circles are drawn via Arc2D
-    private static final double BIG_CIRCLE_RADIUS = 600;    
+    public static final double BIG_RADIUS = 600;   
+    public static final double HUGE_RADIUS = 1E12;
            
     private GeoConic conic;
     
@@ -172,11 +175,11 @@ final public class DrawConic extends Drawable implements Previewable {
 	final public void update() {
         isVisible = geo.isEuclidianVisible();
         if (!isVisible) return;
-        labelVisible = geo.isLabelVisible();
-       
-        updateStrokes(conic);          
-        type = conic.getType();               
+        labelVisible = geo.isLabelVisible();         
         
+        updateStrokes(conic);
+        type = conic.getType();
+         
         switch (type) {
             case GeoConic.CONIC_SINGLE_POINT:                
                 updateSinglePoint();
@@ -196,40 +199,56 @@ final public class DrawConic extends Drawable implements Previewable {
                 updateEllipse();
                 break;
                 
+            case GeoConic.CONIC_PARABOLA:
+                updateParabola();
+                break;  
+                
             case GeoConic.CONIC_HYPERBOLA:    
                 updateHyperbola();
                 break;
-                
-            case GeoConic.CONIC_PARABOLA:
-                updateParabola();
-                break;                          
         }
         
+        if (!isVisible)
+        	return;
+        
+        // shape on screen?
+        Rectangle viewRect = new Rectangle(0,0,view.width,view.height);
+        boolean includesScreenCompletely = false;
         
-        // on screen?
         switch (type) {	                          	            
 	        case GeoConic.CONIC_CIRCLE:                                               
-	        case GeoConic.CONIC_ELLIPSE:   
-	        case GeoConic.CONIC_PARABOLA:	           
-	        	// shape on screen?
-	        	// Michael Borcherds: bugfix getBounds2D() added otherwise rotated parabolas not displayed sometimes
-	        	if (arcFiller == null && !shape.getBounds2D().intersects(0,0, view.width, view.height)) {				
-	    			isVisible = false;
-	    			return;
-	    		}
+	        case GeoConic.CONIC_ELLIPSE:
+	        	includesScreenCompletely = shape.contains(viewRect);
+	        	
+	        case GeoConic.CONIC_PARABOLA:
+	        	// offScreen = includesScreenCompletely or the shape does not intersect the view rectangle
+	        	boolean offScreen =  includesScreenCompletely || !shape.getBounds2D().intersects(viewRect);
+	        	if (geo.alphaValue == 0f) {
+	        		// no filling
+	        		isVisible = !offScreen;
+	        	} else {
+	        		// filling
+	        		if (includesScreenCompletely) {
+	        			isVisible = true;
+	        		} else {
+	        			isVisible = !offScreen;
+	        		}
+	        	}	        	
 	        	break;
 	            
 	        case GeoConic.CONIC_HYPERBOLA:
 	        	// hyperbola wings on screen?
-	        	hypLeftOnScreen = hypLeft.intersects(0,0, view.width, view.height);
-	        	hypRightOnScreen = hypRight.intersects(0,0, view.width, view.height);
+	        	hypLeftOnScreen = hypLeft.intersects(viewRect);
+	        	hypRightOnScreen = hypRight.intersects(viewRect);
 	        	if (!hypLeftOnScreen && !hypRightOnScreen) {
 	        		isVisible = false;
-	    			return;
 	        	}	            
 	            break;            
         }
         
+        if (!isVisible)
+        	return;
+
 		// draw trace
 		if (conic.trace) {
 			isTracing = true;
@@ -287,26 +306,32 @@ final public class DrawConic extends Drawable implements Previewable {
     }
     
     final private void updateCircle() {
+        // calc screen pixel of radius                        
+        radius =  halfAxes[0] * view.xscale;
+        yradius =  halfAxes[1] * view.yscale; // radius scaled in y direction
+		if (radius > DrawConic.HUGE_RADIUS || yradius > DrawConic.HUGE_RADIUS) {
+			isVisible = false;
+			return;
+		}
+		
         if (firstCircle) {
             firstCircle = false;  
             arc = new Arc2D.Double();     
             if (ellipse == null) ellipse = new Ellipse2D.Double();
         }
         
-        // calc screen pixel of radius                        
-        radius =  halfAxes[0] * view.xscale;
-        yradius =  halfAxes[1] * view.yscale; // radius scaled in y direction
                 
         i = -1; // bugfix
         
+        // calc screen coords of midpoint
+        mx =  midpoint.x * view.xscale + view.xZero;
+        my = -midpoint.y * view.yscale + view.yZero; 
+        
         // if circle is very big, draw arc: this is very important
         // for graphical continuity
-        if (radius < BIG_CIRCLE_RADIUS || yradius < BIG_CIRCLE_RADIUS) {              
+        if (radius < BIG_RADIUS && yradius < BIG_RADIUS) {              
             circle = ellipse;
             arcFiller = null;         
-            // calc screen coords of midpoint
-            mx =  midpoint.x * view.xscale + view.xZero;
-            my = -midpoint.y * view.yscale + view.yZero;   
             ellipse.setFrame(mx-radius, my-yradius, 2.0*radius, 2.0*yradius);                                                      
         } else {            
         // special case: really big circle
@@ -370,10 +395,14 @@ final public class DrawConic extends Drawable implements Previewable {
                 angEnd = Math.PI - Math.acos(mx / radius);
 				i = 3;
             }      
-            // on screen (should not be needed)
+            // center on screen 
             else {                
-                angSt = 0.0d;
-                angEnd = 2*Math.PI;                
+            	// huge circle with center on screen: use screen rectangle instead of circle for possible filling
+            	shape = circle = new Rectangle(-1,-1,view.width+2, view.height+2);
+                arcFiller = null; 
+                xLabel = -100;                
+                yLabel = -100;  
+                return;
             }            
             
             if (Double.isNaN(angSt) || Double.isNaN(angEnd)) {                
@@ -463,6 +492,14 @@ final public class DrawConic extends Drawable implements Previewable {
     }        
     
     final private void updateEllipse() {
+		// check for huge pixel radius
+		double xradius = halfAxes[0] * view.xscale;
+		double yradius = halfAxes[1] * view.yscale;
+		if (xradius > DrawConic.HUGE_RADIUS || yradius > DrawConic.HUGE_RADIUS) {
+			isVisible = false;
+			return;
+		}
+    	
         if (firstEllipse) {
             firstEllipse = false;
             if (ellipse == null) ellipse = new Ellipse2D.Double();               
@@ -474,7 +511,13 @@ final public class DrawConic extends Drawable implements Previewable {
         
         // set ellipse
         ellipse.setFrameFromCenter(0, 0, halfAxes[0], halfAxes[1]); 
-        shape = transform.createTransformedShape(ellipse);                                     
+
+		if (xradius < DrawConic.BIG_RADIUS && yradius < DrawConic.BIG_RADIUS) {
+			shape = transform.createTransformedShape(ellipse); 
+		} else {
+			// clip big arc at screen
+	        shape = ClipShape.clipToRect(ellipse, transform, new Rectangle(-1,-1,view.width+2, view.height+2));
+		}
 
         // set label coords
         labelCoords[0] = -halfAxes[0] / 2.0d;
@@ -621,7 +664,7 @@ final public class DrawConic extends Drawable implements Previewable {
             k2 = i * i;
         }
         x0 = k2/2 * conic.p; // x = k*p
-        y0 = i * conic.p;    // y = sqrt(2k p�) = i p                
+        y0 = i * conic.p;    // y = sqrt(2k p�) = i p 
         
 		//	set transform
 		transform.setTransform(view.coordTransform);
@@ -638,7 +681,7 @@ final public class DrawConic extends Drawable implements Previewable {
         parpoints[5] = -y0;
         transform.transform(parpoints, 0, parpoints, 0, 3);
         parabola.setCurve(parpoints, 0);
-        shape = parabola;                     
+        shape = parabola; 
 
         // set label coords
         labelCoords[0] = 2 * conic.p; 
@@ -769,7 +812,10 @@ final public class DrawConic extends Drawable implements Previewable {
 		}
 	}
     
-	final public boolean hit(int x, int y) {             
+	final public boolean hit(int x, int y) {    
+		if (!isVisible)
+			return false;
+		
         switch (type) {
             case GeoConic.CONIC_SINGLE_POINT:                         
                 return drawPoint.hit(x, y);                                
diff --git a/geogebra/euclidian/DrawConicPart.java b/geogebra/euclidian/DrawConicPart.java
index b539521..a408fc7 100644
--- a/geogebra/euclidian/DrawConicPart.java
+++ b/geogebra/euclidian/DrawConicPart.java
@@ -12,6 +12,7 @@ the Free Software Foundation.
 
 package geogebra.euclidian;
 
+import geogebra.euclidian.clipping.ClipShape;
 import geogebra.kernel.AlgoConicPartCircle;
 import geogebra.kernel.AlgoConicPartCircumcircle;
 import geogebra.kernel.AlgoSemicircle;
@@ -60,8 +61,7 @@ implements Previewable {
     //private Drawable degDrawable;
     
     private double [] coords = new double[2];
-    private GeoPoint tempPoint;
-    
+
     // preview
     private ArrayList prevPoints;
     private GeoPoint [] previewTempPoints;  
@@ -149,19 +149,33 @@ implements Previewable {
 	private void updateEllipse() {	
 		draw_type = DRAW_TYPE_ELLIPSE;
 		
-		 // set arc
+		// check for huge pixel radius
+		double xradius = halfAxes[0] * view.xscale;
+		double yradius = halfAxes[1] * view.yscale;
+		if (xradius > DrawConic.HUGE_RADIUS || yradius > DrawConic.HUGE_RADIUS) {
+			isVisible = false;
+			return;
+		}
+		
+		// set arc
 		arc.setArc(-halfAxes[0],-halfAxes[1],
 					2*halfAxes[0],2*halfAxes[1],
 					-Math.toDegrees(conicPart.getParameterStart()),
 					-Math.toDegrees(conicPart.getParameterExtent()),
 					closure
 					);
-					
+			
 		// transform to screen coords
 		transform.setTransform(view.coordTransform);
 		transform.concatenate(conicPart.getAffineTransform()); 
-        shape = transform.createTransformedShape(arc);        
-                
+		
+		if (xradius < DrawConic.BIG_RADIUS && yradius < DrawConic.BIG_RADIUS) {
+			shape = transform.createTransformedShape(arc); 
+		} else {
+			// clip big arc at screen
+	        shape = ClipShape.clipToRect(arc, transform, new Rectangle(-1,-1,view.width+2, view.height+2));
+		}
+		          
         // label position
         if (labelVisible) {    
         	double midAngle = conicPart.getParameterStart() + conicPart.getParameterExtent()/2.0;
@@ -203,7 +217,9 @@ implements Previewable {
 	}
     
 	final public void draw(Graphics2D g2) {
-        if (isVisible) {	
+        if (isVisible) {
+        	g2.clipRect(0,0,view.width, view.height);
+        	
         	switch (draw_type) {
         		case DRAW_TYPE_ELLIPSE:
 					if (geo.alphaValue > 0.0f) {
@@ -357,6 +373,8 @@ implements Previewable {
 	}
     
 	final public boolean hit(int x,int y) { 
+		if (!isVisible) return false;
+		
 		switch (draw_type) {
 			case DRAW_TYPE_ELLIPSE:
 				if (strokedShape == null) {
diff --git a/geogebra/euclidian/DrawLine.java b/geogebra/euclidian/DrawLine.java
index 19ddfe6..7b37b5e 100644
--- a/geogebra/euclidian/DrawLine.java
+++ b/geogebra/euclidian/DrawLine.java
@@ -92,7 +92,7 @@ public final class DrawLine extends Drawable implements Previewable {
             setClippedLine();
 			
             // line on screen?		
-    		if (!line.intersects(0,0, view.width, view.height)) {				
+    		if (!line.intersects( -EuclidianView.CLIP_DISTANCE,  -EuclidianView.CLIP_DISTANCE, view.width + EuclidianView.CLIP_DISTANCE, view.height + EuclidianView.CLIP_DISTANCE)) {				
     			isVisible = false;
             	// don't return here to make sure that getBounds() works for offscreen points too
     		}
@@ -130,9 +130,9 @@ public final class DrawLine extends Drawable implements Previewable {
             k = gx / gy * view.scaleRatio; 
             d = view.yZero + gz/gy * view.yscale - k * view.xZero;
             
-            x1 = 0;
-            y1 = d;            
-            x2 = view.width;
+            x1 = -EuclidianView.CLIP_DISTANCE;
+            y1 = k * x1 + d;            
+            x2 = view.width + EuclidianView.CLIP_DISTANCE;
             y2 = k * x2 + d; 
             p1Pos = LEFT;
             p2Pos = RIGHT;            
@@ -146,10 +146,10 @@ public final class DrawLine extends Drawable implements Previewable {
             k = gy / (gx * view.scaleRatio) ; 
             d = view.xZero - gz/gx * view.xscale - k * view.yZero;
             
-            y1 = view.height;   
+            y1 = view.height + EuclidianView.CLIP_DISTANCE;   
             x1 = k * y1 + d;
-            y2 = 0;
-            x2 = d;
+            y2 = -EuclidianView.CLIP_DISTANCE;
+            x2 = k * y2 + d;
             p1Pos = BOTTOM;
             p2Pos = TOP;                        
             clipLeftRight();
@@ -165,10 +165,10 @@ public final class DrawLine extends Drawable implements Previewable {
     // points (0, y1), (width, y2) -> clip on y=0 and y=height
     final private void clipTopBottom() {
         // calc clip attributes for both points (x1,y1), (x2,y2)        
-        attr1[TOP]      = y1 < 0;
-        attr1[BOTTOM]   = y1 > view.height;                
-        attr2[TOP]      = y2 < 0;
-        attr2[BOTTOM]   = y2 > view.height;
+        attr1[TOP]      = y1 < -EuclidianView.CLIP_DISTANCE;
+        attr1[BOTTOM]   = y1 > view.height + EuclidianView.CLIP_DISTANCE;                
+        attr2[TOP]      = y2 < -EuclidianView.CLIP_DISTANCE;
+        attr2[BOTTOM]   = y2 > view.height + EuclidianView.CLIP_DISTANCE;
         
         // both points outside (TOP or BOTTOM)
         if ((attr1[TOP] && attr2[TOP]) ||
@@ -177,26 +177,26 @@ public final class DrawLine extends Drawable implements Previewable {
         // at least one point inside -> clip        
         // point1 TOP -> clip with y=0
         if (attr1[TOP]) { 
-            y1 = 0; 
-            x1 = -d/k;  
+            y1 = -EuclidianView.CLIP_DISTANCE; 
+            x1 = (y1 - d)/k;  
             p1Pos = TOP;
         }
         // point1 BOTTOM -> clip with y=height
         else if (attr1[BOTTOM]) { 
-            y1 = view.height;
+            y1 = view.height + EuclidianView.CLIP_DISTANCE;
             x1 = (y1 - d)/k;             
             p1Pos = BOTTOM;
         }
         
         // point2 TOP -> clip with y=0
         if (attr2[TOP]) { 
-            y2 = 0; 
-            x2 = -d/k;  
+            y2 = -EuclidianView.CLIP_DISTANCE; 
+            x2 = (y2 - d)/k;  
             p2Pos = TOP;
         }
         // point2 BOTTOM -> clip with y=height
         else if (attr2[BOTTOM]) { 
-            y2 = view.height;
+            y2 = view.height + EuclidianView.CLIP_DISTANCE;
             x2 = (y2 - d)/k;             
             p2Pos = BOTTOM;
         }        
@@ -207,10 +207,10 @@ public final class DrawLine extends Drawable implements Previewable {
     // points (x1, 0), (x2, height) -> clip on x=0 and x=width
     final private void clipLeftRight() {
         // calc clip attributes for both points (x1,y1), (x2,y2)        
-        attr1[LEFT]     = x1 < 0;
-        attr1[RIGHT]    = x1 > view.width;                
-        attr2[LEFT]     = x2 < 0;
-        attr2[RIGHT]    = x2 > view.width;
+        attr1[LEFT]     = x1 < -EuclidianView.CLIP_DISTANCE;
+        attr1[RIGHT]    = x1 > view.width + EuclidianView.CLIP_DISTANCE;                
+        attr2[LEFT]     = x2 < -EuclidianView.CLIP_DISTANCE;
+        attr2[RIGHT]    = x2 > view.width + EuclidianView.CLIP_DISTANCE;
         
         // both points outside (LEFT or RIGHT)
         if ((attr1[LEFT] && attr2[LEFT]) ||
@@ -219,26 +219,26 @@ public final class DrawLine extends Drawable implements Previewable {
         // at least one point inside -> clip        
         // point1 LEFT -> clip with x=0
         if (attr1[LEFT]) { 
-            x1 = 0; 
-            y1 = -d/k;  
+            x1 = -EuclidianView.CLIP_DISTANCE; 
+            y1 = (x1 - d)/k;  
             p1Pos = LEFT;
         }
         // point1 RIGHT -> clip with x=width
         else if (attr1[RIGHT]) { 
-            x1 = view.width;
+            x1 = view.width + EuclidianView.CLIP_DISTANCE;
             y1 = (x1 - d)/k;             
             p1Pos = RIGHT;
         }
         
         // point2 LEFT -> clip with x=0
         if (attr2[LEFT]) { 
-            x2 = 0; 
-            y2 = -d/k;  
+            x2 = -EuclidianView.CLIP_DISTANCE; 
+            y2 = (x2 - d)/k;  
             p2Pos = LEFT;
         }
         // point2 RIGHT -> clip with x=width
         else if (attr2[RIGHT]) { 
-            x2 = view.width;
+            x2 = view.width + EuclidianView.CLIP_DISTANCE;
             y2 = (x2 - d)/k;             
             p2Pos = RIGHT;
         }        
diff --git a/geogebra/euclidian/DrawParametricCurve.java b/geogebra/euclidian/DrawParametricCurve.java
index ef75536..ff857e1 100644
--- a/geogebra/euclidian/DrawParametricCurve.java
+++ b/geogebra/euclidian/DrawParametricCurve.java
@@ -516,25 +516,25 @@ public class DrawParametricCurve extends Drawable {
 	  */
 	 private static boolean isSegmentOffScreen(EuclidianView view, double x1, double y1, double x2, double y2) {
 		 // top;
-		 if (y1 < 0 && y2 < 0)
+		 if (y1 < -EuclidianView.CLIP_DISTANCE && y2 < -EuclidianView.CLIP_DISTANCE)
 			 return true;
 		 
 		 // left
-		 if (x1 < 0 && x2 < 0)
+		 if (x1 < -EuclidianView.CLIP_DISTANCE && x2 < -EuclidianView.CLIP_DISTANCE)
 			 return true;
 		 
 		 // bottom
-		 if (y1 > view.height && y2 > view.height)
+		 if (y1 > view.height+EuclidianView.CLIP_DISTANCE && y2 > view.height+EuclidianView.CLIP_DISTANCE)
 			 return true;
 		 
 		 // right
-		 if (x1 > view.width && x2 > view.width)
+		 if (x1 > view.width+EuclidianView.CLIP_DISTANCE && x2 > view.width+EuclidianView.CLIP_DISTANCE)
 			 return true;
 		 
 		 // close to screen
 		 return false;
 	 }
-	 
+	 	 
 	 /**
 	  * Returns whether the angle between the vectors (vx, vy) and (wx, wy)
 	  * is smaller than MAX_BEND, where MAX_BEND = tan(MAX_ANGLE).
diff --git a/geogebra/euclidian/DrawSegment.java b/geogebra/euclidian/DrawSegment.java
index 0faeeae..cf6c0f5 100644
--- a/geogebra/euclidian/DrawSegment.java
+++ b/geogebra/euclidian/DrawSegment.java
@@ -18,6 +18,7 @@ the Free Software Foundation.
 
 package geogebra.euclidian;
 
+import geogebra.euclidian.clipping.ClipLine;
 import geogebra.kernel.ConstructionDefaults;
 import geogebra.kernel.GeoElement;
 import geogebra.kernel.GeoLine;
@@ -94,7 +95,7 @@ implements Previewable {
 			// A or B off screen
 			// clip at screen, that's important for huge coordinates
 			Point2D.Double [] clippedPoints = 
-				Clipping.getClipped(coordsA[0], coordsA[1], coordsB[0], coordsB[1], 0, view.width, 0, view.height);
+				ClipLine.getClipped(coordsA[0], coordsA[1], coordsB[0], coordsB[1], -EuclidianView.CLIP_DISTANCE, view.width + EuclidianView.CLIP_DISTANCE, -EuclidianView.CLIP_DISTANCE, view.height + EuclidianView.CLIP_DISTANCE);
 			if (clippedPoints == null) {
 				isVisible = false;	
 			} else {
diff --git a/geogebra/euclidian/DrawVector.java b/geogebra/euclidian/DrawVector.java
index 667f988..d0f3f82 100644
--- a/geogebra/euclidian/DrawVector.java
+++ b/geogebra/euclidian/DrawVector.java
@@ -18,6 +18,7 @@ the Free Software Foundation.
 
 package geogebra.euclidian;
 
+import geogebra.euclidian.clipping.ClipLine;
 import geogebra.kernel.ConstructionDefaults;
 import geogebra.kernel.GeoElement;
 import geogebra.kernel.GeoPoint;
@@ -50,7 +51,7 @@ public class DrawVector extends Drawable implements Previewable {
 	private double [] coordsB = new double[2];   
 	private double [] coordsV = new double[2]; 
     private GeneralPath gp; // for arrow   
-    boolean arrowheadVisible;
+    private boolean arrowheadVisible, lineVisible;
     private ArrayList points;
     
     /** Creates new DrawVector */
@@ -147,39 +148,53 @@ public class DrawVector extends Drawable implements Previewable {
 		  
         // set clipped line
 		if (line == null) line = new Line2D.Double();
+		lineVisible = true;
 		if (onscreenA && onscreenB) {
 			// A and B on screen
 			line.setLine(coordsA[0], coordsA[1], coordsF[0], coordsF[1]);
 		} else {
 			// A or B off screen
 			// clip at screen, that's important for huge coordinates
+			// check if any of vector is on-screen
 			Point2D.Double [] clippedPoints = 
-				Clipping.getClipped(coordsA[0], coordsA[1], coordsB[0], coordsB[1], 0, view.width, 0, view.height);
+				ClipLine.getClipped(coordsA[0], coordsA[1], coordsB[0], coordsB[1], -EuclidianView.CLIP_DISTANCE, view.width + EuclidianView.CLIP_DISTANCE, -EuclidianView.CLIP_DISTANCE, view.height + EuclidianView.CLIP_DISTANCE);
 			if (clippedPoints == null) {
 				isVisible = false;	
+				lineVisible = false;
+				arrowheadVisible = false;
 			} else {
-				line.setLine(clippedPoints[0].x, clippedPoints[0].y, clippedPoints[1].x, clippedPoints[1].y);
+				
+				// now re-clip at A and F
+				clippedPoints = 
+					ClipLine.getClipped(coordsA[0], coordsA[1], coordsF[0], coordsF[1], -EuclidianView.CLIP_DISTANCE, view.width + EuclidianView.CLIP_DISTANCE, -EuclidianView.CLIP_DISTANCE, view.height + EuclidianView.CLIP_DISTANCE);
+				if (clippedPoints != null)
+					line.setLine(clippedPoints[0].x, clippedPoints[0].y, clippedPoints[1].x, clippedPoints[1].y);
+				else 
+					lineVisible = false;
 			}
 		}
 		
-		// add triangle if end point on screen
+		// add triangle if visible
 		  if (gp == null) 
 			 gp = new GeneralPath();
 		  else 
 			gp.reset();
-		if (length > 0) {
-			  coordsV[0] /= 4.0;
-			  coordsV[1] /= 4.0;  
-			  
-			  gp.moveTo((float) coordsB[0], (float) coordsB[1]); // end point
-			  gp.lineTo((float) (coordsF[0] - coordsV[1]), (float)(coordsF[1] + coordsV[0]));
-			  gp.lineTo((float)(coordsF[0] + coordsV[1]), (float)(coordsF[1] - coordsV[0]));
-			  gp.closePath();	
-		}
-		arrowheadVisible = gp.intersects(0,0, view.width, view.height);
-    }
-    
+		  
+		  if (isVisible) {
 
+			if (length > 0) {
+				  coordsV[0] /= 4.0;
+				  coordsV[1] /= 4.0;  
+				  
+				  gp.moveTo((float) coordsB[0], (float) coordsB[1]); // end point
+				  gp.lineTo((float) (coordsF[0] - coordsV[1]), (float)(coordsF[1] + coordsV[0]));
+				  gp.lineTo((float)(coordsF[0] + coordsV[1]), (float)(coordsF[1] - coordsV[0]));
+				  gp.closePath();	
+			}
+			
+			arrowheadVisible = onscreenB || gp.intersects(0,0, view.width, view.height);
+		  }
+    }
     
     public void draw(Graphics2D g2) {
         if (isVisible) {
@@ -192,12 +207,12 @@ public class DrawVector extends Drawable implements Previewable {
             if (geo.doHighlighting()) {
                 g2.setPaint(v.getSelColor());
                 g2.setStroke(selStroke);            
-                g2.draw(line);       
+                if (lineVisible) g2.draw(line);       
             }
             
             g2.setPaint(v.getObjectColor());
 			g2.setStroke(objStroke);  
-			g2.draw(line);              
+			if (lineVisible) g2.draw(line);              
 			if (arrowheadVisible) g2.fill(gp);
                                               
             if (labelVisible) {
@@ -212,7 +227,7 @@ public class DrawVector extends Drawable implements Previewable {
 	final void drawTrace(Graphics2D g2) {
 		g2.setPaint(v.getObjectColor());
 		g2.setStroke(objStroke);  
-		g2.draw(line);  
+		if (lineVisible) g2.draw(line);  
 		if (arrowheadVisible) g2.fill(gp);       
 	}
     
@@ -270,7 +285,7 @@ public class DrawVector extends Drawable implements Previewable {
 			g2.setPaint(ConstructionDefaults.colPreview);
 			g2.setStroke(objStroke);  
 			if (arrowheadVisible) g2.fill(gp);                                    
-			g2.draw(line);                                    			      
+			if (lineVisible) g2.draw(line);                                    			      
 		}
 	}
 	
@@ -278,12 +293,11 @@ public class DrawVector extends Drawable implements Previewable {
 	}
     
 	final public boolean hit(int x,int y) {        
-        return isVisible && 
-        		(line.intersects(x-3, y-3, 6, 6) || gp.intersects(x-3, y-3, 6, 6));
+        return (lineVisible && line.intersects(x-3, y-3, 6, 6)) || (arrowheadVisible && gp.intersects(x-3, y-3, 6, 6));
     }
 	
 	final public boolean isInside(Rectangle rect) {  
-    	return isVisible && rect.contains(line.getBounds());   
+    	return (lineVisible && rect.contains(line.getBounds())) || (arrowheadVisible && rect.contains(gp.getBounds()));   
     }
 
     
@@ -301,7 +315,11 @@ public class DrawVector extends Drawable implements Previewable {
 	final public Rectangle getBounds() {		
 		if (!geo.isDefined() || !geo.isEuclidianVisible())
 			return null;
-		else 
-			return line.getBounds();	
+		Rectangle ret = null;
+		if (lineVisible) ret = line.getBounds();
+		
+		if (arrowheadVisible) ret = (ret == null) ? gp.getBounds() : ret.union(gp.getBounds());
+		
+		return ret;
 	}
 }
diff --git a/geogebra/euclidian/Drawable.java b/geogebra/euclidian/Drawable.java
index 5c140e5..a7bb480 100644
--- a/geogebra/euclidian/Drawable.java
+++ b/geogebra/euclidian/Drawable.java
@@ -59,6 +59,7 @@ public abstract class Drawable {
 	private boolean labelHasIndex = false;
 	Rectangle labelRectangle = new Rectangle(); // for label hit testing
 	Shape strokedShape, strokedShape2;
+
 	
 	private int lastFontSize = -1;
 	
diff --git a/geogebra/euclidian/EuclidianController.java b/geogebra/euclidian/EuclidianController.java
index a2c106b..b65b0bd 100644
--- a/geogebra/euclidian/EuclidianController.java
+++ b/geogebra/euclidian/EuclidianController.java
@@ -1011,6 +1011,15 @@ MouseMotionListener, MouseWheelListener, ComponentListener {
 		//  checkbox
 		else if (movedGeoElement.isGeoBoolean()) {
 			movedGeoBoolean = (GeoBoolean) movedGeoElement;
+			
+			// if fixed checkbox dragged, behave as if it's been clicked
+			// important for electronic whiteboards
+			if (movedGeoBoolean.isCheckboxFixed()) {
+				movedGeoBoolean.setValue(!movedGeoBoolean.getBoolean());
+				movedGeoBoolean.updateCascade();
+
+			} 
+			
 			// move checkbox
 			moveMode = MOVE_BOOLEAN;					
 			startLoc = mouseLoc;
@@ -1491,8 +1500,10 @@ MouseMotionListener, MouseWheelListener, ComponentListener {
 				GeoElement hit = (GeoElement)hits.get(0);
 				if (hit != null && hit.isGeoBoolean()) {
 					GeoBoolean bool = (GeoBoolean)(hits.get(0));
-					bool.setValue(!bool.getBoolean());
-					bool.updateCascade();
+					if (!bool.isCheckboxFixed()) { // otherwise changed on mouse down
+						bool.setValue(!bool.getBoolean());
+						bool.updateCascade();
+					}
 				}
 			}
 			}
@@ -2308,7 +2319,7 @@ MouseMotionListener, MouseWheelListener, ComponentListener {
 
 		if (movedGeoNumeric.animationIncrement > Kernel.MIN_PRECISION) {
 			// round to decimal fraction, e.g. 2.800000000001 to 2.8
-			val = kernel.checkDecimalFraction(val);
+			val = kernel.checkDecimalFraction(val, 1 / movedGeoNumeric.animationIncrement);
 		}
 
 		if (movedGeoNumeric.isGeoAngle()) {
@@ -2316,6 +2327,9 @@ MouseMotionListener, MouseWheelListener, ComponentListener {
 				val = 0;
 			else if (val > Kernel.PI_2)
 				val = Kernel.PI_2;
+			
+			val = kernel.checkDecimalFraction(val * Kernel.CONST_180_PI) / Kernel.CONST_180_PI;
+
 		}
 
 		// do not set value unless it really changed!
@@ -3883,7 +3897,7 @@ MouseMotionListener, MouseWheelListener, ComponentListener {
 			return false;
 
 		app.getGuiManager().showBooleanCheckboxCreationDialog(mouseLoc, null);
-		return true;
+		return false;
 	}
 
 	// get (point or line) and (conic or function or curve)
@@ -5342,7 +5356,7 @@ MouseMotionListener, MouseWheelListener, ComponentListener {
 		ToolTipManager ttm = ToolTipManager.sharedInstance();		
 		ttm.setEnabled(false);		
 		ListDialog dialog = new ListDialog(view, geos, null);
-		ret = dialog.showDialog(view, mouseLoc);			
+		if (app.areChooserPopupsEnabled()) ret = dialog.showDialog(view, mouseLoc);			
 		ttm.setEnabled(true);				
 		}
 		return ret;	
@@ -5423,12 +5437,12 @@ MouseMotionListener, MouseWheelListener, ComponentListener {
 		
 		double factor = event.getKeyCode() == KeyEvent.VK_MINUS ? 1d / EuclidianView.MOUSE_WHEEL_ZOOM_FACTOR
 				: EuclidianView.MOUSE_WHEEL_ZOOM_FACTOR;
-		// make zooming a little bit smoother by having some steps
 
 		// accelerated zoom
 		if (event.isAltDown())
-			factor *= 1.5;
+			factor *= event.getKeyCode() == KeyEvent.VK_MINUS ? 2d/3d: 1.5;
 
+		// make zooming a little bit smoother by having some steps
 		view.setAnimatedCoordSystem(
 				px + dx * factor,
 				py + dy * factor,
diff --git a/geogebra/euclidian/EuclidianView.java b/geogebra/euclidian/EuclidianView.java
index 248e837..d304656 100644
--- a/geogebra/euclidian/EuclidianView.java
+++ b/geogebra/euclidian/EuclidianView.java
@@ -132,6 +132,10 @@ public class EuclidianView extends JPanel implements View, Printable, EuclidianC
 				new Integer(LINE_TYPE_DASHED_DOTTED) };
 		return ret;
 	}
+		
+	// need to clip just outside the viewing area when drawing eg vectors
+	// as a near-horizontal thick vector isn't drawn correctly otherwise
+	public static final int CLIP_DISTANCE = 5;
 
 	public static final int AXES_LINE_TYPE_FULL = 0;
 
@@ -1664,8 +1668,11 @@ public class EuclidianView extends JPanel implements View, Printable, EuclidianC
 		if (showAxes[0] || showAxes[1])
 			drawAxes(g);
 
-		if (app.showResetIcon()) {
-			g.drawImage(getResetImage(), width - 18, 2, null);
+		if (app.showResetIcon() && app.isApplet()) {
+			// need to use getApplet().width rather than width so that
+			// it works with applet rescaling
+			int w = app.onlyGraphicsViewShowing() ? app.getApplet().width : width + 2;
+			g.drawImage(getResetImage(), w - 18, 2, null);
 		}
 	}		
 	
@@ -2125,7 +2132,7 @@ public class EuclidianView extends JPanel implements View, Printable, EuclidianC
 	}
 	
 	final boolean hitAnimationButton(MouseEvent e) {
-		return (e.getX() <= 20) && (e.getY() >= height - 20);		
+		return kernel.needToShowAnimationButton() && (e.getX() <= 20) && (e.getY() >= height - 20);		
 	}
 	
 	/**
@@ -3178,6 +3185,39 @@ public class EuclidianView extends JPanel implements View, Printable, EuclidianC
 		
 	}
 
+	/**
+	 * Zooms around fixed point (center of screen)
+	 */
+	public final void zoomAroundCenter(double zoomFactor) {
+		
+		// keep xmin, xmax, ymin, ymax constant, adjust everything else
+		
+		xscale *= zoomFactor;
+		yscale *= zoomFactor;
+		
+		scaleRatio = yscale / xscale;
+		invXscale = 1.0d / xscale;
+		invYscale = 1.0d / yscale;
+		
+		xZero = -xmin * xscale;
+		width = (int)(xmax * xscale + xZero);
+		yZero = ymax * yscale;
+		height = (int)(yZero - ymin * yscale);
+		
+		setAxesIntervals(xscale, 0);
+		setAxesIntervals(yscale, 1);
+		calcPrintingScale();
+		
+		// tell kernel
+		kernel.setEuclidianViewBounds(xmin, xmax, ymin, ymax, xscale, yscale);
+
+		coordTransform.setTransform(xscale, 0.0d, 0.0d, -yscale, xZero, yZero);
+
+		updateBackgroundImage();
+		updateAllDrawables(true);
+		
+	}
+
 	protected MyZoomer zoomer;
 
 	/**
diff --git a/geogebra/euclidian/GeneralPathClipped.java b/geogebra/euclidian/GeneralPathClipped.java
index a2a1f61..4e0a1fc 100644
--- a/geogebra/euclidian/GeneralPathClipped.java
+++ b/geogebra/euclidian/GeneralPathClipped.java
@@ -1,5 +1,7 @@
 package geogebra.euclidian;
 
+import geogebra.euclidian.clipping.ClipLine;
+
 import java.awt.Rectangle;
 import java.awt.Shape;
 import java.awt.geom.AffineTransform;
@@ -117,7 +119,7 @@ public class GeneralPathClipped implements Shape {
 		
 		// at least one point is not on screen: clip line at screen
 		Point2D.Double [] clippedPoints = 
-			Clipping.getClipped(prevP.x, prevP.y, curP.x, curP.y, -5, view.width+5, -5, view.height+5);
+			ClipLine.getClipped(prevP.x, prevP.y, curP.x, curP.y, -5, view.width+5, -5, view.height+5);
 
 		if (clippedPoints != null) {
 			// we have two intersection points with the screen
diff --git a/geogebra/euclidian/clipping/ClipLine.java b/geogebra/euclidian/clipping/ClipLine.java
new file mode 100644
index 0000000..f3d6586
--- /dev/null
+++ b/geogebra/euclidian/clipping/ClipLine.java
@@ -0,0 +1,355 @@
+package geogebra.euclidian.clipping;
+
+//============================================================================
+//File:               Clipping.java
+//
+//Project:            DXF Viewer and general purpose
+//
+//Purpose:            Workaround for Java 1.2/1.3 problem with line drawing
+//
+//Author:             Rammi
+//
+//Copyright Notice:   (c) 2000  Rammi (rammi at caff.de)
+//                  This source code is in the public domain. 
+//                  USE AT YOUR OWN RISK!
+//
+//Version History:   
+//                  Oct 27, 2000: First release
+//
+//                  May 17, 2010: Bug fix repairing incorrect results if 
+//                                lower corner is hit
+//=============================================================================
+
+//package de.caff.gimmicks;
+
+import java.awt.Graphics;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.geom.Point2D;
+
+/**
+*  Clipping of lines to the inside of a rectangle.
+*  This is useful as a workaround for Java bug id 4252578 (i.e. the
+*  JVM hangs when you try to draw a line with starting and/or end point
+*  a long distance outside the image area) which came in with JDK 1.2 and 
+*  is still there in JDK 1.3.
+*  It's also useful because all Java versions have problems with lines
+*  outside the image area which are sometimes drawn completely wrong.
+*  
+*  @author Rammi (rammi at caff.de)
+*/
+public class ClipLine {
+// some constants
+/** Flag for point lying left of clipping area. */
+public final static int LEFT     = 0x01;
+/** Flag for point lying between horizontal bounds of area. */
+public final static int H_CENTER = 0x02;
+/** Flag for point lying right of clipping area. */
+public final static int RIGHT    = 0x04;
+
+/** Flag for point lying &quot;below&quot; clipping area. */
+public final static int BELOW    = 0x10;
+/** Flag for point lying between vertical bounds of clipping area. */
+public final static int V_CENTER = 0x20;
+/** Flag for point lying &quot;above&quot; clipping area. */
+public final static int ABOVE    = 0x40;
+
+/** Mask for points which are inside. */
+public final static int INSIDE   = H_CENTER | V_CENTER;
+/** Mask for points which are outside. */
+public final static int OUTSIDE  = LEFT | RIGHT | BELOW | ABOVE;
+
+
+/**
+*  Calculate the clipping points of a line with a rectangle.
+*  @param  x1     starting x of line
+*  @param  y1     starting y of line
+*  @param  mask1  clipping info mask for starting point
+*  @param  x2     ending x of line
+*  @param  y2     ending y of line
+*  @param  mask2  clipping info mask for ending point
+*  @param  xmin   lower left x of rectangle
+*  @param  xmax   upper right x of rectangle
+*  @param  ymin   lower left y of rectangle
+*  @param  ymax   upper right y of rectangle
+*  @return <code>null</code> (does not clip) or array of two points
+*/
+public static Point2D.Double[] getClipped(double x1,   double y1, 
+					double x2,   double y2, 
+				   int xmin, int xmax,
+				   int ymin, int ymax)
+{
+ int mask1 = 0;		// position mask for first point
+ int mask2 = 0;		// position mask for second point
+
+ if (x1 < xmin) {
+   mask1 |= LEFT;
+ }
+ else if (x1 >= xmax) {
+   mask1 |= RIGHT;
+ }
+ else {
+   mask1 |= H_CENTER;
+ }
+ if (y1 < ymin) {
+   // btw: I know that in AWT y runs from down but I more used to
+   //      y pointing up and it makes no difference for the algorithms
+   mask1 |= BELOW;
+ }
+ else if (y1 >= ymax) {
+   mask1 |= ABOVE;
+ }
+ else {
+   mask1 |= V_CENTER;
+ }
+ if (x2 < xmin) {
+   mask2 |= LEFT;
+ }
+ else if (x2 >= xmax) {
+   mask2 |= RIGHT;
+ }
+ else {
+   mask2 |= H_CENTER;
+ }
+ if (y2 < ymin) {
+   mask2 |= BELOW;
+ }
+ else if (y2 >= ymax) {
+   mask2 |= ABOVE;
+ }
+ else {
+   mask2 |= V_CENTER;
+ }
+
+
+ int mask = mask1 | mask2;
+ 
+ if ((mask & OUTSIDE) == 0) {
+   // fine. everything's internal
+	 Point2D.Double[] ret = new Point2D.Double[2];
+   ret[0] = new Point2D.Double(x1, y1);
+   ret[1] = new Point2D.Double(x2, y2);
+   return ret;
+ }
+ else if ((mask & (H_CENTER|LEFT))  == 0  || // everything's right
+	     (mask & (H_CENTER|RIGHT)) == 0  || // everything's left
+	     (mask & (V_CENTER|BELOW)) == 0  || // everything's above
+	     (mask & (V_CENTER|ABOVE)) == 0) {  // everything's below
+   // nothing to do
+   return null;
+ }
+ else {
+   // need clipping
+   return getClipped(x1, y1, mask1, x2, y2, mask2,
+			xmin, xmax, ymin, ymax);
+ }
+}
+
+
+/**
+*  Calculate the clipping points of a line with a rectangle.
+*  @param  x1     starting x of line
+*  @param  y1     starting y of line
+*  @param  mask1  clipping info mask for starting point
+*  @param  x2     ending x of line
+*  @param  y2     ending y of line
+*  @param  mask2  clipping info mask for ending point
+*  @param  xmin   lower left x of rectangle
+*  @param  ymin   lower left y of rectangle
+*  @param  xmax   upper right x of rectangle
+*  @param  ymax   upper right y of rectangle
+*  @return <code>null</code> (does not clip) or array of two points
+*/
+protected static Point2D.Double[] getClipped(double x1, double y1, int mask1,
+				      double x2, double y2, int mask2,
+				      double xmin, double xmax,
+				      double ymin, double ymax)
+{
+ int mask = mask1 ^ mask2;
+ Point2D.Double p1 = null;
+
+ /*
+ System.out.println("mask1 = "+mask1);
+ System.out.println("mask2 = "+mask2);
+ System.out.println("mask = "+mask);
+ */
+
+ if (mask1 == INSIDE) {
+   // point 1 is internal
+   p1 = new Point2D.Double((x1+0.5), (y1+0.5));
+   if (mask == 0) {
+	// both masks are the same, so the second point is inside, too
+	   Point2D.Double[] ret = new Point2D.Double[2];
+	ret[0] = p1;
+	ret[1] = new Point2D.Double((x2+0.5), (y2+0.5));
+	return ret;
+   }
+ }
+ else if (mask2 == INSIDE) {
+   // point 2 is internal
+   p1 = new Point2D.Double((x2+0.5), (y2+0.5));
+ }
+ else if (mask == 0) {
+   // shortcut: no point is inside, but both are in the same sector, so no intersection is possible
+   return null;
+ }
+
+ if ((mask & LEFT) != 0) {
+   //      System.out.println("Trying left");
+   // try to calculate intersection with left line
+	 Point2D.Double p = intersect(x1, y1, x2, y2, xmin, ymin, xmin, ymax);
+   if (p != null) {
+	if (p1 == null) {
+	  p1 = p;
+	}
+	else {
+		Point2D.Double[] ret = new Point2D.Double[2];
+	  ret[0] = p1;
+	  ret[1] = p;
+	  return ret;
+	}
+   }
+ }
+ if ((mask & RIGHT) != 0) {
+   //      System.out.println("Trying right");
+   // try to calculate intersection with right line
+	 Point2D.Double p = intersect(x1, y1, x2, y2, xmax, ymin, xmax, ymax);
+   if (p != null) {
+	if (p1 == null) {
+	  p1 = p;
+	}
+	else {
+		Point2D.Double[] ret = new Point2D.Double[2];
+	  ret[0] = p1;
+	  ret[1] = p;
+	  return ret;
+	}
+   }
+ }
+ if (p1 != null  &&  p1.y == (ymin + 0.5)) {
+   // use different sequence if a lower corner of clipping rectangle is hit
+
+   if ((mask & ABOVE) != 0) {
+	//      System.out.println("Trying top");
+	// try to calculate intersection with upper line
+	   Point2D.Double p = intersect(x1, y1, x2, y2, xmin, ymax, xmax, ymax);
+	if (p != null) {
+		Point2D.Double[] ret = new Point2D.Double[2];
+       ret[0] = p1;
+       ret[1] = p;
+       return ret;
+	}
+   }
+   if ((mask & BELOW) != 0) {
+	//      System.out.println("Trying bottom");
+	// try to calculate intersection with lower line
+	   Point2D.Double p = intersect(x1, y1, x2, y2, xmin, ymin, xmax, ymin);
+	if (p != null) {
+		Point2D.Double[] ret = new Point2D.Double[2];
+       ret[0] = p1;
+       ret[1] = p;
+       return ret;
+	}
+   }
+ }
+ else {
+   if ((mask & BELOW) != 0) {
+	//      System.out.println("Trying bottom");
+	// try to calculate intersection with lower line
+	   Point2D.Double p = intersect(x1, y1, x2, y2, xmin, ymin, xmax, ymin);
+	if (p != null) {
+	  if (p1 == null) {
+	    p1 = p;
+	  }
+	  else {
+		  Point2D.Double[] ret = new Point2D.Double[2];
+	    ret[0] = p1;
+	    ret[1] = p;
+	    return ret;
+	  }
+	}
+   }
+   if ((mask & ABOVE) != 0) {
+	//      System.out.println("Trying top");
+	// try to calculate intersection with upper line
+	   Point2D.Double p = intersect(x1, y1, x2, y2, xmin, ymax, xmax, ymax);
+	if (p != null) {
+	  if (p1 == null) {
+	    p1 = p;
+	  }
+	  else {
+		  Point2D.Double[] ret = new Point2D.Double[2];
+	    ret[0] = p1;
+	    ret[1] = p;
+	    return ret;
+	  }
+	}
+   }
+ }
+
+ // no (or not enough) intersections found
+ return null;
+}
+
+/**
+*  Intersect two lines.
+*  @param  x11  starting x of 1st line
+*  @param  y11  starting y of 1st line
+*  @param  x12  ending x of 1st line
+*  @param  y12  ending y of 1st line
+*  @param  x21  starting x of 2nd line
+*  @param  y21  starting y of 2nd line
+*  @param  x22  ending x of 2nd line
+*  @param  y22  ending y of 2nd line
+*  @return intersection point or <code>null</code>
+*/
+private static Point2D.Double intersect(double x11, double y11,
+				 double x12, double y12,
+				 double x21, double y21,
+				 double x22, double y22)
+{
+ double dx1 = x12 - x11;
+ double dy1 = y12 - y11;
+ double dx2 = x22 - x21;
+ double dy2 = y22 - y21;
+ double det = (dx2*dy1-dy2*dx1);
+
+ /*    
+ System.out.println("intersect");
+ System.out.println("x1  = "+x11);
+ System.out.println("y1  = "+y11);
+ System.out.println("x2  = "+x21);
+ System.out.println("y2  = "+y21);
+ System.out.println("dx1 = "+dx1);
+ System.out.println("dy1 = "+dy1);
+ System.out.println("dx2 = "+dx2);
+ System.out.println("dy2 = "+dy2);
+ */
+
+ if (det != 0.0) {
+   double mu = ((x11 - x21)*dy1 - (y11 - y21)*dx1)/det;
+   //      System.out.println("mu = "+mu);
+   if (mu >= 0.0  &&  mu <= 1.0) {
+	   Point2D.Double p = new Point2D.Double((x21 + mu*dx2 + 0.5),
+			    (y21 + mu*dy2 + 0.5));
+	//	System.out.println("p = "+p);
+	return p;
+   }
+ }
+ 
+ return null;
+}
+
+
+}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/geogebra/euclidian/clipping/ClipShape.java b/geogebra/euclidian/clipping/ClipShape.java
new file mode 100644
index 0000000..2e175a2
--- /dev/null
+++ b/geogebra/euclidian/clipping/ClipShape.java
@@ -0,0 +1,536 @@
+/*
+ * @(#)Clipper.java
+ *
+ * $Date: 2010-03-19 18:53:03 -0500 (Fri, 19 Mar 2010) $
+ *
+ * Copyright (c) 2009 by Jeremy Wood.
+ * All rights reserved.
+ *
+ * The copyright of this software is owned by Jeremy Wood. 
+ * You may not use, copy or modify this software, except in  
+ * accordance with the license agreement you entered into with  
+ * Jeremy Wood. For details see accompanying license terms:
+ * BSD License
+ * 
+ * This software is probably, but not necessarily, discussed here:
+ * http://javagraphics.blogspot.com/
+ * 
+ * And the latest version should be available here:
+ * https://javagraphics.dev.java.net/
+ */
+
+package geogebra.euclidian.clipping;
+
+
+import java.awt.Graphics2D;
+import java.awt.Shape;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.CubicCurve2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.PathIterator;
+import java.awt.geom.Rectangle2D;
+import java.util.Arrays;
+import java.util.Stack;
+
+
+/** This class lets you clip/intersect an arbitrary shape to a Rectangle2D.
+ *
+ */
+public class ClipShape {
+	
+	private static final DoubleArrayFactory doubleFactory = new DoubleArrayFactory();
+	
+	/** This is the tolerance with which 2 numbers must
+	 * be similar to be considered "equal".
+	 * <P>This is necessary because as we much around with numbers
+	 * and equations, machine rounding will inevitably cause .5's
+	 * to become .49999's and other harmless changes.
+	 */
+	private static final double TOLERANCE = 1E-10;
+	
+	/** This does 2 things:
+	 * 1.  It collapses redundant line segments that fall on the same horizontal
+	 * or vertical line.  This is very important, given how clipToRect() works.
+	 * And not only does it vastly simplify
+	 * your shape (lots of redundant lineTo's will be called), but if a shape
+	 * is properly collapsed it has a much better chance of return a truly
+	 * accurate result when you call getBounds() on it.
+	 * <P>Note that there are still some far fetched examples (involving discontinous
+	 * shapes) where getBounds() may be inaccurate, though.
+	 * 2.  This can take a Function (either quadratic or cubic) and split it over
+	 * a smaller interval from an arbitary [t0,t1].
+	 */
+	static class ClippedPath {
+		public final GeneralPath g;
+		private Stack uncommittedPoints = new Stack();
+		private double initialX, initialY;
+		
+		public ClippedPath(int windingRule) {
+			g = new GeneralPath(windingRule);
+		}
+		
+		public void moveTo(double x,double y) {
+			flush();
+			g.moveTo((float)x,(float)y);
+			initialX = x;
+			initialY = y;
+		}
+		
+		/** This makes a cubic curve to based on xf and yf that ranges from
+		 * [t0,t1].  So this takes a little subset of the curves if [t0,t1]
+		 * is smaller than [0,1].
+		 */
+		public void curveTo(Function xf,Function yf,double t0,double t1) {
+			flush(); //flush out lines
+
+			double dt = (t1-t0);
+			//I know I'm not explaining the math here, but you can derive
+			//it with a little time and a few sheets of paper.  The API for
+			//the PathIterator shows the equations relating to bezier parametric
+			//curves.  From there you can calculate whatever you need:
+			//it just might take a few pages of pen & paper.
+			double dx0 = xf.getDerivative(t0)*dt;
+			double dx1 = xf.getDerivative(t1)*dt;
+			double dy0 = yf.getDerivative(t0)*dt;
+			double dy1 = yf.getDerivative(t1)*dt;
+			double x0 = xf.evaluate(t0);
+			double x1 = xf.evaluate(t1);
+			double y0 = yf.evaluate(t0);
+			double y1 = yf.evaluate(t1);
+
+			g.curveTo(
+					(float)(x0+dx0/3),
+					(float)(y0+dy0/3),
+					(float)(x1-dx1/3),
+					(float)(y1-dy1/3),
+					(float)(x1),
+					(float)(y1) );
+		}
+		
+		/** Adds a line to (x,y)
+		 * <P>This method doesn't actually commit a line until it's sure
+		 * that it isn't writing heavily redundant lines.  That is the
+		 * points (0,0), (5,0) and (2,0) would be consolidated so only
+		 * the first and last point remained.
+		 * <P>However only horizontal/vertical lines are consolidated,
+		 * because this method is aimed at clipping to (non-rotated) rectangles.
+		 */
+		public void lineTo(double x,double y) {
+			
+			if(uncommittedPoints.size()>0) {
+				double[] last = (double[])uncommittedPoints.peek();
+				//are we adding the same point?
+				if(Math.abs(last[0]-x)<TOLERANCE && Math.abs(last[1]-y)<TOLERANCE)
+					return;
+			}
+			
+			
+			double[] f = doubleFactory.getArray(2);
+			f[0] = x;
+			f[1] = y;
+			uncommittedPoints.push(f);
+		}
+		
+		public void closePath() {
+			lineTo(initialX,initialY);
+			flush();
+			g.closePath();
+		}
+		
+		/** Flush out the stack of uncommitted points. */
+		public void flush() {
+			while(uncommittedPoints.size()>0) {
+				identifyLines : while(uncommittedPoints.size()>=3) {
+					double[] first = (double[])uncommittedPoints.get(0);
+					double[] middle = (double[])uncommittedPoints.get(1);
+					double[] last = (double[])uncommittedPoints.get(2);
+					
+					if(Math.abs(first[0]-middle[0])<TOLERANCE && Math.abs(first[0]-last[0])<TOLERANCE) {
+						//everything has the same x, so we have a vertical line
+						double[] array = (double[])uncommittedPoints.remove(1);
+						doubleFactory.putArray(array);
+					} else if(Math.abs(first[1]-middle[1])<TOLERANCE && Math.abs(first[1]-last[1])<TOLERANCE) {
+						//everything has the same y, so we have a horizontal line
+						double[] array = (double[])uncommittedPoints.remove(1);
+						doubleFactory.putArray(array);
+					} else {
+						break identifyLines;
+					}
+				}
+			
+				double[] point = (double[])uncommittedPoints.remove(0);
+				g.lineTo( (float)point[0], (float)point[1]);
+				doubleFactory.putArray(point);
+			}
+		}
+	}
+	
+	/** A function used to describe one of the 2 parametric equations
+	 * for a segment of a path.  This can be thought of is f(t).
+	 */
+	static interface Function {
+		/** evaluates this function at a given value */
+		public double evaluate(double t);
+		
+		/** Calculates all the t-values which will yield the result "f"
+		 * in this function.
+		 * 
+		 * @param f the function result you're searching for
+		 * @param dest the array the results will be stored in
+		 * @param destOffset the offset at which data will be added to
+		 * the array
+		 * @return the number of solutions found.
+		 */
+		public int evaluateInverse(double f,double[] dest,int destOffset);
+		  
+		/** Return the derivative (df/dt) for a given value of t */
+		public double getDerivative(double t);
+	}
+	
+	/** A linear function */
+	static class LFunction implements Function {
+		double slope, intercept;
+		public LFunction() {}
+
+		/** Defines this linear function.
+		 * 
+		 * @param x1 at t = 0, x1 is the output of this function
+		 * @param x2 at t = 1, x2 is the output of this function
+		 */
+		public void define(double x1,double x2) {
+			slope = (x2-x1);
+			intercept = x1;
+		}
+		
+		public String toString() {
+			return slope+"*t+"+intercept;
+		}
+		
+		public double evaluate(double t) {
+			return slope*t+intercept;
+		}
+		
+		public int evaluateInverse(double x,double[] dest,int offset) {
+			dest[offset] = (x-intercept)/slope;
+			return 1;
+		}
+		
+		public double getDerivative(double t) {
+			return slope;
+		}
+	}
+	
+	/** A quadratic function */
+	static class QFunction implements Function {
+		double a, b, c;
+		
+		public QFunction() {}
+		
+		public String toString() {
+			return a+"*t*t+"+b+"*t+"+c;
+		}
+
+		/** Use the 3 control points of a bezier quadratic
+		 */
+		public void define(double x0, double x1, double x2) {
+			a = x0-2*x1+x2;
+			b = -2*x0+2*x1;
+			c = x0;
+		}
+		
+		public double evaluate(double t) {
+			return a*t*t+b*t+c;
+		}
+		
+		public double getDerivative(double t) {
+			return 2*a*t+b;
+		}
+		
+		public int evaluateInverse(double x,double[] dest,int offset) {
+			double C = c-x;
+			double det = b*b-4*a*C;
+			if(det<0)
+				return 0;
+			if(det==0) {
+				dest[offset] = (-b)/(2*a);
+				return 1;
+			}
+			det = Math.sqrt(det);
+			dest[offset++] = (-b+det)/(2*a);
+			dest[offset++] = (-b-det)/(2*a);
+			return 2;
+		}
+	}
+	
+	/** A cubic function */
+	static class CFunction implements Function {
+		double a, b, c, d;
+		
+		public CFunction() {}
+		
+		public String toString() {
+			return a+"*t*t*t+"+b+"*t*t+"+c+"*t+"+d;
+		}
+
+		public void define(double x0,double x1, double x2,double x3) {
+			a = -x0+3*x1-3*x2+x3;
+			b = 3*x0-6*x1+3*x2;
+			c = -3*x0+3*x1;
+			d = x0;
+		}
+		
+		public double evaluate(double t) {
+			return a*t*t*t+b*t*t+c*t+d;
+		}
+		
+		public double getDerivative(double t) {
+			return 3*a*t*t+2*b*t+c;
+		}
+		
+		/** Recycle arrays here.
+		 * Remember this is possibly going to be 1
+		 * object called hundreds of times, so reusing
+		 * the same arrays here will save us time &
+		 * memory allocation.  In current setup there
+		 * is only 1 thread that will be using these
+		 * values.
+		 */
+		double[] t2;
+		double[] eqn;
+		public int evaluateInverse(double x,double[] dest,int offset) {
+			if(eqn==null)
+				eqn = new double[4];
+			eqn[0] = d-x;
+			eqn[1] = c;
+			eqn[2] = b;
+			eqn[3] = a;
+			if(offset==0) {
+				int k = CubicCurve2D.solveCubic(eqn,dest);
+				if(k<0) return 0;
+				return k;
+			}
+			if(t2==null)
+				t2 = new double[3];
+			int k = CubicCurve2D.solveCubic(eqn,t2);
+			if(k<0) return 0;
+			for(int i = 0; i<k; i++) {
+				dest[offset+i] = t2[i];
+			}
+			return k;
+		}
+	}
+	
+	/** This creates a <code>GeneralPath</code> representing <code>s</code> when
+	 * clipped to <code>r</code>
+	 * @param s a shape that you want clipped
+	 * @param r the rectangle to clip it to
+	 * @return a <code>GeneralPath</code> enclosing the new shape.
+	 */
+	public static GeneralPath clipToRect(Shape s,Rectangle2D r) {
+		return clipToRect(s,null,r);
+	}
+
+	/** This creates a <code>GeneralPath</code> representing <code>s</code> when
+	 * clipped to <code>r</code>
+	 * @param s a shape that you want clipped
+	 * @param t the transform to transform <code>s</code> by.
+	 * <P>This may be <code>null</code>, indicating that <code>s</code> should
+	 * not be transformed.
+	 * @param r the rectangle to clip to
+	 * @return a <code>GeneralPath</code> enclosing the new shape.
+	 */
+	public static GeneralPath clipToRect(Shape s,AffineTransform t,Rectangle2D r) {
+		PathIterator i = s.getPathIterator(t);
+		ClippedPath p = new ClippedPath(i.getWindingRule());
+		double initialX = 0;
+		double initialY = 0;
+		int k;
+		double[] f = doubleFactory.getArray(6);
+		double rTop = (double)r.getY();
+		double rLeft = (double)r.getX();
+		double rRight = (double)(r.getX()+r.getWidth());
+		double rBottom = (double)(r.getY()+r.getHeight());
+		boolean shouldClose = false;
+		double lastX = 0;
+		double lastY = 0;
+		boolean lastValueWasCapped, thisValueIsCapped, midValueInvalid;
+		double cappedX, cappedY, x, y, x2, y2;
+		
+		//create 1 copy of all our possible functions,
+		//and recycle these objects constantly
+		//this way we avoid memory allocation:
+		LFunction lxf = new LFunction();
+		LFunction lyf = new LFunction();
+		QFunction qxf = new QFunction();
+		QFunction qyf = new QFunction();
+		CFunction cxf = new CFunction();
+		CFunction cyf = new CFunction();
+		Function xf = null;
+		Function yf = null;
+		double[] interestingTimes = new double[16];
+		int tCtr;
+		
+		while(i.isDone()==false) {
+			k = i.currentSegment(f);
+			if(k==PathIterator.SEG_MOVETO) {
+				initialX = f[0];
+				initialY = f[1];
+				cappedX = f[0];
+				cappedY = f[1];
+				if(cappedX<rLeft)
+					cappedX = rLeft;
+				if(cappedX>rRight)
+					cappedX = rRight;
+				if(cappedY<rTop)
+					cappedY = rTop;
+				if(cappedY>rBottom)
+					cappedY = rBottom;
+				p.moveTo(cappedX,cappedY);
+				lastX = f[0];
+				lastY = f[1];
+			} else if(k==PathIterator.SEG_CLOSE) {
+				f[0] = initialX;
+				f[1] = initialY;
+				k = PathIterator.SEG_LINETO;
+				shouldClose = true;
+			}
+			xf = null;
+			if(k==PathIterator.SEG_LINETO) {
+				lxf.define(lastX,f[0]);
+				lyf.define(lastY,f[1]);
+				
+				xf = lxf;
+				yf = lyf;
+			} else if(k==PathIterator.SEG_QUADTO) {
+				qxf.define(lastX,f[0],f[2]);
+				qyf.define(lastY,f[1],f[3]);
+				
+				xf = qxf;
+				yf = qyf;
+			} else if(k==PathIterator.SEG_CUBICTO) {
+				cxf.define(lastX,f[0],f[2],f[4]);
+				cyf.define(lastY,f[1],f[3],f[5]);
+				
+				xf = cxf;
+				yf = cyf;
+			}
+			if(xf!=null) {
+				//gather all the t values at which we might be
+				//crossing the bounds of our rectangle:
+				
+				tCtr = 0;
+				
+				tCtr += xf.evaluateInverse(rLeft,interestingTimes,tCtr);
+				tCtr += xf.evaluateInverse(rRight,interestingTimes,tCtr);
+				tCtr += yf.evaluateInverse(rTop,interestingTimes,tCtr);
+				tCtr += yf.evaluateInverse(rBottom,interestingTimes,tCtr);
+				interestingTimes[tCtr++] = 1;
+				 //we never actually calculate with 0, but we need to know it's in the list
+				interestingTimes[tCtr++] = 0;
+				
+				//put them in ascending order:
+				Arrays.sort(interestingTimes,0,tCtr);
+				
+				lastValueWasCapped = !(lastX>=rLeft && lastX<=rRight && lastY>=rTop && lastY<=rBottom);
+				
+				for(int a = 0; a<tCtr; a++) {
+					if(a>0 && interestingTimes[a]==interestingTimes[a-1]) {
+						//do nothing
+					} else if(interestingTimes[a]>0 && interestingTimes[a]<=1) {
+						//this is the magic: take 2 t values and see what we need to
+						//do with them.
+						//Remember we can make redundant horizontal/vertical lines
+						//all we want to because the ClippedPath will clean up
+						//the mess.
+						x = (double)xf.evaluate(interestingTimes[a]);
+						y = (double)yf.evaluate(interestingTimes[a]);
+						cappedX = x;
+						cappedY = y;
+						
+						if(cappedX<rLeft) {
+							cappedX = rLeft;
+						} else if(cappedX>rRight) {
+							cappedX = rRight;
+						}
+						if(cappedY<rTop) {
+							cappedY = rTop;
+						} else if(cappedY>rBottom) {
+							cappedY = rBottom;
+						}
+						
+						thisValueIsCapped = !(Math.abs(x-cappedX)<TOLERANCE && Math.abs(y-cappedY)<TOLERANCE);
+						
+						x2 = (double)xf.evaluate((interestingTimes[a]+interestingTimes[a-1])/2);
+						y2 = (double)yf.evaluate((interestingTimes[a]+interestingTimes[a-1])/2);
+						midValueInvalid = !(rLeft<=x2 && x2<=rRight && rTop<=y2 && y2<=rBottom);
+							
+						if(( xf instanceof LFunction) || thisValueIsCapped || lastValueWasCapped || midValueInvalid ) {
+							p.lineTo(cappedX,cappedY);
+						} else if((xf instanceof QFunction) || (xf instanceof CFunction)) {
+							p.curveTo(xf,yf,interestingTimes[a-1],interestingTimes[a]);
+						} else {
+							throw new RuntimeException("Unexpected condition.");
+						}
+						
+						lastValueWasCapped = thisValueIsCapped;
+					}
+				}
+				lastX = (double)xf.evaluate(1);
+				lastY = (double)yf.evaluate(1);
+			}
+			if(shouldClose) {
+				p.closePath();
+				shouldClose = false;
+			}
+			i.next();
+		}
+		p.flush();
+		doubleFactory.putArray(f);
+		return p.g;
+	}
+
+	/** By default if a Graphics2D is asked to clip to a new shape,
+	 * it may resort to Area objects if either the current clipping
+	 * and the new clipping are not rectangles.
+	 * <P>This method with offer a slight improvement over this model:
+	 * if <i>either</i> the old clip or the new clip is a rectangle,
+	 * then this uses the <code>Clipper.clipToRect()</code> method.
+	 * This avoids the slow-but-accurate Area class.
+	 * <P>This should only be used to replace <code>Graphics2D.clip()</code>,
+	 * not <code>Graphics2D.setClip()</code>.
+	 * @param g the graphics2D to clip to
+	 * @param newClip the new clip
+	 */
+	public static void clip(Graphics2D g,Shape newClip) {
+		Shape oldClip = g.getClip();
+		if(oldClip==null) {
+			g.setClip(newClip);
+			return;
+		}
+		Rectangle2D oldRect = null;
+		Rectangle2D newRect = null;
+		if(oldClip instanceof Rectangle2D) {
+			oldRect = (Rectangle2D)oldClip;
+		}
+		if(newClip instanceof Rectangle2D) {
+			newRect = (Rectangle2D)newClip;
+		}
+		
+		if(oldRect!=null && newRect!=null) {
+			g.setClip(oldRect.createIntersection(newRect));
+			return;
+		}
+		
+		if(newRect!=null && oldRect==null) {
+			g.setClip( ClipShape.clipToRect(oldClip, newRect));
+			return;
+		}
+		
+		if(newRect==null && oldRect!=null) {
+			g.setClip( ClipShape.clipToRect(newClip, oldRect));
+			return;
+		}
+
+		g.clip(newClip);
+	}
+}
diff --git a/geogebra/euclidian/clipping/DoubleArrayFactory.java b/geogebra/euclidian/clipping/DoubleArrayFactory.java
new file mode 100644
index 0000000..ff0bf83
--- /dev/null
+++ b/geogebra/euclidian/clipping/DoubleArrayFactory.java
@@ -0,0 +1,115 @@
+/*
+ * @(#)doubleArrayFactory.java
+ *
+ * $Date: 2009-06-13 17:18:17 -0500 (Sat, 13 Jun 2009) $
+ *
+ * Copyright (c) 2009 by Jeremy Wood.
+ * All rights reserved.
+ *
+ * The copyright of this software is owned by Jeremy Wood. 
+ * You may not use, copy or modify this software, except in  
+ * accordance with the license agreement you entered into with  
+ * Jeremy Wood. For details see accompanying license terms.
+ * 
+ * This software is probably, but not necessarily, discussed here:
+ * http://javagraphics.blogspot.com/
+ * 
+ * And the latest version should be available here:
+ * https://javagraphics.dev.java.net/
+ */
+package geogebra.euclidian.clipping;
+
+import java.lang.reflect.Constructor;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Stack;
+
+/** This is a mechanism to recycle arrays.
+ * <P>Creating arrays in a heavy, fast-paced loop
+ * ends up being very expensive.  This stores
+ * arrays and returns them on demand.
+ * <P>This factory stores these arrays with
+ * strong references, so this class should only
+ * really be used when the possible array sizes
+ * are limited and the usage is predictable.
+ *
+ */
+public class DoubleArrayFactory {
+	private static DoubleArrayFactory globalFactory;
+	
+	public static DoubleArrayFactory getStaticFactory() {
+		if(globalFactory==null)
+			globalFactory = new DoubleArrayFactory();
+		return globalFactory;
+	}
+	
+	private Map map = createMap();
+	
+	private static Map createMap() {
+		try {
+			//break this up into two strings for the JarWriter
+			//If the whole name is listed, then the JarWriter
+			//will bundle the trove jar automatically...
+			Class troveMap = Class.forName("gnu."+"trove.THashMap");
+			Constructor[] constructors = troveMap.getConstructors();
+			for(int a = 0; a<constructors.length; a++) {
+				if(constructors[a].getParameterTypes().length==0)
+					return (Map)constructors[a].newInstance(new Object[] {});
+			}
+		} catch(Throwable e) {
+			//in addition to the expected exceptions, consider
+			//UnsupportedClassVersionErrors, and other weirdnesses.
+		}
+		
+		return new Hashtable();
+	}
+	
+	private MutableInteger key = new MutableInteger(0);
+	
+	/** Returns a double array of the indicated size.
+	 * <P>If arrays of that size have previously been
+	 * stored in this factory, then an existing array
+	 * will be returned.
+	 * @param size the array size you need.
+	 * @return a double array of the size indicated.
+	 */
+	public double[] getArray(int size) {
+		Stack stack;
+		synchronized(key) {
+			key.value = size;
+			stack = (Stack)map.get(key);
+			if(stack==null) {
+				stack = new Stack();
+				map.put(new MutableInteger(size),stack);
+			}
+		}
+		if(stack.size()==0) {
+			return new double[size];
+		}
+		return (double[])stack.pop();
+	}
+	
+	/** Stores an array for future use.
+	 * <P>As soon as you call this method you should nullify
+	 * all other references to the argument.  If you continue
+	 * to use it, and someone else retrieves this array
+	 * by calling <code>getArray()</code>, then you may have
+	 * two entities using the same array to manipulate data...
+	 * and that can be really hard to debug!
+	 * 
+	 * @param array the array you no longer need that might be
+	 * needed later.
+	 */
+	public void putArray(double[] array) {
+		Stack stack;
+		synchronized(key) {
+			key.value = array.length;
+			stack = (Stack)map.get(key);
+			if(stack==null) {
+				stack = new Stack();
+				map.put(new MutableInteger(array.length),stack);
+			}
+		}
+		stack.push(array);
+	}
+}
diff --git a/geogebra/euclidian/clipping/MutableInteger.java b/geogebra/euclidian/clipping/MutableInteger.java
new file mode 100644
index 0000000..1d1837c
--- /dev/null
+++ b/geogebra/euclidian/clipping/MutableInteger.java
@@ -0,0 +1,75 @@
+/*
+ * @(#)MutableInteger.java
+ *
+ * $Date: 2010-01-03 07:17:54 -0600 (Sun, 03 Jan 2010) $
+ *
+ * Copyright (c) 2009 by Jeremy Wood.
+ * All rights reserved.
+ *
+ * The copyright of this software is owned by Jeremy Wood. 
+ * You may not use, copy or modify this software, except in  
+ * accordance with the license agreement you entered into with  
+ * Jeremy Wood. For details see accompanying license terms.
+ * 
+ * This software is probably, but not necessarily, discussed here:
+ * http://javagraphics.blogspot.com/
+ * 
+ * And the latest version should be available here:
+ * https://javagraphics.dev.java.net/
+ */
+
+package geogebra.euclidian.clipping;
+
+/** Similar to <code>java.lang.Integer</code>, except this object
+ * is mutable.
+ * <P>This can be very handy when you want to use integers
+ * as keys in a Hashtable: constantly creating new integer wrappers is very
+ * wasteful, but if you create 1 mutable integer wrapper and change its
+ * value every time you need it (in a safe synchronized environment) this
+ * can really save a lot of memory allocation.  In same instances.
+ *
+ */
+public class MutableInteger extends Number {
+	private static final long serialVersionUID = 1L;
+	
+	public int value = 0;
+	
+	public MutableInteger(int value) {
+		this.value = value;
+	}
+
+	public double doubleValue() {
+		return value;
+	}
+
+	public float floatValue() {
+		return value;
+	}
+
+	public int intValue() {
+		return value;
+	}
+
+	public long longValue() {
+		return value;
+	}
+	
+	public int hashCode() {
+		return value;
+	}
+	
+	public String toString() {
+		return Integer.toString(value);
+	}
+
+	public boolean equals(Object obj) {
+		if(obj==this) return true;
+		if(obj instanceof MutableInteger) {
+			return ((MutableInteger)obj).value==value;
+		}
+		if(obj instanceof Number) {
+			return ((Number)obj).intValue()==value;
+		}
+		return false;
+	}
+}
diff --git a/geogebra/export/WorksheetExportDialog.java b/geogebra/export/WorksheetExportDialog.java
index 2c2f36b..e7119c4 100644
--- a/geogebra/export/WorksheetExportDialog.java
+++ b/geogebra/export/WorksheetExportDialog.java
@@ -446,7 +446,7 @@ public class WorksheetExportDialog extends JDialog {
 		
 		// right column
 		// save, print
-		cbSavePrint = new JCheckBox(app.getMenu("Save") + ", " + app.getMenu("Print"));
+		cbSavePrint = new JCheckBox(app.getMenu("Save") + ", " + app.getMenu("Print") + ", " + app.getMenu("Undo"));
 		guiPanelEast.add(cbSavePrint);
 		// showToolBarHelp				
 		cbShowToolBarHelp = new JCheckBox(app.getMenu("ShowToolBarHelp"));
@@ -812,34 +812,13 @@ public class WorksheetExportDialog extends JDialog {
 		sb.append("\" author_email=\"xxx at google.com\" ");
 		sb.append("description=\"GeoGebra applet as a Google-Site gadget\" thumbnail=\"http://www.geogebra.org/static/images/geogebra_logo67x60.png\">\n");
 		sb.append("</ModulePrefs>\n");
+		
 		sb.append("<Content type=\"html\">\n");
 		sb.append("<![CDATA[\n");
-		sb.append("<script src=\"http://java.com/js/deployJava.js\">\n");
-		sb.append("</script>\n");
 		sb.append("<div id='ggbapplet'>\n");
-		sb.append("<script>\n");
-		sb.append("var jarUrl = \"geogebra.jar\";\n");
-		//sb.append("var cachedJarUrl = _IG_GetCachedUrl(jarUrl);\n");
-
 		
-		sb.append("deployJava.runApplet({archive:jarUrl, name:\"ggbApplet\", code:\"geogebra.GeoGebraApplet\", codebase:\"");
-		sb.append(GeoGebra.GEOGEBRA_ONLINE_ARCHIVE_BASE);
-		sb.append("unsigned/");
-		sb.append("\", width:\"");
-		sb.append(sizePanel.getSelectedWidth());
-		sb.append("\", height:\"");
-		sb.append(sizePanel.getSelectedHeight());
-		sb.append("\",\n");
-		//sb.append("filename:\"xxx.ggb\",");
-		sb.append("ggbBase64:\"");
-		appendBase64(sb);
-		sb.append("\",\n");
-		//sb.append("java_arguments:\"-Xmx256m\", framePossible:\"true\", showResetIcon:\"true\", showAnimationButton:\"true\", enableRightClick:\"false\", enableLabelDrags:\"true\", showMenuBar:\"false\", showToolBar:\"false\", showToolBarHelp:\"false\", showAlgebraInput:\"false\"});\n");
-		appendGgbAppletParameters(sb, TYPE_GOOGLEGADGET);			
-		sb.setLength(sb.lastIndexOf(",")); // remove last comma
-		sb.append("});\n");
+		sb.append(getAppletTag(null, sizePanel.getSelectedWidth(), sizePanel.getSelectedHeight()));
 
-		sb.append("</script>\n");
 		sb.append("</div>\n");
 		sb.append("]]>\n");
 		sb.append("</Content>\n");
@@ -848,7 +827,7 @@ public class WorksheetExportDialog extends JDialog {
 		return sb.toString();
 		
 	}
-
+	
 	/**
 	 * Returns a html page with the applet included
 	 * 
@@ -995,9 +974,9 @@ public class WorksheetExportDialog extends JDialog {
 		sb.append("\" height=\"");
 		sb.append(height);
 		// add MAYSCRIPT to ensure ggbOnInit() can be called
-		sb.append("\" MAYSCRIPT>\n");
+		sb.append("\" mayscript=\"true\">\n");
 
-		if (cbOfflineArchiveAndGgbFile.isSelected()) {
+		if (cbOfflineArchiveAndGgbFile.isSelected() && ggbFile != null) {
 			// ggb file
 			sb.append("\t<param name=\"filename\" value=\"");
 			sb.append(ggbFile.getName());
@@ -1102,6 +1081,9 @@ public class WorksheetExportDialog extends JDialog {
 		// showAlgebraInput
 		appletParam(sb, "showAlgebraInput", cbShowInputField.isSelected(), type);
 		
+		// allowRescaling
+		appletParam(sb, "allowRescaling", true, type);
+		
 	}
 	
 	StringBuffer sb2 = new StringBuffer();
diff --git a/geogebra/export/pstricks/GeoGebraExport.java b/geogebra/export/pstricks/GeoGebraExport.java
index fe857de..05cb7a4 100644
--- a/geogebra/export/pstricks/GeoGebraExport.java
+++ b/geogebra/export/pstricks/GeoGebraExport.java
@@ -35,6 +35,7 @@ import geogebra.kernel.GeoText;
 import geogebra.kernel.GeoVec2D;
 import geogebra.kernel.GeoVector;
 import geogebra.kernel.Kernel;
+import geogebra.kernel.arithmetic.ExpressionNode;
 import geogebra.main.Application;
 
 import java.awt.Color;
@@ -141,6 +142,7 @@ public abstract class GeoGebraExport implements ActionListener{
 	public void actionPerformed(ActionEvent e){
 		isBeamer=frame.isBeamer();
 		generateAllCode();
+
 	}
 	/**
 	 * 	This method	converts a double with engineering notation to decimal<br>
diff --git a/geogebra/export/pstricks/GeoGebraToPgf.java b/geogebra/export/pstricks/GeoGebraToPgf.java
index f6dbd86..0875d8e 100644
--- a/geogebra/export/pstricks/GeoGebraToPgf.java
+++ b/geogebra/export/pstricks/GeoGebraToPgf.java
@@ -31,6 +31,7 @@ import geogebra.kernel.GeoVec3D;
 import geogebra.kernel.GeoVector;
 import geogebra.kernel.Kernel;
 import geogebra.kernel.MyPoint;
+import geogebra.kernel.arithmetic.ExpressionNode;
 import geogebra.kernel.arithmetic.Function;
 import geogebra.main.Application;
 import geogebra.util.Util;
@@ -58,6 +59,9 @@ public class GeoGebraToPgf extends GeoGebraExport {
     }
  
     public void generateAllCode() {
+		int oldCASPrintform = kernel.getCASPrintForm();
+		kernel.setCASPrintForm(ExpressionNode.STRING_TYPE_PGF);
+
        	format=((ExportFrame)frame).getFormat();
        	forceGnuplot=((PgfFrame)frame).getGnuplot();
     	// init unit variables
@@ -177,6 +181,9 @@ public class GeoGebraToPgf extends GeoGebraExport {
 		code.insert(0,codeBeginDoc+"");		
         code.insert(0,codePreamble+"");
 		frame.write(code);
+		
+		kernel.setCASPrintForm(oldCASPrintform);
+
 	}	    	
     
     protected void drawLocus(GeoLocus g){
@@ -682,9 +689,9 @@ public class GeoGebraToPgf extends GeoGebraExport {
 				s=LineOptionCode(geo,true);
 				if (s.length()!=0) code.append("["+s+"] ");
 				writePoint(x1,x2,code);
-				code.append(" circle ");
+				code.append(" circle (");
 				code.append(kernel.format(diameter/2));
-				code.append(";\n");
+				code.append(");\n");
 				endBeamer(code);
 			}
         }
@@ -1292,7 +1299,16 @@ public class GeoGebraToPgf extends GeoGebraExport {
 			}
 		}
 		// rename functions log
-		renameFunc(sb,"log(","ln(");
+		/* moved to ExpressionNode eg,
+		case STRING_TYPE_PSTRICKS:
+			sb.append("ln(");  
+			sb.append(leftStr);
+			sb.append(')');
+	    	break;
+
+		renameFunc(sb,"log(","ln(");*/
+		
+		
 		// for exponential in new Geogebra version.
 		renameFunc(sb,Kernel.EULER_STRING,"2.718281828");
 		return new String(sb);
diff --git a/geogebra/export/pstricks/GeoGebraToPstricks.java b/geogebra/export/pstricks/GeoGebraToPstricks.java
index 6734d61..5df62f7 100644
--- a/geogebra/export/pstricks/GeoGebraToPstricks.java
+++ b/geogebra/export/pstricks/GeoGebraToPstricks.java
@@ -38,6 +38,7 @@ import geogebra.kernel.GeoVec3D;
 import geogebra.kernel.GeoVector;
 import geogebra.kernel.Kernel;
 import geogebra.kernel.MyPoint;
+import geogebra.kernel.arithmetic.ExpressionNode;
 import geogebra.kernel.arithmetic.Function;
 import geogebra.main.Application;
 import geogebra.util.Util;
@@ -68,6 +69,10 @@ public class GeoGebraToPstricks extends GeoGebraExport {
   
 	 
     public void generateAllCode() {
+    	
+		int oldCASPrintform = kernel.getCASPrintForm();
+		kernel.setCASPrintForm(ExpressionNode.STRING_TYPE_PSTRICKS);
+
        	format=((ExportFrame)frame).getFormat();
     	// init unit variables
     	try{	
@@ -158,6 +163,9 @@ public class GeoGebraToPstricks extends GeoGebraExport {
  		}
         code.append("\\end{document}");		
 		frame.write(code);
+		
+		kernel.setCASPrintForm(oldCASPrintform);
+
 	}	
 
     protected void drawLocus(GeoLocus g){
@@ -1021,6 +1029,15 @@ public class GeoGebraToPstricks extends GeoGebraExport {
 				operand=false;
 			}
 		}
+		
+		/* moved these to ExpressionNode eg,
+	case STRING_TYPE_PSTRICKS:
+		sb.append("ceiling(");  
+		sb.append(leftStr);
+		sb.append(')');
+    	break;
+
+		
 		// rename functions log, ceil and exp
 		renameFunc(sb,"log(","ln(");
 		renameFunc(sb,"ceil(","ceiling(");
@@ -1031,7 +1048,8 @@ public class GeoGebraToPstricks extends GeoGebraExport {
 		renameFunc(sb,"asinh(","ASINH(");
 		renameFunc(sb,"atanh(","ATANH(");
 		renameFunc(sb,"sinh(","SINH(");
-		renameFunc(sb,"tanh(","TANH(");
+		renameFunc(sb,"tanh(","TANH(");*/
+		
 		// for exponential in new Geogbra version.
 		renameFunc(sb,Kernel.EULER_STRING,"2.718281828");
 		return new String(sb);
diff --git a/geogebra/gui/CheckboxCreationDialog.java b/geogebra/gui/CheckboxCreationDialog.java
index 17e65f4..f3b64d1 100644
--- a/geogebra/gui/CheckboxCreationDialog.java
+++ b/geogebra/gui/CheckboxCreationDialog.java
@@ -205,6 +205,8 @@ implements WindowFocusListener, ActionListener, GeoElementSelectionListener {
 		geoBoolean.setEuclidianVisible(true);
 		geoBoolean.setLabelVisible(true);
 		geoBoolean.updateRepaint();
+		
+		app.getKernel().storeUndoInfo();
 	}
 	
 	public void windowGainedFocus(WindowEvent arg0) {		
diff --git a/geogebra/gui/ContextMenuGeoElement.java b/geogebra/gui/ContextMenuGeoElement.java
index cb852d2..8e98e11 100644
--- a/geogebra/gui/ContextMenuGeoElement.java
+++ b/geogebra/gui/ContextMenuGeoElement.java
@@ -458,13 +458,15 @@ public class ContextMenuGeoElement extends JPopupMenu {
             if (geo.isAnimatable()) {            	
                 cbItem = new JCheckBoxMenuItem( app.getPlain("Animating"));
                 cbItem.setIcon(app.getEmptyIcon());
-                cbItem.setSelected(((GeoNumeric) geo).isAnimating());
+                cbItem.setSelected(((GeoNumeric) geo).isAnimating() && app.getKernel().getAnimatonManager().isRunning());
                 cbItem.addActionListener(new ActionListener() {
                 	public void actionPerformed(ActionEvent e) {
-                        geo.setAnimating(!geo.isAnimating());
+                		geo.setAnimating(!(geo.isAnimating() && app.getKernel().getAnimatonManager().isRunning()));
                         geo.updateRepaint();
                         app.storeUndoInfo();
                         
+                        app.getEuclidianView().repaint();
+                        
                         // automatically start animation when animating was turned on
                         if (geo.isAnimating())
                         	geo.getKernel().getAnimatonManager().startAnimation();	
diff --git a/geogebra/gui/DefaultGuiManager.java b/geogebra/gui/DefaultGuiManager.java
index f18deed..a1d395c 100644
--- a/geogebra/gui/DefaultGuiManager.java
+++ b/geogebra/gui/DefaultGuiManager.java
@@ -53,6 +53,7 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.io.Reader;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Enumeration;
@@ -74,6 +75,10 @@ import javax.swing.JOptionPane;
 import javax.swing.SwingUtilities;
 import javax.swing.UIManager;
 import javax.swing.text.JTextComponent;
+import javax.swing.text.MutableAttributeSet;
+import javax.swing.text.html.HTML;
+import javax.swing.text.html.HTMLEditorKit;
+import javax.swing.text.html.parser.ParserDelegator;
 
 
 /**
@@ -107,6 +112,7 @@ public class DefaultGuiManager implements GuiManager {
 	private MyToolbar appToolbarPanel;	  
     private String strCustomToolbarDefinition;
     private Locale currentLocale;
+    private boolean htmlLoaded;//added by Zbynek Konecny, 2010-05-28 (see #126)
 
 	// Actions
 	private AbstractAction showAxesAction, showGridAction, undoAction,
@@ -120,6 +126,9 @@ public class DefaultGuiManager implements GuiManager {
 		//if (!app.isApplet())
 		
 		initAlgebraController(); // needed for keyboard input in EuclidianView
+
+		//Zbynek Konecny, 2010-05-28 (see #126)
+		htmlLoaded=false;
 	}
 	
 	public boolean isPropertiesDialogSelectionListener() {
@@ -1399,7 +1408,7 @@ public class DefaultGuiManager implements GuiManager {
 			}
 			// <-- Modified for Intergeo File Format (Yves Kreis)
 
-			if (app.getCurrentFile() == null) {
+			if (app.getCurrentFile() == null && !htmlLoaded) { //edited by Zbynek Konecny, 2010-05-28 (see #126)
 				app.setCurrentFile(oldCurrentFile);
 			}
 			fileChooser.setMultiSelectionEnabled(false);
@@ -1415,6 +1424,8 @@ public class DefaultGuiManager implements GuiManager {
 
 	public synchronized void doOpenFiles(File[] files,
 			boolean allowOpeningInThisInstance, String extension) {
+		//Zbynek Konecny, 2010-05-28 (see #126)
+		htmlLoaded=false;
 		// <-- Added for Intergeo File Format (Yves Kreis)
 		// there are selected files
 		if (files != null) {
@@ -1444,7 +1455,9 @@ public class DefaultGuiManager implements GuiManager {
 						} else 	if (Application.FILE_EXT_HTML.equals(ext) 
 								|| Application.FILE_EXT_HTM.equals(ext) ) {
 							// load HTML file with applet param ggbBase64
-							loadBase64File(file);
+							//if we loaded from GGB, we don't want to overwrite old file
+							//next line Zbynek Konecny, 2010-05-28 (#126)
+							htmlLoaded=loadBase64File(file); 
 						} else {
 						// standard GeoGebra file
 						GeoGebraFrame inst = GeoGebraFrame.getInstanceWithFile(file);
@@ -1543,62 +1556,9 @@ public class DefaultGuiManager implements GuiManager {
 		try {
 			FileInputStream fis = null;
 			fis = new FileInputStream(file);
-			BufferedReader myInput = new BufferedReader
-			(new InputStreamReader(fis));
-
-			StringBuffer sb = new StringBuffer();
-
-			String thisLine;
-
-			boolean started = false;
-
-			while ((thisLine = myInput.readLine()) != null)  {
-
-				// don't start reading until ggbBase64 tag
-				if (!started && thisLine.indexOf("ggbBase64") > -1) started = true;
-
-				if (started) {
-					sb.append(thisLine);
-
-					if (thisLine.indexOf("</applet>") > -1) break;
-				}
-
 
-
-			}
-
-			String fileArgument = sb.toString();
-
-			String matchString = "name=\"ggbBase64\" value=\"";
-
-			int start = fileArgument.indexOf(matchString);
+			success = loadBase64fromHTML(fis);
 			
-			// match "/> or " /> or "> etc
-			int end   = fileArgument.indexOf(">");
-			while (end > start && fileArgument.charAt(end) != '\"') end--;
-
-			// check for two <param> tags on the same line
-			if (start > end) {
-				fileArgument = fileArgument.substring(start);
-				start = 0;
-				end   = fileArgument.indexOf(">");
-				while (end > start && fileArgument.charAt(end) != '\"') end--;
-			}
-			
-			if (start < 0 || end < 0 || end <= start) {
-				app.setDefaultCursor();
-				app.showError(app.getError("LoadFileFailed") + ":\n" + file);
-				return false;
-			}
-
-			//Application.debug(fileArgument.substring(start, end));
-
-			// decode Base64
-			byte[] zipFile = geogebra.util.Base64.decode(fileArgument
-					.substring(matchString.length() + start, end));
-
-			// load file
-			success = app.loadXML(zipFile);   
 		} catch (Exception e) {
 			app.setDefaultCursor();
 			app.showError(app.getError("LoadFileFailed") + ":\n" + file);
@@ -1610,6 +1570,49 @@ public class DefaultGuiManager implements GuiManager {
 		return success;
 
 	}
+	
+	static String base64Str;
+	
+	public boolean loadBase64fromHTML(InputStream fis) throws IOException {
+
+		BufferedReader myInput = new BufferedReader(new InputStreamReader(fis));
+
+		HTMLEditorKit.ParserCallback callback = 
+			new HTMLEditorKit.ParserCallback () {
+			
+			boolean base64Found = false;
+			
+			public void handleSimpleTag(HTML.Tag tag, 
+                    MutableAttributeSet attrSet, int pos) {
+				if (!base64Found && tag == HTML.Tag.PARAM) {
+					if (((String)attrSet.getAttribute(HTML.Attribute.NAME)).toLowerCase(Locale.US).equals("ggbbase64")) {
+						//Application.debug(""+attrSet.getAttribute(HTML.Attribute.VALUE));
+						
+						//Application.debug("base64 found using HTML parser");
+						
+						base64Found = true;
+						base64Str = (String)attrSet.getAttribute(HTML.Attribute.VALUE);
+					}
+				} 
+			}
+		};
+		
+		 Reader reader = new InputStreamReader (fis);
+		new ParserDelegator().parse(reader, callback, true);
+		
+		if (base64Str != null) {
+			// decode Base64
+			byte[] zipFile = geogebra.util.Base64.decode(base64Str);
+			base64Str = null;
+			
+			// load file
+			return app.loadXML(zipFile);   
+		}
+		
+		return false;
+
+	}
+
 		
 	private void updateGUIafterLoadFile(boolean isMacroFile) {
 		if (isMacroFile) {
diff --git a/geogebra/gui/PropertiesDialogGeoElement.java b/geogebra/gui/PropertiesDialogGeoElement.java
index d1fd8d2..9ed7cb0 100644
--- a/geogebra/gui/PropertiesDialogGeoElement.java
+++ b/geogebra/gui/PropertiesDialogGeoElement.java
@@ -5157,7 +5157,10 @@ class ShowConditionPanel
 			try {
 				for (int i = 0; i < geos.length; i++) {
 					GeoElement geo = (GeoElement) geos[i];
-					geo.setShowObjectCondition(cond);				
+					geo.setShowObjectCondition(cond);	
+					
+					// make sure object shown when condition removed
+					if (cond == null) geo.updateRepaint(); 
 				}	
 				
 			} catch (CircularDefinitionException e) {
diff --git a/geogebra/gui/RenameInputHandler.java b/geogebra/gui/RenameInputHandler.java
index 53680b7..2f3f07a 100644
--- a/geogebra/gui/RenameInputHandler.java
+++ b/geogebra/gui/RenameInputHandler.java
@@ -16,9 +16,11 @@ public class RenameInputHandler implements InputHandler {
 	private Application app;
 
 	private static String[] invalidFunctionNames = { "gamma", "x", "y", "abs",
-			"sgn", "sqrt", "exp", "log", "ln", "ld", "lg", "cos", "sin", "tan", "acos",
-			"asin", "atan", "cosh", "sinh", "tanh", "acosh", "asinh", "atanh",
-			"floor", "ceil", "round", "random" };
+		"sgn", "sqrt", "exp", "log", "ln", "ld", "lg", "cos", "sin", "tan",
+		"acos", "arcos", "arccos", "asin", "arcsin", "atan", "arctan", 
+		"cosh", "sinh", "tanh", "acosh", "arcosh", "arccosh", "asinh",
+		"arcsinh", "atanh", "arctanh",
+		"floor", "ceil", "round", "random" };
 
 	public RenameInputHandler(Application app, GeoElement geo, boolean storeUndo) {
 		this.app = app;
diff --git a/geogebra/gui/SliderDialog.java b/geogebra/gui/SliderDialog.java
index 5b21e20..84f6550 100644
--- a/geogebra/gui/SliderDialog.java
+++ b/geogebra/gui/SliderDialog.java
@@ -78,8 +78,9 @@ public class SliderDialog extends JDialog
 		angle.setEuclidianVisible(true);
 		angle.setLabelMode(GeoElement.LABEL_NAME_VALUE);
 		angle.setSliderLocation(x, y);
+		angle.setAnimationType(GeoElement.ANIMATION_INCREASING);
 		angle.setAbsoluteScreenLocActive(true);
-		angle.setValue(Math.PI/180);
+		angle.setValue(45 * Math.PI/180);
 		
 		geoResult = null;
 
diff --git a/geogebra/gui/_license.txt b/geogebra/gui/_license.txt
index 2298716..7de8770 100644
--- a/geogebra/gui/_license.txt
+++ b/geogebra/gui/_license.txt
@@ -84,7 +84,7 @@ SUPPORT
       2006-2009: support of workshops and presentations throughout the USA
   * Faculty LSHASE, University of Luxembourg
       since 2009: hosting the GeoGebra website
-      since 2005: providing the multi-platform software deployment solutio
+      since 2005: providing the multi-platform software deployment solution
   * Department of Mathematics, University of Salzburg
       2002-2009: hosting the GeoGebra website   
   
diff --git a/geogebra/gui/app/GeoGebraFrame.java b/geogebra/gui/app/GeoGebraFrame.java
index b714e8b..87f02b5 100644
--- a/geogebra/gui/app/GeoGebraFrame.java
+++ b/geogebra/gui/app/GeoGebraFrame.java
@@ -112,8 +112,10 @@ public class GeoGebraFrame extends JFrame implements WindowFocusListener
 	}
 
 	public void setVisible(boolean flag) {				
-		if (flag) {						
-			updateSize();									
+		if (flag) {	
+			
+			// hack to make running on Sugar work (see later)
+			if (!app.runningOnSugar) updateSize();									
 			
 			// set location
 			int instanceID = instances.size() - 1;
@@ -134,6 +136,10 @@ public class GeoGebraFrame extends JFrame implements WindowFocusListener
 			}
 			
 			super.setVisible(true);	
+			
+			// hack to make running on Sugar work (see earlier)
+			if (app.runningOnSugar) updateSize();	
+			
 			app.getEuclidianView().requestFocusInWindow();
 		}
 		else {	
diff --git a/geogebra/gui/menubar/GeoGebraMenuBar.java b/geogebra/gui/menubar/GeoGebraMenuBar.java
index e8b040e..6f56a45 100644
--- a/geogebra/gui/menubar/GeoGebraMenuBar.java
+++ b/geogebra/gui/menubar/GeoGebraMenuBar.java
@@ -58,6 +58,10 @@ public class GeoGebraMenuBar extends MenubarImpl implements Menubar, ActionListe
 				kernel.setPrintDecimals(decimals);				
 				kernel.updateConstruction();
 				app.refreshViews();
+				
+				// see ticket 79
+				kernel.updateConstruction();
+				
 				app.setUnsaved();
 				app.storeUndoInfo();
 			} catch (Exception e) {
@@ -75,6 +79,10 @@ public class GeoGebraMenuBar extends MenubarImpl implements Menubar, ActionListe
 				kernel.setPrintFigures(figures);
 				kernel.updateConstruction();
 				app.refreshViews();
+				
+				// see ticket 79
+				kernel.updateConstruction();
+				
 				app.setUnsaved();
 				app.storeUndoInfo();
 			} catch (Exception e) {
diff --git a/geogebra/gui/view/algebra/AlgebraController.java b/geogebra/gui/view/algebra/AlgebraController.java
index 7a3cab7..e80ab0e 100644
--- a/geogebra/gui/view/algebra/AlgebraController.java
+++ b/geogebra/gui/view/algebra/AlgebraController.java
@@ -27,6 +27,7 @@ import java.awt.Rectangle;
 import java.awt.event.MouseEvent;
 import java.awt.event.MouseListener;
 import java.awt.event.MouseMotionListener;
+import java.util.Iterator;
 
 import javax.swing.tree.TreePath;
 
@@ -61,6 +62,8 @@ public class AlgebraController
 	/*
 	 * MouseListener implementation for popup menus
 	 */
+	
+	private GeoElement lastSelectedGeo = null;
 
 	public void mouseClicked(java.awt.event.MouseEvent e) {	
 		// right click is consumed in mousePressed
@@ -113,19 +116,63 @@ public class AlgebraController
 			else {					
 				// handle selecting geo
 				if (Application.isControlDown(e)) {
-					app.toggleSelectedGeo(geo); 													
-//					app.geoElementSelected(geo, true);
+					app.toggleSelectedGeo(geo); 	
+					if (app.getSelectedGeos().contains(geo)) lastSelectedGeo = geo;
+				} else if (e.isShiftDown() && lastSelectedGeo != null) {
+					boolean nowSelecting = true;
+					boolean selecting = false;
+					boolean aux = geo.isAuxiliaryObject();
+					boolean ind = geo.isIndependent();
+					boolean aux2 = lastSelectedGeo.isAuxiliaryObject();
+					boolean ind2 = lastSelectedGeo.isIndependent();
+					
+					if ((aux == aux2 && aux == true) || (aux == aux2 && ind == ind2)) {
+						
+						Iterator it = kernel.getConstruction().getGeoSetLabelOrder().iterator();
+						
+						boolean direction = geo.getLabel().compareTo(lastSelectedGeo.getLabel()) < 0;
+						
+						while (it.hasNext()) {
+							GeoElement geo2 = (GeoElement)it.next();
+							if ((geo2.isAuxiliaryObject() == aux && aux == true)
+									|| (geo2.isAuxiliaryObject() == aux && geo2.isIndependent() == ind)) {
+								
+								if (direction && geo2 == lastSelectedGeo) selecting = !selecting;
+								if (!direction && geo2 == geo) selecting = !selecting;
+								
+								if (selecting) {
+									app.toggleSelectedGeo(geo2);
+									nowSelecting = app.getSelectedGeos().contains(geo2);
+								}
+								
+								if (!direction && geo2 == lastSelectedGeo) selecting = !selecting;
+								if (direction && geo2 == geo) selecting = !selecting;
+							}
+						}
+					}
+
+					if (nowSelecting) {
+						app.addSelectedGeo(geo); 
+						lastSelectedGeo = geo;
+					} else {
+						app.removeSelectedGeo(lastSelectedGeo);
+						lastSelectedGeo = null;
+					}
+					//lastSelectedGeo = geo;
+					
 				} else {							
 					app.clearSelectedGeos();
 					app.addSelectedGeo(geo);
-//					app.geoElementSelected(geo, false);
+					lastSelectedGeo = geo;
 				}
 			}
 		} 
 		else if (mode != EuclidianView.MODE_SELECTION_LISTENER) {
 			// let euclidianView know about the click
 			ev.clickedGeo(geo, e);
-		}
+		} else 
+			// tell selection listener about click
+			app.geoElementSelected(geo, false);
 		
 		// Alt click: copy definition to input field
 		if (geo != null && e.isAltDown() && app.showAlgebraInput()) {			
diff --git a/geogebra/gui/view/spreadsheet/ContextMenu.java b/geogebra/gui/view/spreadsheet/ContextMenu.java
index bc37739..eadfb94 100644
--- a/geogebra/gui/view/spreadsheet/ContextMenu.java
+++ b/geogebra/gui/view/spreadsheet/ContextMenu.java
@@ -65,7 +65,8 @@ public class ContextMenu extends JPopupMenu
 		//G.Sturr 2009-10-3: Added menu title  
 		ArrayList geos = app.getSelectedGeos();
 		
-		// remove selected geos not in selection
+		// remove selected geos not in spreadsheet
+		// NB changes 'geos'
 		Iterator it = ((ArrayList)(geos.clone())).iterator();
 		while (it.hasNext()) {
 			GeoElement geo = (GeoElement)(it.next());
diff --git a/geogebra/io/MyXMLHandler.java b/geogebra/io/MyXMLHandler.java
index 3f141f2..27cf557 100644
--- a/geogebra/io/MyXMLHandler.java
+++ b/geogebra/io/MyXMLHandler.java
@@ -75,8 +75,8 @@ public class MyXMLHandler implements DocHandler {
 	private static final int MODE_MACRO = 50;
 	private static final int MODE_EUCLIDIAN_VIEW = 100;
 	private static final int MODE_SPREADSHEET_VIEW = 150;
-	private static final int MODE_CAS_VIEW = 160;
-	private static final int MODE_CAS_SESSION = 161;
+	//private static final int MODE_CAS_VIEW = 160;
+	//private static final int MODE_CAS_SESSION = 161;
 	private static final int MODE_CAS_CELL_PAIR = 162;
 	private static final int MODE_CAS_INPUT_CELL = 163;
 	private static final int MODE_CAS_OUTPUT_CELL = 164;
@@ -88,7 +88,7 @@ public class MyXMLHandler implements DocHandler {
 
 	private int mode;
 	private int constMode; // submode for <construction>
-	private int casSessionMode; // submode for <casSession>
+	//private int casSessionMode; // submode for <casSession>
 
 	// avoid import geogebra.cas.view.CASTableCellValue as this is in cas jar
 	// file
@@ -168,7 +168,6 @@ public class MyXMLHandler implements DocHandler {
 		mode = MODE_INVALID;
 		constMode = MODE_CONSTRUCTION;
 
-		casSessionMode = MODE_CAS_SESSION;
 	}
 
 	private void reset(boolean start) {
@@ -234,14 +233,6 @@ public class MyXMLHandler implements DocHandler {
 			startSpreadsheetViewElement(eName, attrs);
 			break;
 
-		case MODE_CAS_VIEW:
-			startCASViewElement(eName, attrs);
-			break;
-
-		case MODE_CAS_SESSION:
-			startCASSessionElement(eName, attrs);
-			break;
-
 		case MODE_KERNEL:
 			startKernelElement(eName, attrs);
 			break;
@@ -318,15 +309,6 @@ public class MyXMLHandler implements DocHandler {
 				mode = MODE_GEOGEBRA;
 			break;
 
-		case MODE_CAS_VIEW:
-			if (eName.equals("casView"))
-				mode = MODE_GEOGEBRA;
-			break;
-
-		case MODE_CAS_SESSION:
-			endCASSessionElement(eName);
-			break;
-
 		case MODE_KERNEL:
 			if (eName.equals("kernel"))
 				mode = MODE_GEOGEBRA;
@@ -358,48 +340,6 @@ public class MyXMLHandler implements DocHandler {
 		}
 	}
 
-	private void endCASSessionElement(String eName) {
-		switch (casSessionMode) {
-		case MODE_CAS_SESSION:
-			if (eName.equals("casSession")) {
-				// process start points at end of construction
-				processCellPairList();
-				mode = MODE_GEOGEBRA;
-			}
-			break;
-
-		case MODE_CAS_CELL_PAIR:
-			if (eName.equals("cellPair"))
-				casSessionMode = MODE_CAS_SESSION;
-			break;
-
-		case MODE_CAS_INPUT_CELL:
-			if (eName.equals("inputCell"))
-				casSessionMode = MODE_CAS_CELL_PAIR;
-			break;
-
-		case MODE_CAS_OUTPUT_CELL:
-			if (eName.equals("outputCell"))
-				casSessionMode = MODE_CAS_CELL_PAIR;
-			break;
-
-		default:
-			casSessionMode = MODE_CAS_SESSION; // set back mode
-			System.err.println("unknown cas session mode:" + constMode);
-		}
-
-	}
-
-	private void processCellPairList() {
-		try {
-			app.getCasView().initCellPairs(cellPairList);
-			cellPairList.clear();
-		} catch (Exception e) {
-			cellPairList.clear();
-			e.printStackTrace();
-			throw new MyError(app, "processCellPairList: " + e.toString());
-		}
-	}
 
 	// ====================================
 	// <geogebra>
@@ -411,10 +351,6 @@ public class MyXMLHandler implements DocHandler {
 			mode = MODE_KERNEL;
 		} else if (eName.equals("spreadsheetView")) {
 			mode = MODE_SPREADSHEET_VIEW;
-		} else if (eName.equals("casView")) {
-			mode = MODE_CAS_VIEW;
-		} else if (eName.equals("casSession")) {
-			mode = MODE_CAS_SESSION;
 		} else if (eName.equals("gui")) {
 			mode = MODE_GUI;
 		} else if (eName.equals("macro")) {
@@ -531,28 +467,6 @@ public class MyXMLHandler implements DocHandler {
 			System.err.println("error in <spreadsheetView>: " + eName);
 	}
 
-	// ====================================
-	// <CASView>
-	// ====================================
-	private void startCASViewElement(String eName, LinkedHashMap attrs) {
-		boolean ok = true;
-
-		switch (eName.charAt(0)) {
-		case 's':
-			if (eName.equals("size")) {
-				ok = handleCASSize(app.getCasView(), attrs);
-				break;
-			}
-
-		default:
-			System.err.println("unknown tag in <casView>: " + eName);
-		}
-
-		if (!ok)
-			System.err.println("error in <casView>: " + eName);
-
-	}
-
 	private boolean handleCoordSystem(EuclidianView ev, LinkedHashMap attrs) {
 		try {
 			double xZero = Double.parseDouble((String) attrs.get("xZero"));
@@ -641,8 +555,9 @@ public class MyXMLHandler implements DocHandler {
 	}
 
 	private boolean handleEvSize(EuclidianView ev, LinkedHashMap attrs) {
-		if (app.isApplet())
-			return true;
+		// removed, needed to resize applet correctly
+		//if (app.isApplet())
+		//	return true;
 
 		try {
 			int width = Integer.parseInt((String) attrs.get("width"));
@@ -685,24 +600,6 @@ public class MyXMLHandler implements DocHandler {
 		}
 	}
 
-	private boolean handleCASSize(CasManager casView, LinkedHashMap attrs) {
-		if (app.isApplet())
-			return true;
-
-		try {
-			int width = Integer.parseInt((String) attrs.get("width"));
-			int height = Integer.parseInt((String) attrs.get("height"));
-
-			// it seems that this statement does not work, because now cas use
-			// its own frame. --Quan Yuan
-			((JComponent) app.getCasView()).setPreferredSize(new Dimension(
-					width, height));
-			return true;
-		} catch (Exception e) {
-			e.printStackTrace();
-			return false;
-		}
-	}
 
 	private boolean handleBgColor(EuclidianView ev, LinkedHashMap attrs) {
 		Color col = handleColorAttrs(attrs);
@@ -1197,109 +1094,7 @@ public class MyXMLHandler implements DocHandler {
 		cons.setWorksheetText(below, 1);
 	}
 
-	// ====================================
-	// <CAS Session>
-	// ====================================
-	private void startCASSessionElement(String eName, LinkedHashMap attrs) {
-		// handle cas session mode
-		switch (casSessionMode) {
-		case MODE_CAS_SESSION:
-			if (eName.equals("cellPair")) {
-				casSessionMode = MODE_CAS_CELL_PAIR;
-//				app.loadCASJar();
-//				casTableCellValueElement = new geogebra.cas.view.CASTableCellValue();
-				casTableCellValueElement = app.getCasView().createCellValue();
-			} else {
-				System.err.println("unknown tag in <cellPair>: " + eName);
-			}
-			break;
-
-		case MODE_CAS_CELL_PAIR:
-			if (eName.equals("inputCell")) {
-				casSessionMode = MODE_CAS_INPUT_CELL;
-			} else if (eName.equals("outputCell")) {
-				casSessionMode = MODE_CAS_OUTPUT_CELL;
-			} else {
-				System.err.println("unknown tag in <cellPair>: " + eName);
-			}
-			break;
-
-		case MODE_CAS_INPUT_CELL:
-			startCellInputElement(eName, attrs);
-			break;
-
-		case MODE_CAS_OUTPUT_CELL:
-			startCellOutputElement(eName, attrs);
-			break;
-
-		default:
-			System.err.println("unknown cas session mode:" + constMode);
-		}
-	}
-
-	private void startCellOutputElement(String eName, LinkedHashMap attrs) {
-		if (casTableCellValueElement == null) {
-			System.err.println("no element set for <" + eName + ">");
-			return;
-		}
-
-		boolean ok = true;
-		switch (eName.charAt(0)) {
-		case 'e':
-			if (eName.equals("expression")) {
-				ok = handleOutExpression(attrs);
-				break;
-			}
-
-		case 'c':
-			if (eName.equals("color")) {
-				ok = handleCASPairColor(attrs);
-				if (ok) {
-					cellPairList.removeLast();
-					cellPairList.add(casTableCellValueElement);
-
-				}
-				break;
-			}
-
-		default:
-			System.err.println("unknown tag in <outputCell>: " + eName);
-		}
-
-		if (!ok)
-			System.err.println("error in <outputCell>: " + eName);
 
-	}
-
-	private void startCellInputElement(String eName, LinkedHashMap attrs) {
-		if (casTableCellValueElement == null) {
-			System.err.println("no element set for <" + eName + ">");
-			return;
-		}
-
-		boolean ok = true;
-		switch (eName.charAt(0)) {
-		case 'e':
-			if (eName.equals("expression")) {
-				ok = handleInputExpression(attrs);
-				break;
-			}
-
-		case 'c':
-			if (eName.equals("color")) {
-				ok = handleCASPairColor(attrs);
-				if (ok)
-					cellPairList.add(casTableCellValueElement);
-				break;
-			}
-
-		default:
-			System.err.println("unknown tag in <inputCell>: " + eName);
-		}
-
-		if (!ok)
-			System.err.println("error in <inputCell>: " + eName);
-	}
 
 	private void startConstructionElement(String eName, LinkedHashMap attrs) {
 		// handle construction mode
@@ -1902,43 +1697,6 @@ public class MyXMLHandler implements DocHandler {
 		}
 	}
 
-	private boolean handleInputExpression(LinkedHashMap attrs) {
-		try {
-//			app.loadCASJar();
-//			((geogebra.cas.view.CASTableCellValue) casTableCellValueElement)
-//					.setCommand((String) attrs.get("value"));
-
-			casTableCellValueElement = app.getCasView().setInputExpression(casTableCellValueElement,
-					(String) attrs.get("value"));
-			return true;
-		} catch (Exception e) {
-			return false;
-		}
-	}
-
-	private boolean handleOutExpression(LinkedHashMap attrs) {
-		try {
-//			app.loadCASJar();
-//			((geogebra.cas.view.CASTableCellValue) casTableCellValueElement)
-//					.setOutput((String) attrs.get("value"));
-//			((geogebra.cas.view.CASTableCellValue) casTableCellValueElement)
-//					.setOutputAreaInclude(true);
-			casTableCellValueElement = app.getCasView().setOutputExpression(casTableCellValueElement,
-					(String) attrs.get("value"));
-			return true;
-		} catch (Exception e) {
-			return false;
-		}
-	}
-
-	private boolean handleCASPairColor(LinkedHashMap attrs) {
-		Color col = handleColorAttrs(attrs);
-		if (col == null)
-			return false;
-		// geo.setObjColor(col);
-
-		return true;
-	}
 
 	/*
 	 * this should not be needed private boolean
diff --git a/geogebra/io/MyXMLio.java b/geogebra/io/MyXMLio.java
index 74b4394..779056e 100644
--- a/geogebra/io/MyXMLio.java
+++ b/geogebra/io/MyXMLio.java
@@ -782,13 +782,6 @@ public class MyXMLio {
 		sb.ensureCapacity(sb.length() + addStr.length());
 		sb.append(addStr);
 
-		// save cas session
-		if (app.hasCasView()) {
-			addStr = app.getCasView().getSessionXML();
-			sb.ensureCapacity(sb.length() + addStr.length());
-			sb.append(addStr);
-		}
-			
 		sb.ensureCapacity(sb.length() + 20);
 		sb.append("</geogebra>");
 
diff --git a/geogebra/kernel/AlgoSequence.java b/geogebra/kernel/AlgoSequence.java
index de09519..4f22405 100644
--- a/geogebra/kernel/AlgoSequence.java
+++ b/geogebra/kernel/AlgoSequence.java
@@ -117,6 +117,27 @@ public class AlgoSequence extends AlgoElement {
         setDependencies(); // done by AlgoElement          
     }
 
+    /**
+     *  Returns contents of input array excluding var 
+     *  (var is not input object, but must be in input array
+     *  because of GetCommandDescription method).
+     *  see ticket #72
+     *  2010-05-13 null pointer error fixed
+     *  @author Zbynek Konecny
+     *  @version 2010-05-13
+     */
+    GeoElement[] getInputForUpdateSetPropagation() {
+    	GeoElement[] realInput = new GeoElement[input.length-1];
+    	realInput[0] = expression;
+    	realInput[1] = var_from_geo;
+    	realInput[2] = var_to_geo;
+    	if(input.length==5)	{
+    		realInput[3] = var_step_geo;
+    	}
+    	
+    	return realInput;
+    }
+
     GeoList getList() {
         return list;
     }      
diff --git a/geogebra/kernel/AlgoTableText.java b/geogebra/kernel/AlgoTableText.java
index 79b04fc..47a5940 100644
--- a/geogebra/kernel/AlgoTableText.java
+++ b/geogebra/kernel/AlgoTableText.java
@@ -196,13 +196,14 @@ public class AlgoTableText extends AlgoElement {
 			String text = geo1.toLaTeXString(false);
 			if (" ".equals(text) || "".equals(text))
 				text = "\u00a0";	
+			/* removed Michael Borcherds 2010, causes problems with HotEqn
 			// Modify by Loïc Le Coq 2009/12/15
 			if (geo1.isTextValue()){
 				sb.append("\\mathrm{");
 				sb.append(text);
 				sb.append("}");
 			}
-			else 
+			else */
 			sb.append(text);
 			// End Loïc
 		}
diff --git a/geogebra/kernel/AlgoText.java b/geogebra/kernel/AlgoText.java
index fef714d..e3cccab 100644
--- a/geogebra/kernel/AlgoText.java
+++ b/geogebra/kernel/AlgoText.java
@@ -30,27 +30,32 @@ public class AlgoText extends AlgoElement {
 
 	private static final long serialVersionUID = 1L;
 	private GeoElement geo;  // input
-	private GeoBoolean substituteVars; // optional input
+	private GeoBoolean substituteVars, latex; // optional input
 	private GeoPoint startPoint, startPointCopy; // optional input
 	private GeoText text;     // output              
 
 	public AlgoText(Construction cons, String label, GeoElement geo) {
-		this(cons, label, geo, null, null);
+		this(cons, label, geo, null, null, null);
 	}   
 
 	public AlgoText(Construction cons, String label, GeoElement geo, GeoBoolean substituteVars) {
-		this(cons, label, geo, null, substituteVars);
+		this(cons, label, geo, null, substituteVars, null);
 	}   
 	
 	public AlgoText(Construction cons, String label, GeoElement geo, GeoPoint p) {
-		this(cons, label, geo, p, null);
+		this(cons, label, geo, p, null, null);
 	}   
 
 	public AlgoText(Construction cons, String label, GeoElement geo, GeoPoint p, GeoBoolean substituteVars) {
+		this(cons, label, geo, p, substituteVars, null);
+	}   
+
+	public AlgoText(Construction cons, String label, GeoElement geo, GeoPoint p, GeoBoolean substituteVars, GeoBoolean latex) {
 		super(cons);
 		this.geo = geo;
 		this.startPoint = p;
 		this.substituteVars = substituteVars;
+		this.latex = latex;
 
 		text = new GeoText(cons);
 		text.setIsCommand(true); // stop editing as text
@@ -85,12 +90,14 @@ public class AlgoText extends AlgoElement {
 		int inputs = 1;
 		if (startPoint != null) inputs++;
 		if (substituteVars != null) inputs++;
+		if (latex != null) inputs++;
 
 		int i=0;
 		input = new GeoElement[inputs];
 		input[i++] = geo;
 		if (startPoint != null) input[i++] = startPoint;
 		if (substituteVars != null) input[i++] = substituteVars;
+		if (latex != null) input[i++] = latex;
 
 		output = new GeoElement[1];        
 		output[0] = text;        
@@ -104,7 +111,8 @@ public class AlgoText extends AlgoElement {
 		// undefined text
 		if (!geo.isDefined() || 
 				(startPoint != null && !startPoint.isDefined()) ||
-				(substituteVars != null && !substituteVars.isDefined())) 
+				(substituteVars != null && !substituteVars.isDefined()) ||
+				(latex != null && !latex.isDefined())) 
 		{
 			text.setUndefined();
 			return;
@@ -114,9 +122,11 @@ public class AlgoText extends AlgoElement {
 		
 		// standard case: set text
 		boolean bool = substituteVars == null ? true : substituteVars.getBoolean();
+		boolean formula = latex == null ? false : latex.getBoolean();
 		text.setTextString(geo.getFormulaString(ExpressionNode.STRING_TYPE_GEOGEBRA, bool));	
-		
+		text.setLaTeX(formula, false);
 		text.restorePrintAccuracy();
+		text.update();
 		
 		// update startpoint position of text
 		if (startPointCopy != null) {
diff --git a/geogebra/kernel/AnimationManager.java b/geogebra/kernel/AnimationManager.java
index 4f86ed1..44994b6 100644
--- a/geogebra/kernel/AnimationManager.java
+++ b/geogebra/kernel/AnimationManager.java
@@ -1,5 +1,7 @@
 package geogebra.kernel;
 
+import geogebra.main.Application;
+
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.util.ArrayList;
@@ -29,7 +31,7 @@ public class AnimationManager implements ActionListener {
 		
 	public synchronized void startAnimation() {
 		if (!timer.isRunning() && animatedGeos.size() > 0) {
-			udpateNeedToShowAnimationButton();
+			updateNeedToShowAnimationButton();
 			timer.start();			
 		}
 	}
@@ -37,7 +39,7 @@ public class AnimationManager implements ActionListener {
 	public synchronized void stopAnimation() {
 		if (timer.isRunning()) {			
 			timer.stop();
-			udpateNeedToShowAnimationButton();
+			updateNeedToShowAnimationButton();
 		}
 	}
 	
@@ -48,7 +50,7 @@ public class AnimationManager implements ActionListener {
 		}
 		
 		animatedGeos.clear();		
-		udpateNeedToShowAnimationButton();
+		updateNeedToShowAnimationButton();
 	}
 	
 	/**
@@ -78,7 +80,7 @@ public class AnimationManager implements ActionListener {
 	/**
 	 * Updates the needToShowAnimationButton value.
 	 */
-	public void udpateNeedToShowAnimationButton() {
+	public void updateNeedToShowAnimationButton() {
 		int size = animatedGeos.size();
 		if (size == 0) {
 			needToShowAnimationButton = false;
@@ -89,7 +91,7 @@ public class AnimationManager implements ActionListener {
 		for (int i=0; i < size; i++) {
 			GeoElement geo = (GeoElement) animatedGeos.get(i);
 			GeoElement animObj = geo.getAnimationSpeedObject();
-			if (animObj == null || !animObj.isLabelSet() && animObj.isIndependent()) {
+				if (animObj == null || (!animObj.isLabelSet() && animObj.isIndependent())) {
 				needToShowAnimationButton = true;
 				return;
 			}
@@ -136,8 +138,8 @@ public class AnimationManager implements ActionListener {
 	final public synchronized void addAnimatedGeo(GeoElement geo) {
 		if (geo.isAnimating() && !animatedGeos.contains(geo)) {
 			animatedGeos.add(geo);		
-			if (animatedGeos.size() == 1)
-				udpateNeedToShowAnimationButton();
+			//if (animatedGeos.size() == 1) removed, might have geos with variable controlling speed
+				updateNeedToShowAnimationButton();
 		}
 	}
 	
@@ -148,6 +150,7 @@ public class AnimationManager implements ActionListener {
 		if (animatedGeos.remove(geo) && animatedGeos.size() == 0) { 
 				stopAnimation();
 		}
+		updateNeedToShowAnimationButton(); // added, might have geos with variable controlling speed
 	}
 	
 	/**
diff --git a/geogebra/kernel/GeoAngle.java b/geogebra/kernel/GeoAngle.java
index e65f09d..47c26d8 100644
--- a/geogebra/kernel/GeoAngle.java
+++ b/geogebra/kernel/GeoAngle.java
@@ -320,7 +320,7 @@ public final class GeoAngle extends GeoNumeric {
 	// Michael Borcherds 2007-10-21 END	
 
 	final public String toValueString() {
-		return kernel.formatAngle(value).toString();
+		return isEuclidianVisible() ? kernel.formatAngle(value, 1/animationIncrement).toString() : kernel.formatAngle(value).toString();
 	}
 
 	// overwrite
diff --git a/geogebra/kernel/GeoAxis.java b/geogebra/kernel/GeoAxis.java
index 795710b..f676b89 100644
--- a/geogebra/kernel/GeoAxis.java
+++ b/geogebra/kernel/GeoAxis.java
@@ -38,7 +38,7 @@ public class GeoAxis extends GeoLine {
 				break;
 			
 			case Y_AXIS:
-				setCoords(1, 0, 0);
+				setCoords(-1, 0, 0);
 				label = "yAxis";
 				break;
 		}
diff --git a/geogebra/kernel/GeoBoolean.java b/geogebra/kernel/GeoBoolean.java
index d697b73..44f51cc 100644
--- a/geogebra/kernel/GeoBoolean.java
+++ b/geogebra/kernel/GeoBoolean.java
@@ -313,8 +313,8 @@ AbsoluteScreenLocateable {
 	
     // Michael Borcherds 2008-04-30
 	final public boolean isEqual(GeoElement geo) {
-		// return false if it's a different type, otherwise use equals() method
-		if (geo.isGeoBoolean()) return equals((GeoBoolean)geo); else return false;
+		// return false if it's a different type, otherwise check
+		if (geo.isGeoBoolean()) return value == ((GeoBoolean)geo).getBoolean(); else return false;
 	}
 
 	
diff --git a/geogebra/kernel/GeoConic.java b/geogebra/kernel/GeoConic.java
index 530c2d4..ee78fde 100644
--- a/geogebra/kernel/GeoConic.java
+++ b/geogebra/kernel/GeoConic.java
@@ -1062,6 +1062,13 @@ Translateable, PointRotateable, Mirrorable, Dilateable, LineProperties  {
 		eigenvec[1].y = eigenvec[0].x;
 		
 		classifyConic();
+		
+		// check if we got an ellipse or hyperbola
+		if (!(type == CONIC_HYPERBOLA || type == CONIC_ELLIPSE))
+		{
+			defined = false;
+		}
+		
 	}
 
 	/*************************************
@@ -2081,9 +2088,16 @@ Translateable, PointRotateable, Mirrorable, Dilateable, LineProperties  {
 	 *  Sets the GeoLine polar to A.P, the polar line of P relativ to this conic.
 	 */
 	final public void polarLine(GeoPoint P, GeoLine polar) {
-		polar.x = matrix[0] * P.x + matrix[3] * P.y + matrix[4] * P.z;
-		polar.y = matrix[3] * P.x + matrix[1] * P.y + matrix[5] * P.z;
-		polar.z = matrix[4] * P.x + matrix[5] * P.y + matrix[2] * P.z;
+		//<Zbynek Konecny, 2010-03-15> ticket #66
+		if(!isDefined()){
+			polar.setUndefined();
+		}
+		else{
+		//</Zbynek>	
+			polar.x = matrix[0] * P.x + matrix[3] * P.y + matrix[4] * P.z;
+			polar.y = matrix[3] * P.x + matrix[1] * P.y + matrix[5] * P.z;
+			polar.z = matrix[4] * P.x + matrix[5] * P.y + matrix[2] * P.z;
+		}
 	}
 
 	/**
diff --git a/geogebra/kernel/GeoElement.java b/geogebra/kernel/GeoElement.java
index 696868c..e4f43e0 100644
--- a/geogebra/kernel/GeoElement.java
+++ b/geogebra/kernel/GeoElement.java
@@ -21,6 +21,7 @@ package geogebra.kernel;
 import geogebra.euclidian.EuclidianView;
 import geogebra.kernel.arithmetic.ExpressionValue;
 import geogebra.kernel.arithmetic.NumberValue;
+import geogebra.main.Application;
 import geogebra.main.MyError;
 import geogebra.util.Util;
 
@@ -865,6 +866,7 @@ public abstract class GeoElement
 	 */
 	public void setVisualStyleForTransformations(GeoElement geo) {
 		setVisualStyle(geo);
+		update();
 	}
 	
 	public void setVisualStyle(GeoElement geo) {					
@@ -2560,7 +2562,7 @@ public abstract class GeoElement
 	
 	public String addLabelTextOrHTML(String desc) {
 		String ret; 
-		if (desc.startsWith(label)) {
+		if (desc.startsWith(label+" ")) {
 			ret = desc;
 		} else {
 			StringBuffer sb = new StringBuffer();
@@ -3567,7 +3569,7 @@ public abstract class GeoElement
 		}		
 	}
 	
-	public final void removeColorFunction() {
+	public void removeColorFunction() {
 		// unregister old condition
 		if (colFunction != null) {
 			colFunction.unregisterColorFunctionListener(this);
diff --git a/geogebra/kernel/GeoLine.java b/geogebra/kernel/GeoLine.java
index e561b34..bd9cc3b 100644
--- a/geogebra/kernel/GeoLine.java
+++ b/geogebra/kernel/GeoLine.java
@@ -177,6 +177,13 @@ Translateable,PointRotateable, Mirrorable, Dilateable, LineProperties {
         return kernel.isEqual(g.x * y, g.y * x);        
     }
     
+    /** returns true if this line and g are parallel (signed)*/
+    final public boolean isSameDirection(GeoLine g) {        
+    	// check x and g.x have the same sign
+    	// also y and g.y
+        return (g.x * x >= 0) && (g.y * y >= 0) && isParallel(g);        
+    }
+    
     /** returns true if this line and g are perpendicular */
     final public boolean isPerpendicular(GeoLine g) {        
         return kernel.isEqual(g.x * x, -g.y * y);        
@@ -321,6 +328,7 @@ Translateable,PointRotateable, Mirrorable, Dilateable, LineProperties {
 	// Michael Borcherds 2008-04-30
 	public boolean isEqual(GeoElement geo) {
 		// return false if it's a different type, otherwise use equals() method
+		if (geo.isGeoRay() || geo.isGeoSegment()) return false;
 		if (geo.isGeoLine()) return linDep((GeoLine)geo); else return false;
 	}
 
diff --git a/geogebra/kernel/GeoList.java b/geogebra/kernel/GeoList.java
index 6b0972b..c2bfc75 100644
--- a/geogebra/kernel/GeoList.java
+++ b/geogebra/kernel/GeoList.java
@@ -196,6 +196,19 @@ public class GeoList extends GeoElement implements ListValue, LineProperties, Po
 		}
 	}
 	
+	public final void removeColorFunction() {
+		super.removeColorFunction();
+		
+    	if (geoList == null || geoList.size() == 0) return;    
+    	
+    	int size = geoList.size();	        
+        for (int i=0; i < size; i++) {
+			GeoElement geo = (GeoElement)geoList.get(i);
+			if (!geo.isLabelSet())
+        		geo.removeColorFunction();
+        }
+	}
+	
 	public final void setColorFunction(GeoList col) {
 		super.setColorFunction(col);
 		
diff --git a/geogebra/kernel/GeoNumeric.java b/geogebra/kernel/GeoNumeric.java
index ab36e10..334c2bd 100644
--- a/geogebra/kernel/GeoNumeric.java
+++ b/geogebra/kernel/GeoNumeric.java
@@ -25,6 +25,7 @@ import geogebra.kernel.arithmetic.Function;
 import geogebra.kernel.arithmetic.FunctionVariable;
 import geogebra.kernel.arithmetic.MyDouble;
 import geogebra.kernel.arithmetic.NumberValue;
+import geogebra.main.Application;
 
 import java.util.Comparator;
 import java.util.HashSet;
@@ -42,6 +43,7 @@ implements NumberValue,  AbsoluteScreenLocateable, GeoFunctionable, Animatable {
 	private static final long serialVersionUID = 1L;
 	private static int DEFAULT_SLIDER_WIDTH_RW = 4;
 	private static int DEFAULT_SLIDER_WIDTH_PIXEL = 100;	
+	private static int DEFAULT_SLIDER_WIDTH_PIXEL_ANGLE = 72;	
 	double DEFAULT_SLIDER_MIN = -5;
 	double DEFAULT_SLIDER_MAX = 5;
 	
@@ -60,7 +62,7 @@ implements NumberValue,  AbsoluteScreenLocateable, GeoFunctionable, Animatable {
 	private boolean intervalMaxActive = false;
 	private double intervalMin = Double.NEGATIVE_INFINITY;
 	private double intervalMax = Double.POSITIVE_INFINITY; 
-	private double sliderWidth = DEFAULT_SLIDER_WIDTH_PIXEL;
+	private double sliderWidth = this instanceof GeoAngle ? DEFAULT_SLIDER_WIDTH_PIXEL_ANGLE : DEFAULT_SLIDER_WIDTH_PIXEL;
 	private double sliderX, sliderY;
 	private boolean sliderFixed = false;
 	private boolean sliderHorizontal = true;
@@ -575,7 +577,7 @@ implements NumberValue,  AbsoluteScreenLocateable, GeoFunctionable, Animatable {
 	public void setAbsoluteScreenLocActive(boolean flag) {
 		hasAbsoluteScreenLocation = flag;			
 		if (flag)
-			sliderWidth = DEFAULT_SLIDER_WIDTH_PIXEL;
+			sliderWidth = this instanceof GeoAngle ? DEFAULT_SLIDER_WIDTH_PIXEL_ANGLE : DEFAULT_SLIDER_WIDTH_PIXEL;
 		else 
 			sliderWidth = DEFAULT_SLIDER_WIDTH_RW;
 	}
diff --git a/geogebra/kernel/GeoPoint.java b/geogebra/kernel/GeoPoint.java
index e80368a..f9bac8c 100644
--- a/geogebra/kernel/GeoPoint.java
+++ b/geogebra/kernel/GeoPoint.java
@@ -536,18 +536,24 @@ Translateable, PointRotateable, Mirrorable, Dilateable, PointProperties {
 		
 		// calculate the determinante of ABC
 		// det(ABC) = sum1 - sum2		
+		
 		double sum1 = A.x * B.y * C.z + 
-					  B.x * C.y * A.z +
-					  C.x * A.y * B.z;
+		B.x * C.y * A.z +
+		C.x * A.y * B.z;
 		double sum2 = A.z * B.y * C.x +
-					  B.z * C.y * A.x +
-					  C.z * A.y * B.x;
+		B.z * C.y * A.x +
+		C.z * A.y * B.x;
 				
-		// det(ABC) == 0  <=>  sum1 == sum2		
-		return Kernel.isEqual(sum1, sum2, Kernel.MIN_PRECISION);
+		// det(ABC) == 0  <=>  sum1 == sum2	
+		
+		// A.z, B.z, C.z could be zero
+		double eps = Math.max(Kernel.MIN_PRECISION, Kernel.MIN_PRECISION * A.z
+				* B.z * C.z);
+		
+		return Kernel.isEqual(sum1, sum2, eps );
 	}
-    
-    /**
+
+	/**
      * Calcs determinant of P and Q. Note: no test for defined or infinite is done here.
      */
 	public static final double det(GeoPoint P, GeoPoint Q) {		 
diff --git a/geogebra/kernel/GeoPolygon.java b/geogebra/kernel/GeoPolygon.java
index 1b49c7c..d83bf7c 100644
--- a/geogebra/kernel/GeoPolygon.java
+++ b/geogebra/kernel/GeoPolygon.java
@@ -222,6 +222,9 @@ final public class GeoPolygon extends GeoElement implements NumberValue, Path {
 			}
 		}			
 		
+		// make sure segments created visible if appropriate
+		setDefined();
+		
 		// create missing segments
         for (int i=0; i < segments.length; i++) {
         	GeoPoint startPoint = points[i];
@@ -235,6 +238,7 @@ final public class GeoPolygon extends GeoElement implements NumberValue, Path {
                 // refresh color to ensure segments have same color as polygon:
                 segments[i].setObjColor(getObjectColor()); 
                 segments[i].setLineThickness(getLineThickness()); 
+                segments[i].setEuclidianVisible(i == 0 ? isEuclidianVisible() : segments[0].isEuclidianVisible());
                 //segments[i].setAuxiliaryObject(true);
         	}     
         }         
diff --git a/geogebra/kernel/GeoRay.java b/geogebra/kernel/GeoRay.java
index c914f1d..9a42608 100644
--- a/geogebra/kernel/GeoRay.java
+++ b/geogebra/kernel/GeoRay.java
@@ -238,10 +238,11 @@ final public class GeoRay extends GeoLine implements LimitedPath {
 	}
     // Michael Borcherds 2008-04-30
 	final public boolean isEqual(GeoElement geo) {
-		// return false if it's a different type, otherwise use equals() method
-		return false;
-		// TODO?
-		//if (geo.isGeoLocus()) return xxx else return false;
+		// return false if it's a different type, otherwise check direction and start point
+		if (!geo.isGeoRay()) return false;
+		
+		return isSameDirection((GeoLine)geo) && ((GeoRay)geo).getStartPoint().isEqual(getStartPoint());
+
 	}
 	
 }
diff --git a/geogebra/kernel/GeoSegment.java b/geogebra/kernel/GeoSegment.java
index 0825949..2a62c4c 100644
--- a/geogebra/kernel/GeoSegment.java
+++ b/geogebra/kernel/GeoSegment.java
@@ -255,11 +255,24 @@ final public class GeoSegment extends GeoLine implements LimitedPath, NumberValu
 	 * Path interface
 	 */	 
 	public void pointChanged(GeoPoint P) {
+		PathParameter pp = P.getPathParameter();
+		
+		// special case: segment of length 0
+		if (length == 0) {
+			P.x = startPoint.inhomX;
+			P.y = startPoint.inhomY;
+			P.z = 1.0;
+			if (!(pp.t >= 0 && pp.t <= 1)) {
+				pp.t = 0.0;
+			}
+			return;
+		}
+		
+		// project point on line
 		super.pointChanged(P);
 			
 		// ensure that the point doesn't get outside the segment
 		// i.e. ensure 0 <= t <= 1 
-		PathParameter pp = P.getPathParameter();
 		if (pp.t < 0.0) {
 			P.x = startPoint.x;
 			P.y = startPoint.y;
@@ -274,8 +287,19 @@ final public class GeoSegment extends GeoLine implements LimitedPath, NumberValu
 	}
 
 	public void pathChanged(GeoPoint P) {
-	
 		PathParameter pp = P.getPathParameter();
+		
+		// special case: segment of length 0
+		if (length == 0) {
+			P.x = startPoint.inhomX;
+			P.y = startPoint.inhomY;
+			P.z = 1.0;	
+			if (!(pp.t >= 0 && pp.t <= 1)) {
+				pp.t = 0.0;
+			}
+			return;
+		}
+		
 		if (pp.t < 0.0) {
 			pp.t = 0;
 		} 
@@ -351,6 +375,7 @@ final public class GeoSegment extends GeoLine implements LimitedPath, NumberValu
 			//	create LINE
 			GeoLine transformedLine = kernel.getTransformedLine(type, this, Q, l, vec, n);
 			transformedLine.setLabel(label);
+			transformedLine.setVisualStyleForTransformations(this);
 			GeoElement [] geos = {transformedLine};
 			return geos;
 		}							
diff --git a/geogebra/kernel/GeoVector.java b/geogebra/kernel/GeoVector.java
index 1416aa6..efd4fab 100644
--- a/geogebra/kernel/GeoVector.java
+++ b/geogebra/kernel/GeoVector.java
@@ -510,6 +510,8 @@ implements Path, VectorValue, Locateable, Rotateable {
 								1.0);
 								
 		GeoVec3D.lineThroughPoints(pathStartPoint, pathEndPoint, pathSegment);
+		// length is used in GeoSement.pointChanged() and GeoSegment.pathChanged()
+		pathSegment.calcLength(); 
 	}
 	
 	public boolean isGeoVector() {
diff --git a/geogebra/kernel/Kernel.java b/geogebra/kernel/Kernel.java
index d19e948..0e4d7fe 100644
--- a/geogebra/kernel/Kernel.java
+++ b/geogebra/kernel/Kernel.java
@@ -1774,6 +1774,17 @@ public class Kernel {
 		return t;
 	}
 
+	/** 
+	 * Text of geo.
+	 */
+	final public GeoText Text(
+		String label,
+		GeoElement geo, GeoPoint p, GeoBoolean substituteVars, GeoBoolean latex) {
+		AlgoText algo = new AlgoText(cons, label, geo, p, substituteVars, latex);
+		GeoText t = algo.getGeoText();
+		return t;
+	}
+	
 	/**
 	 * Row of geo.
 	 */
@@ -4158,7 +4169,6 @@ public class Kernel {
 		AlgoDilate algo = new AlgoDilate(cons, label, geoRot, r, S);
 		GeoElement ret = algo.getResult();
 		ret.setVisualStyleForTransformations((GeoElement) geoRot);
-		ret.update();
 		GeoElement[] geos = { ret };
 		return geos;
 	}
@@ -4179,7 +4189,6 @@ public class Kernel {
 		AlgoMirror algo = new AlgoMirror(cons, label, geoMir, Q);
 		GeoElement ret = algo.getResult();
 		ret.setVisualStyleForTransformations((GeoElement) geoMir);
-		ret.update();
 		GeoElement[] geos = { ret };
 		return geos;
 	}
@@ -4194,7 +4203,6 @@ public class Kernel {
 		AlgoMirror algo = new AlgoMirror(cons, label, Q, conic);
 		GeoElement ret = algo.getResult();
 		ret.setVisualStyleForTransformations((GeoElement) Q);
-		ret.update();
 		GeoElement[] geos = { ret };
 		return geos;
 	}
@@ -4222,7 +4230,6 @@ public class Kernel {
 		AlgoMirror algo = new AlgoMirror(cons, label, geoMir, g);
 		GeoElement ret = algo.getResult();
 		ret.setVisualStyleForTransformations((GeoElement) geoMir);
-		ret.update();
 		GeoElement[] geos = { ret };
 		return geos;
 	}
@@ -4246,7 +4253,6 @@ public class Kernel {
 			newPoints[i] = (GeoPoint) Translate(transformedGeoLabel(points[i]),
 					points[i], v)[0];
 			newPoints[i].setVisualStyleForTransformations(points[i]);
-			newPoints[i].update();
 		}
 		return newPoints;
 	}
@@ -4287,7 +4293,6 @@ public class Kernel {
 			else
 				rotPoints[i] = (GeoPoint) Rotate(pointLabel, points[i], phi, Q)[0];
 			rotPoints[i].setVisualStyleForTransformations(points[i]);
-			rotPoints[i].update();
 		}
 		return rotPoints;
 	}
@@ -4307,7 +4312,6 @@ public class Kernel {
 			String pointLabel = transformedGeoLabel(points[i]);
 			newPoints[i] = (GeoPoint) Dilate(pointLabel, points[i], r, S)[0];
 			newPoints[i].setVisualStyleForTransformations(points[i]);
-			newPoints[i].update();
 		}
 		return newPoints;
 	}
@@ -4338,7 +4342,6 @@ public class Kernel {
 			else
 				newPoints[i] = (GeoPoint) Mirror(pointLabel, points[i], Q)[0];
 			newPoints[i].setVisualStyleForTransformations(points[i]);
-			newPoints[i].update();
 		}
 		return newPoints;
 	}
@@ -4363,7 +4366,6 @@ public class Kernel {
 			transformedPoints[i].setEuclidianVisible(oldPoints[i]
 					.isSetEuclidianVisible());
 			transformedPoints[i].setVisualStyleForTransformations(oldPoints[i]);
-			transformedPoints[i].update();
 			notifyUpdate(transformedPoints[i]);
 		}
 
@@ -4429,7 +4431,6 @@ public class Kernel {
 		for (int i = 0; i < points.length; i++) {
 			result[i].setEuclidianVisible(points[i].isSetEuclidianVisible());
 			result[i].setVisualStyleForTransformations(points[i]);
-			result[i].update();
 			notifyUpdate(result[i]);
 		}
 		return result;
@@ -4472,7 +4473,6 @@ public class Kernel {
 			return null;
 		}
 		ret.setVisualStyleForTransformations(line);
-		ret.update();
 		return ret;
 	}
 
@@ -4514,7 +4514,6 @@ public class Kernel {
 		}
 
 		ret.setVisualStyleForTransformations(conic);
-		ret.update();
 		return ret;
 	}
 
@@ -5374,8 +5373,11 @@ public class Kernel {
 	 * Uses current NumberFormat nf to format a number.
 	 */
 	final private String formatNF(double x) {
-		if (-PRINT_PRECISION < x && x < PRINT_PRECISION) {
-			// avoid output of "-0"
+		// "<=" catches -0.0000000000000005
+		// should be rounded to -0.000000000000001 (15 d.p.)
+		// but nf.format(x) returns "-0" 
+		if (-PRINT_PRECISION / 2 <= x && x < PRINT_PRECISION / 2) {
+			// avoid output of "-0" for eg -0.0004
 			return "0";
 		} else {
 			// standard case
@@ -5518,13 +5520,18 @@ public class Kernel {
 	private StringBuffer sbFormatSigned = new StringBuffer(40);
 
 	final public StringBuffer formatAngle(double phi) {
+		return formatAngle(phi, 10);
+	}
+	
+	final public StringBuffer formatAngle(double phi, double precision) {
 		sbFormatAngle.setLength(0);
 		switch (casPrintForm) {
 		case ExpressionNode.STRING_TYPE_MATH_PIPER:
 		case ExpressionNode.STRING_TYPE_JASYMCA:
 			if (angleUnit == ANGLE_DEGREE) {
 				sbFormatAngle.append("(");
-				sbFormatAngle.append(format(Math.toDegrees(phi)));
+				// STANDARD_PRECISION * 10 as we need a little leeway as we've converted from radians
+				sbFormatAngle.append(format(checkDecimalFraction(Math.toDegrees(phi), precision)));
 				sbFormatAngle.append("*");
 				sbFormatAngle.append("\u00b0");
 				sbFormatAngle.append(")");
@@ -5548,7 +5555,8 @@ public class Kernel {
 					phi += 360;
 				else if (phi > 360)
 					phi = phi % 360;
-				sbFormatAngle.append(format(phi));
+				// STANDARD_PRECISION * 10 as we need a little leeway as we've converted from radians
+				sbFormatAngle.append(format(checkDecimalFraction(phi, precision)));
 
 				if (casPrintForm == ExpressionNode.STRING_TYPE_GEOGEBRA_XML) {
 					sbFormatAngle.append("*");
@@ -5624,14 +5632,23 @@ public class Kernel {
 	 * 2.800000000000001. If it is, the decimal fraction eg 2.8 is returned,
 	 * otherwise x is returned.
 	 */
-	final public double checkDecimalFraction(double x) {
+	final public double checkDecimalFraction(double x, double precision) {
+		
+		//Application.debug(precision+" ");
+		precision = Math.pow(10, Math.floor(Math.log(Math.abs(precision))/Math.log(10)));
+		
 		double fracVal = x * INV_MIN_PRECISION;
 		double roundVal = Math.round(fracVal);
-		if (isEqual(fracVal, roundVal))
+		//Application.debug(precision+" "+x+" "+fracVal+" "+roundVal+" "+isEqual(fracVal, roundVal, precision)+" "+roundVal / INV_MIN_PRECISION);
+		if (isEqual(fracVal, roundVal, STANDARD_PRECISION * precision))
 			return roundVal / INV_MIN_PRECISION;
 		else
 			return x;
 	}
+	
+	final public double checkDecimalFraction(double x) {
+		return checkDecimalFraction(x, 1);
+	}
 
 	/**
 	 * Checks if x is very close (1E-8) to an integer. If it is, the integer
@@ -5783,7 +5800,7 @@ public class Kernel {
 
 	final public void udpateNeedToShowAnimationButton() {
 		if (animationManager != null)
-			animationManager.udpateNeedToShowAnimationButton();
+			animationManager.updateNeedToShowAnimationButton();
 
 	}
 
diff --git a/geogebra/kernel/Relation.java b/geogebra/kernel/Relation.java
index 49a40be..fc35960 100644
--- a/geogebra/kernel/Relation.java
+++ b/geogebra/kernel/Relation.java
@@ -86,12 +86,26 @@ public class Relation extends java.lang.Object {
         
 		else if (a instanceof NumberValue && b instanceof NumberValue)
 			return relation((NumberValue) a, (NumberValue) b);
+		else if (a instanceof GeoList && b instanceof GeoList)
+			return relation((GeoList) a, (GeoList) b);
 		else {
            return app.getPlain("AandBcannotBeCompared",a.getNameDescription(),b.getNameDescription());
         }
     }
 
     /**
+     * description of the relation between two lists a, b
+     * (equal, unequal)
+     */
+    final private String relation(GeoList a, GeoList b) {
+        kernel.setMinPrecision();
+        String str = equalityString(a.toGeoElement(), b.toGeoElement(), 
+        							a.isEqual(b));
+        kernel.resetPrecision();
+        return str;
+    }
+
+    /**
      * description of the relation between two numbers a, b
      * (equal, unequal)
      */
diff --git a/geogebra/kernel/UndoManager.java b/geogebra/kernel/UndoManager.java
index 3f1a62f..e643478 100644
--- a/geogebra/kernel/UndoManager.java
+++ b/geogebra/kernel/UndoManager.java
@@ -186,8 +186,13 @@ public class UndoManager {
 		// create temp file
 		File tempFile = File.createTempFile(TEMP_FILE_PREFIX, ".ggb");
 		// Remove when program ends
-		tempFile.deleteOnExit();
-
+		
+		try {
+			tempFile.deleteOnExit();
+		} catch (ExceptionInInitializerError e) {} // stop error message on --help
+		
+		
+		
 		// create file
 		FileOutputStream fos = new FileOutputStream(tempFile);
 		MyXMLio.writeZipped(fos, undoXML); 		
@@ -204,8 +209,12 @@ public class UndoManager {
 					// load from file
 					File tempFile = (File) info;
 					InputStream is = new FileInputStream(tempFile);	
+					
 					// load undo info
-					xmlio.readZipFromMemory(is);					
+					if (app.isApplet()) app.getApplet().disableListeners();
+					xmlio.readZipFromMemory(is);				
+					if (app.isApplet()) app.getApplet().enableListeners();
+					
 					is.close();
 				} 
 				catch (Exception e) {
diff --git a/geogebra/kernel/arithmetic/ExpressionNode.java b/geogebra/kernel/arithmetic/ExpressionNode.java
index 8b759d8..857e969 100644
--- a/geogebra/kernel/arithmetic/ExpressionNode.java
+++ b/geogebra/kernel/arithmetic/ExpressionNode.java
@@ -45,7 +45,9 @@ implements ExpressionValue {
 	public static final int STRING_TYPE_GEOGEBRA = 1;
 	public static final int STRING_TYPE_JASYMCA = 2;
 	public static final int STRING_TYPE_MATH_PIPER = 3;
-	public static final int STRING_TYPE_LATEX = 100;
+	public static final int STRING_TYPE_LATEX = 4;
+	public static final int STRING_TYPE_PSTRICKS = 5;
+	public static final int STRING_TYPE_PGF = 6;
 	
 	public static final String UNICODE_PREFIX = "uNiCoDe";
 	public static final String UNICODE_DELIMITER = "U";  
@@ -53,17 +55,17 @@ implements ExpressionValue {
 	private static final int NO_OPERATION = Integer.MIN_VALUE; 
     
 	// boolean
-	public static final int NOT_EQUAL = -100;
-	public static final int NOT = -99;
-	public static final int OR = -98;
-    public static final int AND = -97;
-    public static final int EQUAL_BOOLEAN = -96;
-    public static final int LESS = -95;
-    public static final int GREATER = -94;
-    public static final int LESS_EQUAL = -93;
-    public static final int GREATER_EQUAL = -92;    
-    public static final int PARALLEL = -91;  
-    public static final int PERPENDICULAR = -90;
+	public static final int NOT_EQUAL = -11;
+	public static final int NOT = -10;
+	public static final int OR = -9;
+    public static final int AND = -8;
+    public static final int EQUAL_BOOLEAN = -7;
+    public static final int LESS = -6;
+    public static final int GREATER = -5;
+    public static final int LESS_EQUAL = -4;
+    public static final int GREATER_EQUAL = -3;    
+    public static final int PARALLEL = -2;  
+    public static final int PERPENDICULAR = -1;
     
     public static final String strNOT = "\u00ac";
     public static final String strAND = "\u2227";
@@ -113,20 +115,20 @@ implements ExpressionValue {
     public static final int COMPLEXMULTIPLY = 33; // TODO remove
     public static final int VECTORPRODUCT = 33;
      
-    public static final int FUNCTION = 100;
-    public static final int VEC_FUNCTION = 101;
-    public static final int DERIVATIVE = 110;   
+    public static final int FUNCTION = 34;
+    public static final int VEC_FUNCTION = 35;
+    public static final int DERIVATIVE = 36;   
     
     // spreadsheet absolute reference using $ signs
-    public static final int $VAR_ROW = 501;
-    public static final int $VAR_COL = 502;
-    public static final int $VAR_ROW_COL = 503;
+    public static final int $VAR_ROW = 37;
+    public static final int $VAR_COL = 38;
+    public static final int $VAR_ROW_COL = 39;
     
     private Application app;
     private Kernel kernel;
     private ExpressionValue left, right; 
     int operation = NO_OPERATION;
-    private boolean forceVector = false, forcePoint = false;
+    private boolean forceVector = false, forcePoint = false, forceFunction = false;
     
     private boolean holdsLaTeXtext = false;
     
@@ -243,6 +245,7 @@ implements ExpressionValue {
         // set member vars that are not set by constructors
         newNode.forceVector = forceVector;
         newNode.forcePoint = forcePoint;
+        newNode.forceFunction = forceFunction;
         //Application.debug("getCopy() output: " + newNode);   
         return newNode;
     }        
@@ -606,15 +609,40 @@ implements ExpressionValue {
             }     
             // list + vector 
             else if (lt.isListValue() && rt.isVectorValue()) { 
-                vec = ((VectorValue)rt).getVector();
-                GeoVec2D.add(vec, ((ListValue)lt) , vec);                                         
-                return vec;
+            	MyList list = ((ListValue)lt).getMyList();
+            	if (list.size() > 0) {
+	            	ExpressionNode en = list.getListElement(0);
+	            	ExpressionValue ev = en.evaluate();
+	            	if (ev.isNumberValue()) { // eg {1,2} + (1,2) treat as point + point
+		                vec = ((VectorValue)rt).getVector();
+		                GeoVec2D.add(vec, ((ListValue)lt) , vec);                                         
+		                return vec;
+	            	}
+            	}
+            	// not a list with numbers, do list operation
+            	MyList myList = ((ListValue) lt).getMyList();
+            	// list lt operation rt
+            	myList.applyRight(operation, rt);
+            	return myList;
+     
             }     
             // vector + list 
             else if (rt.isListValue() && lt.isVectorValue()) { 
-                vec = ((VectorValue)lt).getVector();
-                GeoVec2D.add(vec, ((ListValue)rt) , vec);                                         
-                return vec;
+            	MyList list = ((ListValue)rt).getMyList();
+            	if (list.size() > 0) {
+	            	ExpressionNode en = list.getListElement(0);
+	            	ExpressionValue ev = en.evaluate();
+	            	if (ev.isNumberValue()) { // eg {1,2} + (1,2) treat as point + point
+	                    vec = ((VectorValue)lt).getVector();
+	                    GeoVec2D.add(vec, ((ListValue)rt) , vec);                                         
+	                    return vec;
+	            	}
+            	}
+            	// not a list with numbers, do list operation
+            	MyList myList = ((ListValue) rt).getMyList();
+            	// lt operation list rt
+            	myList.applyLeft(operation, lt);
+            	return myList;
             }     
             // text concatenation (left)
             else if (lt.isTextValue()) { 
@@ -1701,7 +1729,24 @@ implements ExpressionValue {
     		
 			return new MyBoolean(strL.equals(strR));      
     	}
-    	else if (lt.isGeoElement() && rt.isGeoElement()) {
+	 else if (lt.isListValue() && rt.isListValue()) {
+		
+		MyList list1 = ((ListValue)lt).getMyList();
+		MyList list2 = ((ListValue)rt).getMyList();
+		
+		int size = list1.size();
+		
+		if ( size != list2.size())
+			return new MyBoolean(false );
+		
+		for (int i = 0 ; i < size ; i++) {
+			if (!evalEquals(list1.getListElement(i).evaluate(), list2.getListElement(i).evaluate()).getBoolean())
+				return new MyBoolean(false);
+		}
+		
+		return new MyBoolean(true);
+		
+	 } else if (lt.isGeoElement() && rt.isGeoElement()) {
     		GeoElement geo1 = (GeoElement) lt;
     		GeoElement geo2 = (GeoElement) rt;
     		
@@ -2118,6 +2163,15 @@ implements ExpressionValue {
     	return forcePoint;
     }
     
+    public void setForceFunction() {
+        // this expression should be considered as a point, not a vector
+        forceFunction = true;
+    }
+    
+    final public boolean isForcedFunction() {
+    	return forceFunction;
+    }
+    
     /** 
      * Returns whether this tree has any operations
      */
@@ -2563,32 +2617,30 @@ implements ExpressionValue {
 	                    break;
 	                    
 	                default:
-	                	// TODO: remove
-//	                	System.out.println("PLUS: left: " + leftStr + " " + isEqualString(left, 0, !valueForm) +
-//	                			", right: " + isEqualString(left, 0, !valueForm) + " " + rightStr);
-	                	
 	                    // check for 0
-            			if (isEqualString(left, 0, !valueForm)) {
-		            		if (right.isLeaf() || opID(right) >= PLUS) {
-	        					sb.append(rightStr);
-	        				} else {
-	        					sb.append('(');
-	    	                    sb.append(rightStr);
-	    	                    sb.append(')'); 
-	        				}
-        		    		break;
-            			} 
-            			else if (isEqualString(right, 0, !valueForm)) {
-            				if (left.isLeaf() || opID(left) >= PLUS) {
-	        					sb.append(leftStr);
-	        				} else {
-	        					sb.append('(');
-	    	                    sb.append(leftStr);
-	    	                    sb.append(')'); 
-	        				}
-        		    		break;
-            			}
-	                	            			
+	                	if (valueForm) {
+	            			if (isEqualString(left, 0, !valueForm)) {
+			            		if (right.isLeaf() || opID(right) >= PLUS) {
+		        					sb.append(rightStr);
+		        				} else {
+		        					sb.append('(');
+		    	                    sb.append(rightStr);
+		    	                    sb.append(')'); 
+		        				}
+	        		    		break;
+	            			} 
+	            			else if (isEqualString(right, 0, !valueForm)) {
+	            				if (left.isLeaf() || opID(left) >= PLUS) {
+		        					sb.append(leftStr);
+		        				} else {
+		        					sb.append('(');
+		    	                    sb.append(leftStr);
+		    	                    sb.append(')'); 
+		        				}
+	        		    		break;
+	            			}
+	                	}
+	               
 	                	// we need parantheses around right text
 	                	// if right is not a leaf expression or
 	                	// it is a leaf GeoElement without a label (i.e. it is calculated somehow)        
@@ -2629,14 +2681,13 @@ implements ExpressionValue {
 	                    break;
 	                    
 	                default:
-		                sb.append(leftStr);   
-		                
+	                	sb.append(leftStr);
+	                	
 		                // check for 0 at right
-	        			if (rightStr.equals("0")) {
+	        			if (valueForm && rightStr.equals("0")) {
 	    		    		break;
 	        			}
-		                
-		                
+
 		                if (right.isLeaf() || opID(right) >= MULTIPLY) { // not +, -                    
 		                    if (rightStr.charAt(0) == '-') { // convert - - to +
 		                        sb.append(" + ");
@@ -2766,7 +2817,9 @@ implements ExpressionValue {
 	                } else {
 	                    if (nounary) {
 	                    	switch (STRING_TYPE) {
-	                			case STRING_TYPE_GEOGEBRA_XML:
+                			case STRING_TYPE_GEOGEBRA_XML:
+                			case STRING_TYPE_PGF:
+                			case STRING_TYPE_PSTRICKS:
 	                				sb.append(" * ");  
 	                				break;
 	                				
@@ -2841,13 +2894,13 @@ implements ExpressionValue {
 						
 						/* removed Michael Borcherds 2009-02-08
 						 * doesn't work eg  m=1   g(x) = (x - 1)^m (x - 3)
-						 */
+						 *
 						 
 					    // check for 1 in exponent
             			if (isEqualString(right, 1, !valueForm)) {
             				sb.append(leftStr);
             				break;
-            			}   
+            			}   //*/
             			
             	
 		                // left wing                   	
@@ -2975,6 +3028,10 @@ implements ExpressionValue {
             			sb.append("Cos(");
             			break;
             			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("COS(");  
+	                	break;
+        			
             		default:
             			sb.append("cos(");         		
             	}    		
@@ -2992,6 +3049,10 @@ implements ExpressionValue {
 	        			sb.append("Sin(");
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("SIN(");  
+	                	break;
+        			
 	        		default:
 	        			sb.append("sin(");         		
 	        	}           		
@@ -3009,6 +3070,10 @@ implements ExpressionValue {
 	        			sb.append("Tan(");
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("TAN(");  
+	                	break;
+        			
 	        		default:
 	        			sb.append("tan(");         		
 	        	}            		
@@ -3026,6 +3091,10 @@ implements ExpressionValue {
 	        			sb.append("ArcCos(");
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("ACOS(");  
+	                	break;
+        			
 	        		default:
 	        			sb.append("acos(");         		
 	        	}  	             	
@@ -3043,6 +3112,10 @@ implements ExpressionValue {
 	        			sb.append("ArcSin(");
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("ASIN(");  
+	                	break;
+        			
 	        		default:
 	        			sb.append("asin(");         		
 	        	}  	   
@@ -3060,6 +3133,10 @@ implements ExpressionValue {
 	        			sb.append("ArcTan(");
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("ATAN(");  
+	                	break;
+        			
 	        		default:
 	        			sb.append("atan(");         		
 	        	}  	        	      
@@ -3077,6 +3154,10 @@ implements ExpressionValue {
 	        			sb.append("Cosh(");
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("COSH(");  
+	                	break;
+        			
 	        		default:
 	        			sb.append("cosh(");         		
 	        	}  	         	       		                
@@ -3094,6 +3175,10 @@ implements ExpressionValue {
 	        			sb.append("Sinh(");
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("SINH(");  
+	                	break;
+        			
 	        		default:
 	        			sb.append("sinh(");         		
 	        	}    		                 
@@ -3111,6 +3196,10 @@ implements ExpressionValue {
 	        			sb.append("Tanh(");
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("TANH(");  
+	                	break;
+        			
 	        		default:
 	        			sb.append("tanh(");         		
 	        	}    	
@@ -3128,6 +3217,10 @@ implements ExpressionValue {
 	        			sb.append("ArcCosh(");
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("ACOSH(");  
+	                	break;
+        			
 	        		default:
 	        			sb.append("acosh(");         		
 	        	}           	        	            	
@@ -3145,6 +3238,10 @@ implements ExpressionValue {
 	        			sb.append("ArcSinh(");
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("ASINH(");  
+	                	break;
+        			
 	        		default:
 	        			sb.append("asinh(");         		
 	        	}               	
@@ -3162,6 +3259,10 @@ implements ExpressionValue {
 	        			sb.append("ArcTanh(");
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("ATANH(");  
+	                	break;
+        			
 	        		default:
 	        			sb.append("atanh(");         		
 	        	}      
@@ -3177,6 +3278,12 @@ implements ExpressionValue {
 	        			 sb.append('}');
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("EXP(");  
+	        			sb.append(leftStr);
+	        			sb.append(')');
+	                	break;
+        			
 	        		case STRING_TYPE_MATH_PIPER:
 	        			sb.append("Exp(");
 	        			sb.append(leftStr);
@@ -3219,6 +3326,8 @@ implements ExpressionValue {
 	        			sb.append("log(");	        			
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:		
+        			case STRING_TYPE_PGF:
 	        		default:
 	        			sb.append("ln("); 
 	        			break;
@@ -3229,12 +3338,24 @@ implements ExpressionValue {
                 
             case LOG10:
             	switch (STRING_TYPE) {
-	        		case STRING_TYPE_LATEX:
+        			case STRING_TYPE_LATEX:
 	        			sb.append("\\log_{10}(");
 	        			sb.append(leftStr);
 	                    sb.append(')');
 	        			break;
-	        			
+        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("log(");  
+	        			sb.append(leftStr);
+	        			sb.append(')');
+	                	break;
+        			
+        			case STRING_TYPE_PGF:
+	        			sb.append("log10(");  
+	        			sb.append(leftStr);
+	        			sb.append(')');
+	                	break;
+        			
 	        		case STRING_TYPE_MATH_PIPER:
 	        			sb.append("Ln(");
 	        			sb.append(leftStr);
@@ -3402,6 +3523,12 @@ implements ExpressionValue {
 		                sb.append(')');
 	        			break;
 	        			
+        			case STRING_TYPE_PSTRICKS:
+	        			sb.append("ceiling(");  
+	        			sb.append(leftStr);
+	        			sb.append(')');
+	                	break;
+
 	        		default:
 	        			sb.append("ceil(");  
 		        		sb.append(leftStr);
diff --git a/geogebra/kernel/arithmetic/Function.java b/geogebra/kernel/arithmetic/Function.java
index 1ea298f..9e094b5 100644
--- a/geogebra/kernel/arithmetic/Function.java
+++ b/geogebra/kernel/arithmetic/Function.java
@@ -224,7 +224,7 @@ implements ExpressionValue, RealRootFunction, Functional {
      * numerical value, i.e. it is of the form f(x) = c.
      */
     final public boolean isConstantFunction() {
-    	return isConstantFunction;
+    	return isConstantFunction || !expression.contains(fVar);
     }      
     
     public boolean isConstant() {
diff --git a/geogebra/kernel/commands/AlgebraProcessor.java b/geogebra/kernel/commands/AlgebraProcessor.java
index 633cf18..ec90046 100644
--- a/geogebra/kernel/commands/AlgebraProcessor.java
+++ b/geogebra/kernel/commands/AlgebraProcessor.java
@@ -112,6 +112,8 @@ public class AlgebraProcessor {
 					n.setForcePoint();
 				else if (geo.isGeoVector())
 					n.setForceVector();
+				else if (geo.isGeoFunction())
+					n.setForceFunction();
 			}
 
 			if (newLabel.equals(oldLabel)) {
@@ -856,7 +858,11 @@ public class AlgebraProcessor {
 				ret[0] = new GeoNumeric(cons, label, value);
 		} else {
 			ret[0] = kernel.DependentNumber(label, n, isAngle);
-		}		
+		}	
+		
+		if (n.isForcedFunction()) {
+			ret[0] = ((GeoFunctionable)(ret[0])).getGeoFunction();
+		}
 		
 		return ret;
 	}
diff --git a/geogebra/kernel/commands/CmdPolygon.java b/geogebra/kernel/commands/CmdPolygon.java
index 0d4e4ee..c8178c3 100644
--- a/geogebra/kernel/commands/CmdPolygon.java
+++ b/geogebra/kernel/commands/CmdPolygon.java
@@ -25,6 +25,8 @@ public GeoElement[] process(Command c) throws MyError {
 
     arg = resArgs(c);
     switch (n) {
+    	case 0:
+    		throw argNumErr(app, "Polygon", n);
     	case 3:        
         // regular polygon
         if (arg[0].isGeoPoint() && 
diff --git a/geogebra/kernel/commands/CmdText.java b/geogebra/kernel/commands/CmdText.java
index 437627a..60e12e6 100644
--- a/geogebra/kernel/commands/CmdText.java
+++ b/geogebra/kernel/commands/CmdText.java
@@ -57,6 +57,18 @@ public class CmdText extends CommandProcessor {
 			else
 				throw argErr(app, c.getName(), ok ? arg[2] : arg[1]);     
 
+		case 4:
+			boolean ok1 = false;
+			arg = resArgs(c);	
+			if ((ok = arg[1].isGeoPoint()) && (ok1 = arg[2].isGeoBoolean()) && arg[3].isGeoBoolean()) {
+				GeoElement[] ret2 = { kernel.Text(c.getLabel(),
+						arg[0], (GeoPoint)arg[1], (GeoBoolean)arg[2], (GeoBoolean)arg[3]) };
+				return ret2;
+			}
+			else
+				throw argErr(app, c.getName(), ok ? (ok1 ? arg[3] : arg[2]) : arg[1]);     
+
+
 
 		default:
 			throw argNumErr(app, c.getName(), n);
diff --git a/geogebra/kernel/complex/Complex.java b/geogebra/kernel/complex/Complex.java
deleted file mode 100644
index 2b8afc8..0000000
--- a/geogebra/kernel/complex/Complex.java
+++ /dev/null
@@ -1,596 +0,0 @@
-/*
-*   Class   Complex
-*
-*   Defines a complex number as an object and includes
-*   the methods needed for standard complex arithmetic
-*
-*   See class ComplexMatrix for complex matrix manipulations
-*   See class ComplexPoly for complex polynomial manipulations
-*   See class ComplexErrorProp for the error propogation in complex arithmetic
-*
-*   WRITTEN BY: Michael Thomas Flanagan
-*
-*   DATE:    February 2002
-*   UPDATED: 13 April 2004
-*
-*   DOCUMENTATION:
-*   See Michael T Flanagan's JAVA library on-line web page:
-*   Complex.html
-*
-*   Copyright (c) April 2004   Michael Thomas Flanagan
-*
-*   PERMISSION TO COPY:
-*   Permission to use, copy and modify this software and its documentation for
-*   NON-COMMERCIAL purposes is granted, without fee, provided that an acknowledgement
-*   to the author, Michael Thomas Flanagan at www.ee.ucl.ac.uk/~mflanaga, appears in all copies.
-*
-*   Dr Michael Thomas Flanagan makes no representations about the suitability
-*   or fitness of the software for any or for a particular purpose.
-*   Michael Thomas Flanagan shall not be liable for any damages suffered
-*   as a result of using, modifying or distributing this software or its derivatives.
-*
-***************************************************************************************/
-
-
-package geogebra.kernel.complex;
-
-
-final public class Complex{
-
-        // DATA VARIABLES
-        private double real = 0.0D;         // Real part of a complex number
-        private double imag = 0.0D;         // Imaginary part of a complex number
-
-	// SOME USEFUL NUMBERS
-	public static final Complex plusJay = new Complex(0, 1);
-	public static final Complex minusJay = new Complex(0, -1);
-	public static final Complex NaN = new Complex(Double.NaN, Double.NaN);
-
-/*********************************************************/
-
-        // CONSTRUCTORS
-        // default constructor - real and imag = zero
-        public Complex()
-        {
-                real = 0.0D;
-                imag = 0.0D;
-        }
-
-        // constructor - initialises both real and imag
-        public Complex(double real, double imag)
-        {
-                this.real = real;
-                this.imag = imag;
-        }
-
-        // constructor - initialises  real, imag = 0.0
-        public Complex(double real)
-        {
-                this.real = real;
-                imag = 0.0D;
-        }
-
-        // constructor - initialises both real and imag to the values of an existing Complex
-        public Complex(Complex c)
-        {
-                real = c.real;
-                imag = c.imag;
-        }
-
-/*********************************************************/
-
-        // PUBLIC METHODS
-
-        // SET VALUES
-        // Set the value of real
-        final public void setReal(double real){
-        	this.real = real;
-        }
-        
-        // Set the value of imag
-		final public void setImag(double imag){
-             this.imag = imag;
-        }
-
-        // Set the values of real and imag
-        final public void set(double real, double imag){
-                this.real = real;
-                this.imag = imag;
-        }
-        
-	final public void set(Complex c){
-			real = c.real;
-			imag = c.imag;
-	}
-
-        // GET VALUES
-        // Get the value of real
-        public double getReal(){
-                return real;
-        }
-
-        // Get the value of imag
-        public double getImag(){
-                return imag;
-        }
-
-        public String toString(){
-                char ch='+';
-                if(imag<0.0)ch='-';
-                return real+" "+ch+" i "+Math.abs(imag);
-        }  
-
-
-        // ARRAYS
-
-        // Create a one dimensional array of Complex objects of length n
-        // all real = 0 and all imag = 0
-        public static Complex[] oneDarray(int n){
-                Complex[] a =new Complex[n];
-                for(int i=0; i<n; i++){
-                      a[i] = new Complex();
-                }
-                return a;
-        }
-
-
-        // COPY
-        // Copy a single complex number [static method]
-        public static Complex copy(Complex a){
-			return new Complex(a);	
-        }
-   
-        // ADDITION
-        // Add two Complex numbers [static method]
-        public static Complex plus(Complex a, Complex b, Complex c){
-				c.real =a.real+b.real;
-				c.imag=a.imag+b.imag;
-				return c;
-        }
-
-        //  SUBTRACTION
-        //Subtract two Complex numbers [static method]
-        public static Complex minus (Complex a, Complex b, Complex c){
-                c.real=a.real-b.real;
-                c.imag=a.imag-b.imag;
-			return c;
-        }
-
-        //Subtract a double from a Complex number [static method]
-        public static Complex minus(Complex a, double b, Complex c){
-                c.real=a.real-b;
-                c.imag=a.imag;
-			return c;
-        }
-
-        //Subtract a Complex number from a double [static method]
-        public static Complex minus(double a, Complex b, Complex c){
-                c.real=a-b.real;
-                c.imag=-b.imag;
-			return c;
-        }
-
-        //Multiply two Complex numbers [static method]
-        public static Complex times(Complex a, Complex b, Complex c){
-               	double real =a.real*b.real-a.imag*b.imag;
-                double imag =a.real*b.imag+a.imag*b.real;
-                c.real = real;
-                c.imag =  imag;
-			return c;
-        }
-
-        //Multiply a Complex number by a double [static method]
-        public static Complex times(Complex a, double b, Complex c){
-                c.real=a.real*b;
-                c.imag=a.imag*b;
-			return c;
-        }
-
-        // DIVISION
-        //Division of two Complex numbers a/b [static method]
-        public static Complex over(Complex a, Complex b, Complex c){
-        	double real, imag;
-            if(a.isZero()){
-                    if(b.isZero()){
-                            real=Double.NaN;
-                            imag=Double.NaN;
-                    }
-                    else{
-                            real=0.0;
-                            imag=0.0;
-                    }
-            }
-            else{
-                    if(Math.abs(b.real)>=Math.abs(b.imag)){
-							double ratio=b.imag/b.real;
-							double denom=b.real+b.imag*ratio;
-                            real=(a.real+a.imag*ratio)/denom;
-                            imag=(a.imag-a.real*ratio)/denom;
-                    }
-                    else{
-							double ratio=b.real/b.imag;
-							double denom=b.real*ratio+b.imag;
-                            real=(a.real*ratio+a.imag)/denom;
-                            imag=(a.imag*ratio-a.real)/denom;
-                    }
-            }
-           
-			c.real = real;
-			c.imag = imag;
-			return c;
-        }
-
-        //Division of a Complex number, a, by a double, b [static method]
-        public static Complex over(Complex a, double b, Complex c){
-                c.real=a.real/b;
-                c.imag=a.imag/b;
-			return c;
-        }
-
-        //Division of a double, a, by a Complex number, b  [static method]
-        public static Complex over(double a, Complex b, Complex c){
-				double real, imag;
-
-                if(a==0.0){
-                        if(b.isZero()){
-                                real=Double.NaN;
-                                imag=Double.NaN;
-                        }
-                        else{
-                                real=0.0;
-                                imag=0.0;
-                        }
-                }
-                else{
-                        if(Math.abs(b.real)>=Math.abs(b.imag)){
-                                double ratio=b.imag/b.real;
-								double denom=b.real+b.imag*ratio;
-                                real=a/denom;
-                                imag=-a*ratio/denom;
-                        }
-                        else{
-								double ratio=b.real/b.imag;
-								double denom=b.real*ratio+b.imag;
-                                real=a*ratio/denom;
-                                imag=-a/denom;
-                        }
-                }
-				c.real = real;
-				c.imag = imag;
-			return c;
-        }
-
-        //FURTHER MATHEMATICAL FUNCTIONS
-
-        // Negates a Complex number [static method]
-        public static Complex negate(Complex a, Complex c){
-                c.real=-a.real;
-                c.imag=-a.imag;
-                return c;
-        }
-
-        //Absolute value (modulus) of a complex number [static method]
-        public static double abs(Complex a){
-                double rmod = Math.abs(a.real);
-                double imod = Math.abs(a.imag);
-                double ratio = 0.0D;
-                double res = 0.0D;
-
-                if(rmod==0.0){
-                res=imod;
-                }
-                else{
-                if(imod==0.0){
-                        res=rmod;
-                }
-                        if(rmod>=imod){
-                                ratio=a.imag/a.real;
-                                res=rmod*Math.sqrt(1.0 + ratio*ratio);
-                        }
-                        else{
-                                ratio=a.real/a.imag;
-                                res=imod*Math.sqrt(1.0 + ratio*ratio);
-                        }
-                }
-                return res;
-        }
-
-        //Square of the absolute value (modulus) of a complex number [static method]
-        public static double squareAbs(Complex a){
-                return a.real*a.real + a.imag*a.imag;
-        }
-
-        //Argument of a complex number [static method]
-        public static double arg(Complex a){
-                return Math.atan2(a.imag, a.real);
-        }
-
-        //Complex conjugate of a complex number [static method]
-        public static Complex conjugate(Complex a, Complex c){
-                c.real=a.real;
-                c.imag=-a.imag;
-                return c;
-        }
-
-      
-
-        //Exponential of a complex number
-        public static Complex exp(Complex aa, Complex z){
-                double a = aa.real;
-                double b = aa.imag;
-
-                if(b==0.0){
-                        z.real=Math.exp(a);
-                        z.imag=0.0;
-                }
-                else{
-                        if(a==0){
-                                z.real=Math.cos(b);
-                                z.imag=Math.sin(b);
-                        }
-                        else{
-                                double c=Math.exp(a);
-                                z.real=c*Math.cos(b);
-                                z.imag=c*Math.sin(b);
-                        }
-                }
-                return z;
-        }
-
-        //Principal value of the natural log of an Complex number
-        public static Complex log(Complex aa, Complex c){
-                double a=aa.real;
-                double b=aa.imag;
-
-                if(b==0.0){
-                        c.set(Math.log(a),0.0);
-                }
-                else{
-                        c.real=Math.log(Complex.abs(aa));
-                        c.imag=Math.atan2(b,a);
-                }
-                return c;
-        }
-
-        //Roots
-        //Principal value of the square root of a complex number
-        public static Complex sqrt(Complex aa, Complex c  ){
-                double a=aa.real;
-                double b=aa.imag;
-
-                if(b==0.0){
-                        if(a>=0.0){
-                                c.real=Math.sqrt(a);
-                                c.imag=0.0;
-                        }
-                        else{
-                                c.real=0.0;
-                                c.imag= Math.sqrt(-a);
-                        }
-                }
-                else{
-                        double w, ratio;
-                        double amod=Math.abs(a);
-                        double bmod=Math.abs(b);
-                        if(amod>=bmod){
-                                ratio=b/a;
-                                w=Math.sqrt(amod)*Math.sqrt(0.5*(1.0 + Math.sqrt(1.0 + ratio*ratio)));
-                        }
-                        else{
-                                ratio=a/b;
-                                w=Math.sqrt(bmod)*Math.sqrt(0.5*(ratio + Math.sqrt(1.0 + ratio*ratio)));
-                        }
-                        if(a>=0.0){
-                                c.real=w;
-                                c.imag=b/(2.0*w);
-                        }
-                        else{
-                                if(b>=0.0){
-                                        c.imag=w;
-                                        c.real=bmod/(2.0*c.imag);
-                                }
-                                else{
-                                        c.imag=-w;
-                                        c.real=bmod/(2.0*c.imag);
-                                }
-                        }
-                }
-                return c;
-        }
-
-        //Powers
-        // Square of a complex number
-        public static Complex square(Complex aa, Complex c){
-                 double real = aa.real*aa.real-aa.imag*aa.imag;
-                 double imag = 2.0*aa.real*aa.imag;
-                c.real= real;
-                c.imag= imag;
-                return c;
-        }
-
-        // returns a Complex number raised to a Complex power
-        public static Complex pow(Complex a, Complex b, Complex c){
-                Complex.exp(Complex.times(b, Complex.log(a, c), c), c);
-                return c;
-        }
-
-        // Complex trigonometric functions
-
-        //Inverse cosine of a Complex number
-        public static Complex acos(Complex a, Complex c ){
-                sqrt(minus(square(a, c),1.0, c), c);
-                plus(a, c, c);
-                times(minusJay, log(c, c), c);
-                return c;
-        }
-
-        // LOGICAL FUNCTIONS
-        // Returns true if the Complex number has a zero imaginary part, i.e. is a real number
-        public boolean isReal(){
-                return imag==0.0; 
-        }
-
-        // Returns true if the Complex number has a zero real and a zero imaginary part
-        // i.e. has a zero modulus
-        public boolean isZero(){
-              return real == 0.0 && imag == 0.0;
-        }
-
-        public static boolean isEqual(Complex a, Complex b){
-              return  (a.real == b.real && a.imag == b.imag);					      
-        }
-        
-        // returns new zero complex
-        public static Complex zero() {
-        	return new Complex();
-        }
-        
-        // Returns true if the Complex number is set to Double.NaN (i.e. its real OR imaginary part)
-        public static boolean isNaN(Complex c) {
-        	return (Double.isNaN(c.real) || Double.isNaN(c.imag));
-        }
-        
-        
-        
-        // ***********************************************
-        // following bits added from Complex.java Aug 2008
-        // ***********************************************
-      
-        // returns a Complex number raised to a double power
-        public static Complex pow(Complex a, double b){
-                    return  powDouble(a, b);
-        }
-        // Principal value of the natural log of an Complex number
-        public static Complex log(Complex aa ){
-
-                double a=aa.real;
-                double b=aa.imag;
-                Complex c = new Complex();
-
-                c.real=Math.log(Complex.abs(aa));
-                c.imag=Math.atan2(b,a);
-
-                return c;
-        }
-        // Multiply a double by a Complex number [static method]
-        public static Complex times(double a, Complex b){
-                Complex c = new Complex();
-
-                c.real=a*b.real;
-                c.imag=a*b.imag;
-                return c;
-        }
-        
-        // Exponential of a complex number (static method)
-        public static Complex exp(Complex aa){
-                Complex z = new Complex();
-
-                double a = aa.real;
-                double b = aa.imag;
-
-                if(b==0.0D){
-                        z.real=Math.exp(a);
-                        z.imag=0.0D;
-                }
-                else{
-                        if(a==0D){
-                                z.real=Math.cos(b);
-                                z.imag=Math.sin(b);
-                        }
-                        else{
-                                double c=Math.exp(a);
-                                z.real=c*Math.cos(b);
-                                z.imag=c*Math.sin(b);
-                        }
-                }
-                return z;
-        }
-
-
-        // PRIVATE METHODS
-// returns a Complex number raised to a double power
-// this method is used for calculation within this class file
-// see above for corresponding public method
-private static Complex powDouble(Complex a, double b){
-        Complex z = new Complex();
-        double re=a.real;
-        double im=a.imag;
-
-        if(a.isZero()){
-            if(b==0.0){
-                z = new Complex(1.0, 0.0);
-            }
-            else{
-                if(b>0.0){
-                    z = new Complex(0.0, 0.0);
-                }
-                else{
-                    if(b<0.0){
-                        z = new Complex(Double.POSITIVE_INFINITY, 0.0);
-                    }
-                }
-            }
-        }
-        else{
-            if(im==0.0D && re>0.0D){
-                z.real=Math.pow(re, b);
-                z.imag=0.0D;
-            }
-            else{
-                if(re==0.0D){
-                    z=Complex.exp(Complex.times(b, Complex.log(a)));
-                }
-                else{
-                    double c=Math.pow(re*re+im*im, b/2.0D);
-                    double th=Math.atan2(im, re);
-                    z.real=c*Math.cos(b*th);
-                    z.imag=c*Math.sin(b*th);
-                }
-            }
-        }
-        return z;
-}
-
-// returns a Complex number raised to a Complex power
-public static Complex pow(Complex a, Complex b ){
-        Complex c = new Complex();
-        if(a.isZero()){
-            if(b.imag==0){
-                if(b.real==0){
-                    c = new Complex(1.0, 0.0);
-                }
-                else{
-                    if(a.real>0.0){
-                        c = new Complex(0.0, 0.0);
-                    }
-                    else{
-                        if(a.real<0.0){
-                            c = new Complex(Double.POSITIVE_INFINITY, 0.0);
-                        }
-                    }
-                }
-            }
-            else{
-                c=Complex.exp(b.times(Complex.log(a)));
-            }
-        }
-        else{
-            c=Complex.exp(b.times(Complex.log(a)));
-        }
-
-        return c;
-}
-
-// Multiply this Complex number by a Complex number [instance method]
-// this Complex number remains unaltered
-public Complex times(Complex a){
-        Complex b = new Complex();
-
-        b.real=this.real*a.real-this.imag*a.imag;
-        b.imag=this.real*a.imag+this.imag*a.real;
-        return b;
-}
-
-
-}
-
diff --git a/geogebra/kernel/complex/ComplexPoly.java b/geogebra/kernel/complex/ComplexPoly.java
deleted file mode 100644
index 92622ba..0000000
--- a/geogebra/kernel/complex/ComplexPoly.java
+++ /dev/null
@@ -1,425 +0,0 @@
-/*
-*   Class   ComplexPoly
-*
-*   Defines a complex polynomial
-*   y = a[0] + a[1].x + a[2].x^2 + a[3].3 + . . . + a[n].x^n
-*   where x and all a[i] may be real or complex
-*   and deg is the degree of the polynomial, i.e. n,
-*   and includes the methods associated with polynomials,
-*   e.g. complex root searches
-*
-*   WRITTEN BY: Michael Thomas Flanagan
-* 	 changed by Markus Hohenwarter for GeoGebra (12. August 2004)
-*
-*   See class Complex for standard complex arithmetic
-*
-*   DATE:    February 2002
-*   UPDATED: 22 June 2003
-*
-*   DOCUMENTATION:
-*   See Michael Thomas Flanagan's JAVA library on-line web page:
-*   ComplexPoly.html
-*
-*
-*   Copyright (c) April 2004
-*
-*   PERMISSION TO COPY:
-*   Permission to use, copy and modify this software and its documentation for
-*   NON-COMMERCIAL purposes is granted, without fee, provided that an acknowledgement
-*   to the author, Michael Thomas Flanagan at www.ee.ucl.ac.uk/~mflanaga, appears in all copies.
-*
-*   Dr Michael Thomas Flanagan makes no representations about the suitability
-*   or fitness of the software for any or for a particular purpose.
-*   Michael Thomas Flanagan shall not be liable for any damages suffered
-*   as a result of using, modifying or distributing this software or its derivatives.
-*
-***************************************************************************************/
-
-package geogebra.kernel.complex;
-
-public class ComplexPoly{
-
-        // DATA MEMBERS
-        private int deg = 0;            // Degree of the polynomial
-        private int degwz = 0;          // Degree of the polynomial with zero roots removed
-        private Complex[] coeff;        // Array of polynomial coefficients
-        private Complex[] coeffwz;      // Array of polynomial coefficients with zero roots removed
-
-
-
-        // Coefficients are real
-        public ComplexPoly(double[] aa){
-                deg =aa.length-1;
-                coeff = Complex.oneDarray(deg+1);
-                for(int i=0; i<=deg; i++){
-                        coeff[i].set(aa[i], 0.0);
-                }
-        }
-
-        // Single constant -  complex
-        // y = aa
-        // needed in class Loop
-        public ComplexPoly(Complex aa){
-                deg = 0;
-                coeff = Complex.oneDarray(1);
-                coeff[0]=Complex.copy(aa);
-        }
-
-        // Single constant -  double
-        // y = aa
-        // needed in class Loop
-        public ComplexPoly(double aa){
-                deg = 0;
-                coeff = Complex.oneDarray(1);
-                coeff[0].set(aa, 0.0);
-        }
-
-        // Straight line - coefficients are complex
-        // y = aa + bb.x
-        public ComplexPoly(Complex aa, Complex bb){
-                deg = 1;
-                coeff = Complex.oneDarray(2);
-                coeff[0]=Complex.copy(aa);
-                coeff[1]=Complex.copy(bb);
-        }
-
-        // Straight line - coefficients are real
-        // y = aa + bb.x
-        public ComplexPoly(double aa, double bb){
-                deg = 1;
-                coeff = Complex.oneDarray(2);
-                coeff[0].set(aa, 0.0);
-                coeff[1].set(bb, 0.0);
-        }
-
-        // Quadratic - coefficients are complex
-        // y = aa + bb.x + cc.x^2
-        public ComplexPoly(Complex aa, Complex bb, Complex cc){
-                deg = 2;
-                coeff = Complex.oneDarray(3);
-                coeff[0]=Complex.copy(aa);
-                coeff[1]=Complex.copy(bb);
-                coeff[2]=Complex.copy(cc);
-        }
-
-        // Quadratic - coefficients are real
-        // y = aa + bb.x + cc.x^2
-        public ComplexPoly(double aa, double bb, double cc){
-                deg = 2;
-                coeff = Complex.oneDarray(3);
-                coeff[0].set(aa, 0.0);
-                coeff[1].set(bb, 0.0);
-                coeff[2].set(cc, 0.0);
-        }
-
-        // Cubic - coefficients are complex
-        // y = aa + bb.x + cc.x^2 + dd.x^3
-        public ComplexPoly(Complex aa, Complex bb, Complex cc, Complex dd){
-                deg = 3;
-                coeff = Complex.oneDarray(4);
-                coeff[0]=Complex.copy(aa);
-                coeff[1]=Complex.copy(bb);
-                coeff[2]=Complex.copy(cc);
-                coeff[3]=Complex.copy(dd);
-        }
-
-        // Cubic - coefficients are real
-        // y = aa + bb.x + cc.x^2 + dd.x^3
-        public ComplexPoly(double aa, double bb, double cc, double dd){
-                deg = 3;
-                coeff = Complex.oneDarray(4);
-                coeff[0].set(aa, 0.0);
-                coeff[1].set(bb, 0.0);
-                coeff[2].set(cc, 0.0);
-                coeff[3].set(dd, 0.0);
-        }
-
-        // METHODS
-
-        // Return a copy of a coefficient
-        public Complex coeffCopy(int i){
-                return Complex.copy(coeff[i]);
-        }
-
-        // Return the degree
-        public int getDeg(){
-                return deg;
-        }
-      
-        // Convert to a String of the form a + jb, c + jd, etc.
-        public String toString(){
-                String ss = "";
-                for(int i=0; i<=deg; i++){
-                        ss =  ss + coeffCopy(i).toString();
-                        if(i<deg)ss = ss + ",  ";
-                }
-                return ss;
-        }
-
-        // ROOTS OF POLYNOMIALS
-        // For general details of root searching and a discussion of the rounding errors
-        // see Numerical Recipes, The Art of Scientific Computing
-        // by W H Press, S A Teukolsky, W T Vetterling & B P Flannery
-        // Cambridge University Press,   http://www.nr.com/
-
-        // Calculate the roots (real or complex) of a polynomial (real or complex)
-        // polish = true ([for deg>3 see laguerreAll(...)]
-        // initial root estimates are all zero [for deg>3 see laguerreAll(...)]
-        public Complex[] roots(){
-                boolean polish=true;
-                Complex estx = new Complex(0.0, 0.0);
-                return roots(polish, estx);
-        }
-
-        // Calculate the roots (real or complex) of a polynomial (real or complex)
-        // initial root estimates are all zero [for deg>3 see laguerreAll(...)]
-        // for polish  see laguerreAll(...)[for deg>3]
-        public Complex[] roots(boolean polish){
-                Complex estx = new Complex(0.0, 0.0);
-                return roots(polish, estx);
-        }
-
-        // Calculate the roots (real or complex) of a polynomial (real or complex)
-        // for estx  see laguerreAll(...)[for deg>3]
-        // polish = true  see laguerreAll(...)[for deg>3]
-        public Complex[] roots(Complex estx){
-                boolean polish=true;
-                return roots(polish, estx);
-        }
-
-        // Calculate the roots (real or complex) of a polynomial (real or complex)
-        public Complex[] roots(boolean polish, Complex estx){
-                if(deg==0)
-					// Application.debug("degree of the polynomial is zero in the method ComplexPoly.roots");
-                   // Application.debug("null returned");
-                    return null;
-
-                // check for zero roots
-                boolean testzero=true;
-                int ii=0, nzeros=0;
-                while(testzero){
-                    if(coeff[ii].isZero()){
-                        nzeros++;
-                        ii++;
-                    }
-                    else{
-                        testzero=false;
-                    }
-                }
-                if(nzeros>0){
-                    degwz = deg - nzeros;
-                    coeffwz = Complex.oneDarray(degwz+1);
-                    for(int i=0; i<=degwz; i++)
-                    	coeffwz[i].set(coeff[i+nzeros]);
-                }
-                else{
-                    degwz = deg;
-                    coeffwz = Complex.oneDarray(degwz+1);
-                    for(int i=0; i<=degwz; i++)coeffwz[i].set(coeff[i]);
-                }
-
-                // calculate non-zero roots
-                Complex[] roots = Complex.oneDarray(deg);
-                
-                // don't use any special cases for degrees 1, 2 or 3 (this is done by GeoGebra)
-                Complex[] root =laguerreAll(polish, estx);
-
-                for(int i=0; i<degwz; i++){
-                       Complex.conjugate(root[i], roots[i]);
-                }
-                if(nzeros>0){
-                    for(int i=degwz; i<deg; i++){
-                        roots[i].set(0,0);
-                    }
-                }
-
-                return roots;
-        }
-
-      
-
-        // LAGUERRE'S METHOD FOR COMPLEX ROOTS OF A COMPLEX POLYNOMIAL
-        
-        	// maximum iteration = 8 * MAX_STEPS
-			public int  MAX_STEPS = 100;      // number of steps in breaking a limit cycle
-              
-				private Complex b   = new Complex();
-				private Complex d   = new Complex();
-				private  Complex f   = new Complex();
-				private  Complex g   = new Complex();
-				private  Complex g2  = new Complex();
-				private  Complex h   = new Complex();
-				private  Complex sq  = new Complex();
-				private  Complex gp  = new Complex();
-				private  Complex gm  = new Complex();
-				private  Complex dx  = new Complex();
-				private  Complex x1  = new Complex();
-				private  Complex temp1  = new Complex();
-				private  Complex temp2  = new Complex();
-				
-				// fractions used to break a limit cycle
-				 private double  frac[]={0.5, 0.25, 0.75, 0.13, 0.38, 0.62, 0.88, 1.0};
-
-        // Laguerre method for one of the roots
-        // Following the procedure in Numerical Recipes for C [Reference above]
-        // estx     estimate of the root
-        // coeff[]  coefficients of the polynomial
-        // m        degree of the polynomial
-        private Complex laguerre(Complex estx, Complex[] pcoeff, int m){
-                double  eps = 1e-7;     // estimated fractional round-off error
-                int     mr = 8;         // number of fractional values in Adam's method of breaking a limit cycle      
-                int     maxit = mr*MAX_STEPS;  // maximum number of iterations allowed
-                Complex root = new Complex();    // root
-
-                double  abp = 0.0D, abm = 0.0D;
-                double  err = 0.0D, abx = 0.0D;
-
-                for(int i=1; i<=maxit; i++){
-                        b.set(pcoeff[m]);
-                        err=Complex.abs(b);
-                        d.set(0,0);
-                        f.set(0,0);
-                        abx=Complex.abs(estx);
-                        for(int j=m-1; j>=0;j--)
-                        {
-                                // Efficient computation of the polynomial and its first two derivatives
-                                f=Complex.plus(Complex.times(estx, f, f),  d, f);
-                                d=Complex.plus(Complex.times(estx, d, d),  b, d);
-                                b=Complex.plus(Complex.times(estx, b, b),  pcoeff[j], b);
-                                err=Complex.abs(b)+abx*err;
-                        }
-                        err*=eps;
-
-                        // Estimate of round-off error in evaluating polynomial
-                        if(Complex.abs(b)<=err)
-                        {
-                                root.set(estx);
-                                return root;
-                        }
-                        // Laguerre formula
-                        g=Complex.over(d, b, g);
-                        g2=Complex.square(g, g2);                       
-                        temp1 = Complex.times(Complex.over(f, b, temp1), 2.0, temp1);
-                        h=Complex.minus(g2, temp1, h);
-                        sq=Complex.sqrt(
-                        		Complex.times(
-                        			Complex.times(
-                        				Complex.times(h, m, sq), 
-                        				g2, sq
-                        			), m-1, sq
-                        		), sq);                     		
-                        gp=Complex.plus(g, sq, gp);
-                        gm=Complex.minus(g, sq, gm);
-                        abp=Complex.abs(gp);
-                        abm=Complex.abs(gm);
-                        if( abp < abm ) gp = gm;
-                        temp1.set(m, 0);
-                        temp2.set(Math.cos(i), Math.sin(i));
-                        dx= Math.max(abp, abm) > 0.0 ? 
-                        	Complex.over(temp1, gp, dx) :
-                        	Complex.times(temp2, Math.exp(1.0+abx), dx);
-                        x1=Complex.minus(estx, dx, x1);                        
-                        if(Complex.isEqual(estx, x1))
-                        {
-                                root.set(estx);
-                                return root;     // converged
-                        }
-                        if ((i % MAX_STEPS) == 0){
-                                estx.set(x1);
-                        }
-                        else{
-                                // Every so often we take a fractional step to break any limit cycle
-                                // (rare occurence)
-                                estx=Complex.minus(estx, Complex.times(dx, frac[i/MAX_STEPS], temp1), estx);
-                        }
-                }
-                // exceeded maximum allowed iterations
-                root.set(estx);
-               
-               // Application.debug("Maximum number of iterations exceeded in laguerre: " + niter);
-               // Application.debug("root returned at this point");
-               return root;
-        }
-
-        // Finds all roots of a complex polynomial by successive calls to laguerre
-        // Following the procedure in Numerical Recipes for C [Reference above]
-        // Initial estimates are all zero, polish=true
-        public Complex[] laguerreAll(){
-                Complex estx = new Complex(0.0, 0.0);
-                boolean polish = true;
-                return laguerreAll(polish, estx);
-        }
-
-        //  Initial estimates estx, polish=true
-        public Complex[] laguerreAll(Complex estx){
-                boolean polish = true;
-                return laguerreAll(polish, estx);
-        }
-
-        //  Initial estimates are all zero.
-        public Complex[] laguerreAll(boolean polish){
-                Complex estx = new Complex(0.0, 0.0);
-                return laguerreAll(polish, estx);
-        }
-
-        // Finds all roots of a complex polynomial by successive calls to laguerre
-        //  Initial estimates are estx
-        public Complex[] laguerreAll(boolean polish, Complex estx){
-                // polish boolean variable
-                // if true roots polished also by Laguerre
-                // if false roots returned to be polished by another method elsewhere.
-                // estx estimate of root - Preferred default value is zero to favour convergence
-                //   to smallest remaining root
-
-                int     m = degwz;
-                double  eps = 2.0e-6;  // tolerance in determining round off in imaginary part
-
-                Complex x = new Complex();
-                Complex b = new Complex();
-                Complex c = new Complex();
-                Complex[] ad = Complex.oneDarray(m+1);
-                Complex[] roots = Complex.oneDarray(m+1);
-
-                // Copy polynomial for successive deflation
-                for(int j=0; j<=m; j++) ad[j].set(coeffwz[j]);
-
-                // Loop over each root found
-                for(int j=m; j>=1; j--){
-                        x.set(estx);   // Preferred default value is zero to favour convergence to smallest remaining root
-                                                // and find the root
-                        x=laguerre(x, ad, j);
-                        if(Math.abs(x.getImag())<=2.0*eps*Math.abs(x.getReal())) x.setImag(0.0);
-                        roots[j].set(x);
-                        b.set(ad[j]);
-                        for(int jj=j-1; jj>=0; jj--){
-                                c.set(ad[jj]);
-                                ad[jj].set(b);
-                                b=Complex.plus(Complex.times(x, b, b), c, b);
-                        }
-                }
-
-                if(polish){
-                        // polish roots using the undeflated coefficients
-                        for(int j=1; j<=m; j++){
-                                roots[j]=laguerre(roots[j], coeffwz, m);
-                       }
-                }
-
-////                // Sort roots by their real parts by straight insertion
-//                for(int j=2; j<=m; j++){
-//                        x.set(roots[j]);
-//                        int i=0;
-//                        for(i=j-1; i>=1; i--){
-//                                if(roots[i].getReal() <= x.getReal()) break;
-//                                roots[i+1].set(roots[i]);
-//                        }
-//                        roots[i+1].set(x);
-//                }
-
-                // shift roots to zero initial index
-                for(int i=0; i<m; i++)
-                	roots[i].set(roots[i+1]);
-                return roots;
-        }
-}
-
diff --git a/geogebra/kernel/parser/Parser.jj b/geogebra/kernel/parser/Parser.jj
index b403516..7d88d89 100644
--- a/geogebra/kernel/parser/Parser.jj
+++ b/geogebra/kernel/parser/Parser.jj
@@ -238,13 +238,13 @@ TOKEN: {
 |	< COS_FUNC: ( "cos(" | "Cos(" ) > 
 |	< SIN_FUNC: ( "sin(" | "Sin(" ) > 
 |	< TAN_FUNC: ( "tan(" | "Tan(" ) > 
-|	< ACOS_FUNC: ( "acos(" | "arccos(" | "ArcCos(" )> 
+|	< ACOS_FUNC: ( "acos(" | "arccos(" | "arcos(" | "ArcCos(" )> 
 |	< ASIN_FUNC: ( "asin(" | "arcsin(" | "ArcSin(" ) > 
 |	< ATAN_FUNC: ( "atan(" | "arctan(" | "ArcTan(" )> 
 |	< COSH_FUNC: ( "cosh(" | "Cosh(" ) > 
 |	< SINH_FUNC: ( "sinh(" | "Sinh(" ) > 
 |	< TANH_FUNC: ( "tanh(" | "Tanh(" ) > 
-|	< ACOSH_FUNC: ( "acosh(" | "arccosh(" | "ArcCosh(" ) > 
+|	< ACOSH_FUNC: ( "acosh(" | "arccosh(" | "arcosh(" | "ArcCosh(" ) > 
 |	< ASINH_FUNC: ( "asinh(" | "arcsinh(" | "ArcSinh(" ) > 
 |	< ATANH_FUNC: ( "atanh(" | "arctanh(" | "ArcTanh(" ) > 
 |	< EXP_FUNC: ( "exp(" | "Exp(" ) > 
diff --git a/geogebra/kernel/roots/RealRoot.java b/geogebra/kernel/roots/RealRoot.java
deleted file mode 100644
index 150f679..0000000
--- a/geogebra/kernel/roots/RealRoot.java
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
-*   Class RealRoot
-*
-*   Contains methods for finding a real root
-*
-*   The function whose root is to be determined is supplied
-*   by means of an interface, RealRootFunction,
-*   if no derivative required
-*
-*   The function whose root is to be determined is supplied
-*   by means of an interface, RealRootDerivFunction,
-*   as is the first derivative if a derivative is required
-*
-*   WRITTEN BY: Michael Thomas Flanagan
-*
-*   DATE:   18 May 2003
-*   UPDATE: 22 June 2003
-*
-*   DOCUMENTATION:
-*   See Michael Thomas Flanagan's JAVA library on-line web page:
-*   html
-*
-*   Copyright (c) June 2003    Michael Thomas Flanagan
-*
-*   PERMISSION TO COPY:
-*   Permission to use, copy and modify this software and its documentation for
-*   NON-COMMERCIAL purposes is granted, without fee, provided that an acknowledgement
-*   to the author, Michael Thomas Flanagan at www.ee.ucl.ac.uk/~mflanaga, appears in all copies.
-*
-*   Dr Michael Thomas Flanagan makes no representations about the suitability
-*   or fitness of the software for any or for a particular purpose.
-*   Michael Thomas Flanagan shall not be liable for any damages suffered
-*   as a result of using, modifying or distributing this software or its derivatives.
-*
-***************************************************************************************/
-
-package geogebra.kernel.roots;
-
-// RealRoot class
-public class RealRoot{
-
-    private double tol = 1e-8;           // tolerance in determining convergence upon a root
-    private double tolClass = 1e-8;      // class default value for tol
-    private int iterMax = 300;           // maximum number of iterations allowed in root search
-    private int iterN = 0;               // number of iterations taken in root search
-
-    // Reset the default tolerance
-    public void setTolerance(double tolerance){
-        tolClass=tolerance;
-    }
-
-    // Get the default tolerance
-    public double getTolerance(){
-        return tolClass;
-    }
-
-    // Reset the maximum iterations allowed
-    public void setIterMax(int imax){
-        iterMax=imax;
-    }
-
-    // Get the maximum iterations allowed
-    public int getIterMax(){
-        return iterMax;
-    }
-
-    // Get the number of iterations taken
-    public int getIterN(){
-        return iterN;
-    }
-
-    // Combined bisection and Newton Raphson method
-    // required accuracy supplied
-   	public double brent(RealRootFunction g, double lower, double upper, double acc){
-        tol=acc;
-        double root = brent(g, lower, upper);
-        tol=tolClass;
-        return root;
-    }
-
-    // Combined bisection and Newton Raphson method
-    // default accuracy used
-   	final public double brent(RealRootFunction g, double lower, double upper){
-	    // check upper>lower
-	    if(upper==lower)throw new IllegalArgumentException("upper cannot equal lower");
-
-	    double root = -1.235e-200;  // variable to hold the returned root
-        boolean testConv = true;    // convergence test: becomes false on convergence
-        iterN = 0;
-        double temp = 0.0D;
-
-        if(upper<lower){
- 	        temp = upper;
-	        upper = lower;
-	        lower = temp;
-	    }
-
-	    // calculate the function value at the estimate of the higher bound to x
-	    double fu = g.evaluate(upper);
-	    // calculate the function value at the estimate of the lower bound of x
-	    double fl = g.evaluate(lower);
-	    if(Double.isNaN(fl))throw new IllegalArgumentException("lower bound returned NaN as the function value");
-	    if(Double.isNaN(fu))throw new IllegalArgumentException("upper bound returned NaN as the function value");
-
-        // check that the root has been bounded
-        if(fu*fl>0.0D)throw new IllegalArgumentException("root not bounded");
-
-	    // check initial values for true root value
-	    if(fl==0.0D){
-	        root=lower;
-	        testConv = false;
-	    }
-	    if(fu==0.0D){
-	        root=upper;
-	        testConv = false;
-	    }
-
-	    // Function at mid-point of initial estimates
-        double mid=(lower+upper)/2.0D;   // mid point (bisect) or new x estimate (Newton-Raphson)
-        double lastMidB = mid;           // last succesful mid point
-        double fm = g.evaluate(mid);
-        double diff = mid-lower; // difference between successive estimates of the root
-        double fmB = fm;        // last succesful mid value function value
-        double lastMid=mid;
-        boolean lastMethod = true; // true; last method = Newton Raphson, false; last method = bisection method
-        boolean nextMethod = true; // true; next method = Newton Raphson, false; next method = bisection method
-
-	    // search
-	    double rr=0.0D, ss=0.0D, tt=0.0D, pp=0.0D, qq=0.0D; // interpolation variables
-	    while(testConv){
-	        // test for convergence
-	        if(fm==0.0D || Math.abs(diff)<tol){
-	            testConv=false;
-	            if(fm==0.0D){
-	                root=lastMid;
-	            }
-	            else{
-	                if(Math.abs(diff)<tol)root=mid;
-	            }
-	        }
-	        else{
-	            lastMethod=nextMethod;
-	            // test for succesfull inverse quadratic interpolation
-	            if(lastMethod){
-	                if(mid<lower || mid>upper){
-	                    // inverse quadratic interpolation failed
-	                    nextMethod=false;
-	                }
-	                else{
-	                    fmB=fm;
-	                    lastMidB=mid;
-	                }
-	            }
-	            else{
-	                nextMethod=true;
-	            }
-		        if(nextMethod){
-		            // inverse quadratic interpolation
-		            fl=g.evaluate(lower);
-	                fm=g.evaluate(mid);
-	                fu=g.evaluate(upper);
-	                rr=fm/fu;
-	                ss=fm/fl;
-	                tt=fl/fu;
-	                pp=ss*(tt*(rr-tt)*(upper-mid)-(1.0D-rr)*(mid-lower));
-	                qq=(tt-1.0D)*(rr-1.0D)*(ss-1.0D);
-	                lastMid=mid;
-	                diff=pp/qq;
-	                mid=mid+diff;
-	            }
-	            else{
-	                // Bisection procedure
-	                fm=fmB;
-	                mid=lastMidB;
-	                if(fm*fl>0.0D){
-	                    lower=mid;
-	                    fl=fm;
-	                }
-	                else{
-	                    upper=mid;
-	                    fu=fm;
-	                }
-	                lastMid=mid;
-	                mid=(lower+upper)/2.0D;
-	                fm=g.evaluate(mid);
-	                diff=mid-lastMid;
-	                fmB=fm;
-	                lastMidB=mid;
-	            }
-	        }
-            iterN++;
-            if(iterN>iterMax){
-                //Application.debug("brent: maximum number of iterations exceeded - root at this point returned");
-                //Application.debug("Last mid-point difference = "+diff+", tolerance = " + tol);
-                root = mid;
-                testConv = false;
-            }
-        }
-        return root;
-    }
-
-/* 	
-    // bisection method
-    // accuracy supplied
-	final public double bisect(RealRootFunction g, double lower, double upper, double acc){
-	    tol=acc;
-	    double root = bisect(g, lower, upper);
-        tol=tolClass;
-	    return root;
-	}   
-   	
-    // bisection method
-    // default accuracy used
-	final public double bisect(RealRootFunction g, double lower, double upper){
-	    // check upper>lower
-	    if(upper < lower){
-            double temp = upper;
-	        upper = lower;
-	        lower = temp;
-	    }
-	    
-	    
-	    
-	    
-	    if(upper == lower)throw 
-	     	new IllegalArgumentException("upper cannot equal lower");
-		  
-	    double root = -1.235e-200;  // variable to hold the returned root
-        boolean testConv = true;    // convergence test: becomes false on convergence
-        iterN = 0;         // number of iterations
-        double diff = 1e250;        // abs(difference between the last two successive mid-pint x values)
-               
-	    // calculate the function value at the estimate of the higher bound to x
-	    double fu = g.evaluate(upper);
-	    // calculate the function value at the estimate of the lower bound of x
-	    double fl = g.evaluate(lower);	    
-	    if (Double.isNaN(fl)) throw new IllegalArgumentException("lower bound returned NaN as the function value"); 
-	    if (Double.isNaN(fu))throw new IllegalArgumentException("upper bound returned NaN as the function value");	    		    
-
-        // check that the root has been bounded
-        if(fu*fl>0.0D)throw new IllegalArgumentException("root not bounded");
-
-	    // check initial values for true root value
-	    if(fl==0.0D){
-	        root=lower;
-	        testConv = false;
-	    }
-	    if(fu==0.0D){
-	        root=upper;
-	        testConv = false;
-	    }
-
-	    // start search
-        double mid = (lower+upper)/2.0D;    // mid-point
-        double lastMid = 1e300;             // previous mid-point
-        double fm = g.evaluate(mid);
-        while(testConv){
-            if(fm==0.0D || diff<tol){
-                testConv=false;
-                root=mid;
-            }
-            if(fm*fl>0.0D){
-                lower = mid;
-                fl=fm;
-            }
-            else{
-                upper = mid;
-                fu=fm;
-            }
-            lastMid = mid;
-            mid = (lower+upper)/2.0D;
-            fm = g.evaluate(mid);
-            diff = Math.abs(mid-lastMid);
-            iterN++;
-            if(iterN>iterMax){
-                //Application.debug("bisect: maximum number of iterations exceeded - root at this point returned");
-                //Application.debug("Last mid-point difference = "+diff+", tolerance = " + tol);
-                root = mid;
-                testConv = false;
-            }
-        }
-        return root;
-    }*/
-
-    // false position  method
-    // accuracy suppled
-	final public double falsePosition(RealRootFunction g, double lower, double upper, double acc){
-        tol=acc;
-	    double root = falsePosition(g, lower, upper);
-        tol=tolClass;
-	    return root;
-	}
-
-    // false position  method
-    // default accuracy used
-	final public double falsePosition(RealRootFunction g, double lower, double upper){
-	    // check upper>lower
-	    if(upper<lower){
- 	        double temp = upper;
-	        upper = lower;
-	        lower = temp;
-	    } else 
-		  if(upper==lower)throw new IllegalArgumentException("upper cannot equal lower");
-	    
-
-	    double root = -1.235e-200;  // variable to hold the returned root
-        boolean testConv = true;    // convergence test: becomes false on convergence
-        iterN = 0;         // number of iterations
-        double diff = 1e250;        // abs(difference between the last two successive mid-pint x values)
-
-	    // calculate the function value at the estimate of the higher bound to x
-	    double fu = g.evaluate(upper);
-	    // calculate the function value at the estimate of the lower bound of x
-	    double fl = g.evaluate(lower);
-	    if(Double.isNaN(fl))throw new IllegalArgumentException("lower bound returned NaN as the function value");
-	    if(Double.isNaN(fu))throw new IllegalArgumentException("upper bound returned NaN as the function value");
-
-        // check that the root has been bounded
-        if(fu*fl>0.0D)throw new IllegalArgumentException("root not bounded");
-
-	    // check initial values for true root value
-	    if(fl==0.0D){
-	        root=lower;
-	        testConv = false;
-	    }
-	    if(fu==0.0D){
-	        root=upper;
-	        testConv = false;
-	    }
-
-	    // start search
-        double mid = lower+(upper-lower)*Math.abs(fl)/(Math.abs(fl)+Math.abs(fu));    // mid-point
-        double lastMid = 1e300;             // previous mid-point
-        double fm = g.evaluate(mid);
-        while(testConv){
-            if(fm==0.0D || diff<tol){
-                testConv=false;
-                root=mid;
-            }
-            if(fm*fl>0.0D){
-                lower = mid;
-                fl=fm;
-            }
-            else{
-                upper = mid;
-                fu=fm;
-            }
-            lastMid = mid;
-            mid = lower+(upper-lower)*Math.abs(fl)/(Math.abs(fl)+Math.abs(fu));    // mid-point
-            fm = g.evaluate(mid);
-            diff = Math.abs(mid-lastMid);
-            iterN++;
-            if(iterN>iterMax){
-                //Application.debug("falsePosition: maximum number of iterations exceeded - root at this point returned");
-                //Application.debug("Last mid-point difference = "+diff+", tolerance = " + tol);
-                root = mid;
-                testConv = false;
-            }
-        }
-        return root;
-    }
-
-
-    // Combined bisection and Newton Raphson method
-    // accuracy supplied
-   	final public double bisectNewtonRaphson(RealRootDerivFunction g, double lower, double upper, double acc){
-        tol=acc;
-   	    double root = bisectNewtonRaphson(g, lower, upper);
-   	    tol=tolClass;
-   	    return root;
-   	}
-
-    // Combined bisection and Newton Raphson method
-    // default accuracy used
-    final public double bisectNewtonRaphson(RealRootDerivFunction g, double lower, double upper){
-	
-	    double root = -1.235e-200;  // variable to hold the returned root
-        boolean testConv = true;    // convergence test: becomes false on convergence
-        iterN = 0;         // number of iterations
-        double temp = 0.0D;
-
-        if(upper<lower){
- 	        temp = upper;
-	        upper = lower;
-	        lower = temp;
-	    }              
-        
-        // check upper>lower
-	    if(upper==lower)throw new IllegalArgumentException("upper cannot equal lower");
-        
-	    // calculate the function value at the estimate of the higher bound to x
-	    double[] f = g.evaluateDerivFunc(upper);
-	    double fu=f[0];
-	    // calculate the function value at the estimate of the lower bound of x
-	    f = g.evaluateDerivFunc(lower);
-	    double fl=f[0];
-	    if(Double.isNaN(fl))throw new IllegalArgumentException("lower bound returned NaN as the function value");
-	    if(Double.isNaN(fu))throw new IllegalArgumentException("upper bound returned NaN as the function value");
-
-        // check that the root has been bounded
-        if(fu*fl>0.0D)throw new IllegalArgumentException("root not bounded");
-
-	    // check initial values for true root value
-	    if(fl==0.0D){
-	        root=lower;
-	        testConv = false;
-	    }
-	    if(fu==0.0D){
-	        root=upper;
-	        testConv = false;
-	    }
-
-	    // Function at mid-point of initial estimates
-        double mid=(lower+upper)/2.0D;   // mid point (bisect) or new x estimate (Newton-Raphson)
-        double lastMidB = mid;           // last succesful mid point
-        f = g.evaluateDerivFunc(mid);
-        double diff = f[0]/f[1]; // difference between successive estimates of the root
-        double fm = f[0];
-        double fmB = fm;        // last succesful mid value function value
-        double lastMid=mid;
-        mid = mid-diff;
-        boolean lastMethod = true; // true; last method = Newton Raphson, false; last method = bisection method
-        boolean nextMethod = true; // true; next method = Newton Raphson, false; next method = bisection method
-
-	    // search
-	    while(testConv){
-	        // test for convergence
-	        if(fm==0.0D || Math.abs(diff)<tol){
-	            testConv=false;
-	            if(fm==0.0D){
-	                root=lastMid;
-	            }
-	            else{
-	                if(Math.abs(diff)<tol)root=mid;
-	            }
-	        }
-	        else{
-	            lastMethod=nextMethod;
-	            // test for succesfull Newton-Raphson
-	            if(lastMethod){
-	                if(mid<lower || mid>upper){
-	                    // Newton Raphson failed
-	                    nextMethod=false;
-	                }
-	                else{
-	                    fmB=fm;
-	                    lastMidB=mid;
-	                }
-	            }
-	            else{
-	                nextMethod=true;
-	            }
-		        if(nextMethod){
-		            // Newton-Raphson procedure
-	                f=g.evaluateDerivFunc(mid);
-	                fm=f[0];
-	                diff=f[0]/f[1];
-	                lastMid=mid;
-	                mid=mid-diff;
-	            }
-	            else{
-	                // Bisection procedure
-	                fm=fmB;
-	                mid=lastMidB;
-	                if(fm*fl>0.0D){
-	                    lower=mid;
-	                    fl=fm;
-	                }
-	                else{
-	                    upper=mid;
-	                    fu=fm;
-	                }
-	                lastMid=mid;
-	                mid=(lower+upper)/2.0D;
-	                f=g.evaluateDerivFunc(mid);
-	                fm=f[0];
-	                diff=mid-lastMid;
-	                fmB=fm;
-	                lastMidB=mid;
-	            }
-	        }
-            iterN++;
-            if(iterN>iterMax){
-                //Application.debug("bisectNetonRaphson: maximum number of iterations exceeded - root at this point returned");
-                //Application.debug("Last mid-point difference = "+diff+", tolerance = " + tol);
-                root = mid;
-                testConv = false;
-            }
-        }
-        return root;
-    }
-
-    // Newton Raphson method
-    // accuracy supplied
-	final public double newtonRaphson(RealRootDerivFunction g, double x, double acc){
-        tol=acc;
-	    double root = newtonRaphson(g, x);
-   	    tol=tolClass;
-   	    return root;
-	}
-
-    // Newton Raphson method
-    // default accuracy used
-	final public double newtonRaphson(RealRootDerivFunction g, double x){
-	    double root = -1.235e-200;  // variable to hold the returned root
-        boolean testConv = true;    // convergence test: becomes false on convergence
-        iterN = 0;         // number of iterations
-        double diff = 1e250;        // difference between the last two successive mid-pint x values
-
-	    // calculate the function and derivative value at the initial estimate  x
-	    double[] f = g.evaluateDerivFunc(x);
-	    if(Double.isNaN(f[0]))throw new IllegalArgumentException("NaN returned as the function value");
-	    if(Double.isNaN(f[1]))throw new IllegalArgumentException("NaN returned as the derivative function value");
-
-
-	    // search
-        while(testConv){
-            diff = f[0]/f[1];
-            if(f[0]==0.0D || Math.abs(diff)<tol){
-                root = x;
-                testConv=false;
-            }
-            else{
-                x -= diff;
-                f = g.evaluateDerivFunc(x);
-                if(Double.isNaN(f[0]))throw new IllegalArgumentException("NaN returned as the function value");
-	            if(Double.isNaN(f[1]))throw new IllegalArgumentException("NaN returned as the derivative function value");
-            }
-            iterN++;
-            if(iterN>iterMax){
-                //Application.debug("newtonRaphson: maximum number of iterations exceeded - root at this point returned");
-                //Application.debug("Last mid-point difference = "+diff+", tolerance = " + tol);
-                root = x;
-                testConv = false;
-            }
-        }
-        return root;
-    }
-
-}
diff --git a/geogebra/kernel/roots/RealRootFunction.java b/geogebra/kernel/roots/RealRootFunction.java
deleted file mode 100644
index 7c396df..0000000
--- a/geogebra/kernel/roots/RealRootFunction.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-*   Interface RealRootFunction
-*
-*   The function whose root is to be determined by a class
-*   RealRoots method, when no first derivative, is supplied
-*   by means of this interface, RealRootFunction
-*
-*   WRITTEN BY: Michael Thomas Flanagan
-*
-*   DATE:   18 May 2003
-*   UPDATE: 22 June 2003
-*
-*   DOCUMENTATION:
-*   See Michael T Flanagan's JAVA library on-line web page:
-*   RealRoot.html
-*
-*   Copyright (c) June 2003    Michael Thomas Flanagan
-*
-*   PERMISSION TO COPY:
-*   Permission to use, copy and modify this software and its documentation for
-*   NON-COMMERCIAL purposes is granted, without fee, provided that an acknowledgement
-*   to the author, Michael Thomas Flanagan at www.ee.ucl.ac.uk/~mflanaga, appears in all copies.
-*
-*   Dr Michael Thomas Flanagan makes no representations about the suitability
-*   or fitness of the software for any or for a particular purpose.
-*   Michael Thomas Flanagan shall not be liable for any damages suffered
-*   as a result of using, modifying or distributing this software or its derivatives.
-*
-***************************************************************************************/
-
-package geogebra.kernel.roots;
-
-
-// Interface for RealRoot class
-// returns value of function whose root is required
-public interface RealRootFunction{
-    double evaluate(double x);
-}
diff --git a/geogebra/main/AppletImplementation.java b/geogebra/main/AppletImplementation.java
index f43d862..3a29d3d 100644
--- a/geogebra/main/AppletImplementation.java
+++ b/geogebra/main/AppletImplementation.java
@@ -1,1517 +1,1590 @@
-/* 
-GeoGebra - Dynamic Mathematics for Everyone
-http://www.geogebra.org
-
-This file is part of GeoGebra.
-
-This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License as published by 
-the Free Software Foundation.
-
-*/
-
-package geogebra.main;
-
-import geogebra.AppletImplementationInterface;
-import geogebra.GeoGebra;
-import geogebra.GeoGebraAppletPreloader;
-import geogebra.euclidian.EuclidianView;
-import geogebra.kernel.GeoElement;
-import geogebra.kernel.Kernel;
-import geogebra.kernel.arithmetic.MyBoolean;
-import geogebra.plugin.GgbAPI;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Container;
-import java.awt.Cursor;
-import java.awt.FlowLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Locale;
-
-import javax.swing.BorderFactory;
-import javax.swing.JApplet;
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.UIManager;
-
-import netscape.javascript.JSObject;
-
-
-/**
- * GeoGebra applet implementation operating on a given JApplet object.
- */
-public abstract class AppletImplementation implements AppletImplementationInterface {
-
-	private static final long serialVersionUID = 1L;
-	
-	private JApplet applet;
-	
-	protected Application app;
-	protected Kernel kernel;
-	private JButton btOpen;
-	private DoubleClickListener dcListener;
-	private EuclidianView ev;
-	public boolean showOpenButton, undoActive;
-	public boolean showToolBar, showToolBarHelp, showAlgebraInput;
-	public boolean enableRightClick = true;
-	public boolean errorDialogsActive = true;
-	public boolean enableLabelDrags = true;
-	boolean enableShiftDragZoom = true;
-	public boolean showMenuBar = false;
-	//public boolean showSpreadsheet = false;
-	//public boolean showAlgebraView = false;
-	boolean showResetIcon = false;	
-	Color bgColor, borderColor;
-	private String fileStr, customToolBar;	
-	private int maxIconSize;
-	public boolean showFrame = true;
-	private JFrame wnd;
-	private JSObject browserWindow;
-	//public static URL codeBase=null;
-	//public static URL documentBase=null;
-	
-	//private JavaScriptMethodHandler javaScriptMethodHandler;
-	//private boolean javascriptLoadFile=false, javascriptReset=false;
-	//private String javascriptLoadFileName="";
-	private GgbAPI  ggbApi=null;					//Ulven 29.05.08
-	
-	public String ggbOnInitParam = null;
-
-	/** Creates a new instance of GeoGebraApplet */	
-	protected AppletImplementation(JApplet applet) {
-		this.applet = applet;
-		init();
-	}
-	
-	public JApplet getJApplet() {
-		return applet;
-	}
-	
-
-	public void dispose() {
-		app = null;		
-		kernel = null;
-		browserWindow = null;
-		ev = null;		
-
-		if (wnd != null) {
-			// see GeoGebraFrame.dispose()
-			wnd.dispose();
-			wnd = null;
-		}
-	}		
-	
-	/**
-	 * Initializes the CAS, GUI components, and downloads jar files 
-	 * in a separate thread.
-	 */
-	public void initInBackground() {	
-		// call JavaScript function ggbOnInit()
-		initJavaScript();
-		Object [] noArgs = { };
-		Object [] arg = { ggbOnInitParam };
-		
-		callJavaScript("ggbOnInit", (ggbOnInitParam == null) ? noArgs : arg );
-		
-		// give applet time to repaint
-		Thread initingThread = new Thread() {
-			public void run() {				
-				// wait a bit for applet to draw first time
-				// then start background initing of GUI elements
-				try {
-					Thread.sleep(1000);
-				} catch (InterruptedException e) {
-					e.printStackTrace();
-				}
-
-				// for applets with an "open GeoGebra" button or "double click to open window" 
-				// init window in background 
-				if (showOpenButton) {
-					initGeoGebraFrame();											
-				} 
-				else if (showFrame) {
-					wnd = app.getFrame();						
-				}	
-			
-				// load all jar files in background
-				GeoGebraAppletPreloader.loadAllJarFiles();
-
-				System.gc();
-			}									
-		};
-		initingThread.start();
-	}
-
-	private void init() {
-		//codeBase=this.getCodeBase();
-		//documentBase=this.getDocumentBase();
-		
-		//Application.debug("codeBase="+codeBase);
-		//Application.debug("documentBase="+documentBase);
-	
-		// get parameters
-		// filename of construction
-		fileStr = applet.getParameter("filename");
-		if (fileStr != null && 
-			!( fileStr.startsWith("http") || fileStr.startsWith("file") )) 
-		{
-			// add document base to file name 
-			String documentBase = applet.getDocumentBase().toString();
-			String path = documentBase.substring(0, documentBase.lastIndexOf('/')+1);
-			if (fileStr.startsWith("/")) {
-				fileStr = fileStr.substring(1);
-			}
-			fileStr = path + fileStr;			
-		} else {
-			// check if ggb file is encoded as base 64
-			String fileBase64 = applet.getParameter("ggbBase64");
-			if (fileBase64 != null)
-				fileStr = "base64://" + fileBase64;
-		}
-
-		// type = "button" or parameter is not available 
-		String typeStr = applet.getParameter("type");
-		showOpenButton = typeStr != null && typeStr.equals("button");
-
-		// showToolBar = "true" or parameter is not available
-		showToolBar = "true".equals(applet.getParameter("showToolBar"));
-		
-		// showToolBar = "true" or parameter is not available
-		showToolBarHelp = showToolBar && "true".equals(applet.getParameter("showToolBarHelp"));
-		
-		// customToolBar = "0 1 2 | 3 4 5 || 7 8 12" to set the visible toolbar modes
-		customToolBar = applet.getParameter("customToolBar");
-				
-		// showMenuBar = "true" or parameter is not available
-		showMenuBar = "true".equals(applet.getParameter("showMenuBar"));
-		
-		// showSpreadsheet = "true" or parameter is not available
-		//showSpreadsheet = "true".equals(applet.getParameter("showSpreadsheet"));
-		
-		// showAlgebraView = "true" or parameter is not available
-		//showAlgebraView = "true".equals(applet.getParameter("showAlgebraView"));
-		
-		// showResetIcon = "true" or parameter is not available
-		showResetIcon = "true".equals(applet.getParameter("showResetIcon"));
-
-		// showAlgebraInput = "true" or parameter is not available
-		showAlgebraInput = "true".equals(applet.getParameter("showAlgebraInput"));
-
-		// showFrame = "true" or "false"  states whether it is possible
-		// to open the application frame by double clicking on the drawing pad
-		// !false is used for downward compatibility	
-		showFrame = !"false".equals(applet.getParameter("framePossible"));
-			
-		// rightClickActive, default is "true"
-		enableRightClick = !"false".equals(applet.getParameter("enableRightClick"));
-		
-		// errorDialogsActive, default is "true"
-		errorDialogsActive = !"false".equals(applet.getParameter("errorDialogsActive"));
-		
-		// enableLabelDrags, default is "true"
-		enableLabelDrags = !"false".equals(applet.getParameter("enableLabelDrags"));
-		
-		// paramter for JavaScript ggbOnInit() call
-		ggbOnInitParam = applet.getParameter("ggbOnInitParam");
-		
-		// enableShiftDragZoom, default is "true"
-		enableShiftDragZoom = !"false".equals(applet.getParameter("enableShiftDragZoom"));		
-		
-		undoActive = (showToolBar || showMenuBar);
-		
-		// set language manually by iso language string
-		String language = applet.getParameter("language");
-		String country = applet.getParameter("country");		
-		if (language != null) {
-			if (country != null)
-				applet.setLocale(new Locale(language, country));
-			else
-				applet.setLocale(new Locale(language));
-		}	
-
-		// bgcolor = "#CCFFFF" specifies the background color to be used for
-		// the button panel
-		try {
-			bgColor = Color.decode(applet.getParameter("bgcolor"));
-		} catch (Exception e) {
-			bgColor = Color.white;
-		}
-		
-		// borderColor = "#CCFFFF" specifies the border color to be used for
-		// the applet panel
-		try {
-			borderColor = Color.decode(applet.getParameter("borderColor"));
-		} catch (Exception e) {
-			borderColor = Color.gray;
-		}
-		
-		// maximum icon size to be used in the toolbar
-		try {
-			maxIconSize = Integer.parseInt(applet.getParameter("maxIconSize"));
-		} catch (Exception e) {
-			maxIconSize = Application.DEFAULT_ICON_SIZE;
-		}
-
-		//	build application and open file
-		/*
-		if (fileStr == null) {
-			app = new CustomApplication(null, this, undoActive);
-		} else {						
-			String[] args = { fileStr };
-			app = new CustomApplication(args, this, undoActive);
-		}
-		*/
-		
-    	try {		
-  			if (Application.MAC_OS || Application.WINDOWS)
-  				UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-  			else // Linux or others
-  				UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
-  		} catch (Exception e) {
-  			Application.debug(e+"");
-  		}
-
-		if (fileStr == null) {
-			app = buildApplication(null, undoActive);
-		} else {						
-			String[] args = { fileStr };
-			app = buildApplication(args, undoActive);
-		}
-
-		kernel = app.getKernel();
-		
-		/* Ulven 29.05.08 */
-		ggbApi=app.getGgbApi();											
-	}
-
-	protected abstract Application buildApplication(String[] args, boolean undoActive);
-		
-	public Application getApplication() {
-		return app;
-	}
-	
-	public void initGUI() {		
-		JPanel myContenPane;
-		
-		// show only button to open application window	
-		if (showOpenButton) {
-			btOpen =
-				new JButton(
-					app.getPlain("Open")
-						+ " "
-						+ app.getPlain("ApplicationName"));
-			btOpen.addActionListener(new ButtonClickListener());
-			
-			// prepare content pane
-			myContenPane = new JPanel();
-			myContenPane.setBackground(bgColor);
-			myContenPane.setLayout(new FlowLayout(FlowLayout.CENTER));
-			myContenPane.add(btOpen);
-
-		}
-		// show interactive drawing pad
-		else {
-			// create applet panel
-			myContenPane = createGeoGebraAppletPanel();
-		
-			// border around applet panel
-			myContenPane.setBorder(BorderFactory.createLineBorder(borderColor));			
-
-			if (showFrame) {
-				//	open frame on double click
-				dcListener = new DoubleClickListener();				
-				ev.addMouseListener(dcListener);
-			}									
-		}
-			
-		// replace applet's content pane
-		Container cp = applet.getContentPane();
-		cp.setBackground(bgColor);
-		cp.removeAll();
-		cp.add(myContenPane);
-		
-		// set move mode
-		app.setMoveMode();			
-	}
-	
-//	/**
-//	 * Initializes the user interface to only show the graphics view.
-//	 */
-//	public void initViewerGUI() {
-//		// set application parameters
-//		app.setUndoActive(false);			
-//		app.setShowMenuBar(false);
-//		app.setShowAlgebraInput(false);
-//		app.setShowToolBar(false, false);	
-//		app.setRightClickEnabled(false);
-//		app.setErrorDialogsActive(errorDialogsActive);
-//		app.setLabelDragsEnabled(enableLabelDrags);
-//		app.setShiftDragZoomEnabled(enableShiftDragZoom);
-//		app.setShowResetIcon(false);
-//		app.setMaxIconSize(maxIconSize);
-//						
-//		
-//		// build applet panel with graphics view
-//		JPanel panel = new JPanel(new BorderLayout());
-//		ev = app.getEuclidianView();
-//		panel.add(ev, BorderLayout.CENTER);
-//		// border around graphics panel
-//		panel.setBorder(BorderFactory.createLineBorder(borderColor));		
-//
-//		// replace applet's content pane
-//		Container cp = applet.getContentPane();
-//		cp.setBackground(bgColor);
-//		cp.removeAll();
-//		cp.add(panel);
-//		
-//		// set move mode
-//		app.setMoveMode();
-//	}
-	
-	protected JPanel createGeoGebraAppletPanel() {
-		JPanel appletPanel = new JPanel(new BorderLayout());
-		appletPanel.setBackground(bgColor);
-		
-		app.setUndoActive(undoActive);			
-		app.setShowMenuBar(showMenuBar);
-		//app.setShowSpreadsheetView(showSpreadsheet);
-		//app.setShowAlgebraView(showAlgebraView);
-		app.setShowAlgebraInput(showAlgebraInput);
-		app.setShowToolBar(showToolBar, showToolBarHelp);	
-		app.setRightClickEnabled(enableRightClick);
-		app.setErrorDialogsActive(errorDialogsActive);
-		app.setLabelDragsEnabled(enableLabelDrags);
-		app.setShiftDragZoomEnabled(enableShiftDragZoom);
-		if (customToolBar != null && customToolBar.length() > 0 && showToolBar)
-			app.getGuiManager().setToolBarDefinition(customToolBar);
-		app.setShowResetIcon(showResetIcon);
-		app.setMaxIconSize(maxIconSize);
-		
-		appletPanel.add(app.buildApplicationPanel(), BorderLayout.CENTER);		
-		ev = app.getEuclidianView();		
-		ev.updateBackground();
-		
-		return appletPanel;
-	}
-	
-	
-
-	private class DoubleClickListener extends MouseAdapter {
-		public void mouseClicked(MouseEvent e) {
-			if (e.getClickCount() == 2) {			
-				showFrame();										
-			}
-		}
-	}
-
-	private class ButtonClickListener implements ActionListener {
-		public void actionPerformed(ActionEvent e) {
-			showFrame();				
-		}
-	}
-
-	private void showFrame() {
-		Thread worker = new Thread() {
-			public void run() {	
-				
-				app.runningInFrame = true;
-				
-				applet.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
-				
-				doShowFrame();	
-				
-				applet.setCursor(Cursor.getDefaultCursor());
-			}        	
-        };
-        worker.start();						
-	}
-	
-	private synchronized void doShowFrame() {
-		if (showOpenButton) {
-			btOpen.setEnabled(false);
-			
-			if (wnd == null)
-				initGeoGebraFrame();			
-		} else {
-			//	clear applet		 
-			Container cp = applet.getContentPane();
-			cp.removeAll();
-			if (ev != null)
-				ev.removeMouseListener(dcListener);
-
-			JPanel p = new JPanel(new BorderLayout());
-			p.setBackground(Color.white);
-			JLabel label = new JLabel("GeoGebra " + app.getPlain("WindowOpened") + "...");
-			label.setFont(app.getPlainFont());
-			p.add(label, BorderLayout.CENTER);
-			cp.add(p);
-						
-			// initialize the GeoGebra frame's UIG
-			initGeoGebraFrame();			
-			applet.validate();
-		}				
-		
-		// show frame		
-		wnd.setVisible(true);		
-	}
-	
-	private synchronized void initGeoGebraFrame() {
-		// build application panel 
-		if (wnd == null) {
-			wnd = app.getFrame();		
-		}				
-		
-		app.setFrame(wnd);		
-		app.setShowMenuBar(true);
-		app.setShowAlgebraInput(true);		
-		app.setUndoActive(true);
-		app.setShowToolBar(true, true);	
-		app.setRightClickEnabled(true);
-		if (customToolBar != null && customToolBar.length() > 0)
-			app.getGuiManager().setToolBarDefinition(customToolBar);
-			
-		app.updateContentPane();
-		app.resetFonts();					
-	}
-
-	public void showApplet() {			
-		Thread worker = new Thread() {
-			public void run() {	
-				applet.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
-				
-				wnd.setVisible(false); // hide frame
-				
-				if (showOpenButton) {
-					btOpen.setEnabled(true);
-				} else {		
-					reinitGUI();
-				}		
-				
-				applet.setCursor(Cursor.getDefaultCursor());
-			}        	
-        };
-        worker.start();				
-	}
-	
-	private void reinitGUI() {
-		
-		app.runningInFrame = false;
-		
-		Container cp = applet.getContentPane();
-		cp.removeAll();
-		
-		app.setApplet(this);
-		initGUI();
-		
-		app.resetFonts();
-		app.refreshViews();
-		
-		applet.validate();
-		System.gc();
-	}
-					
-
-	/* JAVA SCRIPT INTERFACE */
-	/* Rewritten by Ulven 29.05.08:
-	 * Moved method contents to GgbAPI
-	 * and put in redirections to GgbApi.
-	 * (Oneliners left as they are, nothing to gain...)
-	 * 
-	 * 
-	 * 
-	 */
-	
-	/**
-	 * Returns current construction as a ggb file in form of a byte array.
-	 * @return null if something went wrong 
-	 */
-	public synchronized byte [] getGGBfile() {
-		return ggbApi.getGGBfile();						//Ulven 29.05.08
-	}
-
-	/**
-	 * Returns current construction in XML format. May be used for saving.
-	 */
-	public synchronized String getXML() {
-		return ggbApi.getXML();
-	}
-	
-	/**
-	 * Returns the GeoGebra XML string for the given GeoElement object, 
-	 * i.e. only the <element> tag is returned. 
-	 */
-	public String getXML(String objName) {
-		return ggbApi.getXML(objName);	
-	}
-	
-	/**
-	 * For a dependent GeoElement objName the XML string of 
-	 * the parent algorithm and all its output objects is returned. 
-	 * For a free GeoElement objName "" is returned.
-	 */
-	public String getAlgorithmXML(String objName) {
-		return ggbApi.getAlgorithmXML(objName);
-	}	
-	
-	/**
-	 * Opens construction given in XML format. May be used for loading constructions.
-	 */
-	public synchronized void setXML(String xml) {
-		app.setXML(xml, true);
-	}
-	
-	/**
-	 * Evaluates the given XML string and changes the current construction. 
-	 * Note: the construction is NOT cleared before evaluating the XML string. 	 
-	 */
-	public synchronized void evalXML(String xmlString) {		
-		StringBuffer sb = new StringBuffer();
-		
-		sb.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
-		sb.append("<geogebra format=\"" + GeoGebra.XML_FILE_FORMAT + "\">\n");
-		sb.append(ev.getXML());
-		sb.append("<construction>\n");
-		sb.append(xmlString);
-		sb.append("</construction>\n");
-		sb.append("</geogebra>\n");
-		app.setXML(sb.toString(), false);
-	}
-
-	
-	
-	/**
-	 * Evaluates the given string as if it was entered into GeoGebra's 
-	 * input text field. 	 
-	 */
-	public synchronized boolean evalCommand(final String cmdString) {		
-		//waitForCAS();
-				
-		// avoid security problems calling from JavaScript
-		MyBoolean ret = (MyBoolean)AccessController.doPrivileged(new PrivilegedAction() {
-			public Object run() {
-				// make sure translated command names are loaded
-				app.initTranslatedCommands();
-				
-				// perform the security-sensitive operation here
-				return new MyBoolean(app.getGgbApi().evalCommand(cmdString));
-			}
-		});
-		
-		//return success
-		return ret.getBoolean();
-	}
-
-	/**
-	 * Evaluates the given string using the MathPiper CAS.
-	 */
-	public synchronized String evalMathPiper(String cmdString) {
-		//waitForCAS();
-		
-		final String str = cmdString;
-		
-		// avoid security problems calling from JavaScript
-		return (String)AccessController.doPrivileged(new PrivilegedAction() {
-			public Object run() {
-				// perform the security-sensitive operation here
-				return kernel.evaluateMathPiper(str);
-
-			}
-		});
-	}
-	
-	/**
-	 * Evaluates the given string using the Yacas CAS.
-	 * @deprecated: use evalMathPiper() instead
-	 */
-	public synchronized String evalYacas(String cmdString) {
-		return evalMathPiper(cmdString);
-	}
-	
-	/**
-	 * prints a string to the Java Console
-	 */
-	public synchronized void debug(String string) {		
-		Application.debug(string);
-	}
-	
-//	/**
-//	 * Waits until the GeoGebraCAS has been loaded in the background.
-//	 * Note: the GeoGebraCAS is automatically inited in Application.initInBackground();
-//	 */
-//	private synchronized void waitForCAS() {
-//		if (kernel.isGeoGebraCASready()) return;
-//		
-//		// TODO: remove
-//		System.out.println("waiting for CAS to be inited ...");		
-//		
-//		while (!kernel.isGeoGebraCASready()) {
-//			try { Thread.sleep(50); } catch (Exception e) {}			
-//		}		
-//		
-//		// TODO: remove
-//		System.out.println("   CAS loaded!");
-//	}
-
-	/**
-	 * Turns on the fly creation of points in graphics view on (true) or off (false). 
-	 * Note: this is useful if you don't want tools to have the side effect
-	 * of creating points. For example, when this flag is set to false, the 
-	 * tool "line through two points" will not create points on the fly
-	 * when you click on the background of the graphics view. 
-	 */
-	public synchronized void setOnTheFlyPointCreationActive(boolean flag) {
-		app.setOnTheFlyPointCreationActive(flag);
-	}
-	
-	public synchronized void setUndoPoint() {
-		app.getKernel().getConstruction().storeUndoInfo();
-	}
-	
-	/**
-	 * Turns showing of error dialogs on (true) or (off). 
-	 * Note: this is especially useful together with evalCommand().
-	 */
-	public synchronized void setErrorDialogsActive(boolean flag) {
-		app.setErrorDialogsActive(flag);
-	}
-	
-	/**
-	 * Resets the initial construction (given in filename parameter) of this applet.	 
-	 */
-	public synchronized void reset() {	
-		
-		if (fileStr.startsWith("base64://")) {
-			byte[] zipFile;
-			try {
-				zipFile = geogebra.util.Base64.decode(fileStr
-						.substring(9));
-			} catch (IOException e) {
-				e.printStackTrace();
-				return;
-			}
-			app.loadXML(zipFile);
-			return;
-		}
-		
-		// avoid security problems calling from JavaScript
-		AccessController.doPrivileged(new PrivilegedAction() {
-			public Object run() {
-				// perform the security-sensitive operation here
-				app.setWaitCursor();
-				try {							
-					URL ggbURL = new URL(fileStr);
-					app.loadXML(ggbURL, fileStr.toLowerCase(Locale.US).endsWith(Application.FILE_EXT_GEOGEBRA_TOOL));
-					reinitGUI();
-					applet.validate();
-				} catch (Exception e) {
-					e.printStackTrace();
-				} 		
-				app.setDefaultCursor();	
-				
-				return null;
-
-			}
-		});
-
-	}
-	
-	/**
-	 * Refreshs all views. Note: clears traces in
-	 * geometry window.
-	 */
-	public synchronized void refreshViews() {
-		app.refreshViews();		 				
-	}
-	
-	/* returns IP address
-	 * 
-	 */
-	public synchronized String getIPAddress() {
-		return (String) AccessController.doPrivileged(new PrivilegedAction() {
-			public Object run() {
-				try {
-					InetAddress addr = InetAddress.getLocalHost();
-					// Get host name
-					return addr.getHostAddress();
-				} catch (UnknownHostException e) {
-					return "";
-				}
-			}
-		});
-	}
-			
-	/* returns hostname
-	 * 
-	 */
-	public synchronized String getHostname() {
-		return (String) AccessController.doPrivileged(new PrivilegedAction() {
-			public Object run() {
-				try {
-					InetAddress addr = InetAddress.getLocalHost();
-					// Get host name
-					return addr.getHostName();
-				} catch (UnknownHostException e) {
-					return "";
-				}
-			}
-		});
-	}
-			
-	/**
-	 * Loads a construction from a  file (given URL).	
-	 */
-	public synchronized void openFile(final String strURL) {
-		// avoid security problems calling from JavaScript
-		AccessController.doPrivileged(new PrivilegedAction() {
-			public Object run() {
-				// perform the security-sensitive operation here
-				// load file
-				app.setWaitCursor();
-				try {
-					String myStrURL = strURL;
-					String lowerCase = strURL.toLowerCase(Locale.US);
-					if (!( lowerCase.startsWith("http") || lowerCase.startsWith("file") )) {
-						myStrURL = applet.getCodeBase() + myStrURL;
-					}		
-					URL ggbURL = new URL(myStrURL);				
-					app.loadXML(ggbURL, lowerCase.endsWith(Application.FILE_EXT_GEOGEBRA_TOOL));
-					reinitGUI();
-				} catch (Exception e) {
-					e.printStackTrace();
-				}	
-				app.setDefaultCursor();						
-
-				return null;
-			}
-		});
-	}
-	
-	/*
-	public synchronized void setLanguage(String isoLanguageString) {	
-		app.setLanguage(new Locale(isoLanguageString));
-	}
-	
-	public synchronized void setLanguage(String isoLanguageString, String isoCountryString) {
-		app.setLanguage(new Locale(isoLanguageString, isoCountryString));
-	}
-	*/
-	
-	/**
-	 * Shows or hides the object with the given name in the geometry window.
-	 */
-	public synchronized void setVisible(String objName, boolean visible) {
-		ggbApi.setVisible(objName, visible);
-	}
-	
-	public synchronized boolean getVisible(String objName) {
-		return ggbApi.getVisible(objName);
-	}
-	
-	/**
-	 * Sets the layer of the object with the given name in the geometry window.
-	 * Michael Borcherds 2008-02-27
-	 */
-	public synchronized void setLayer(String objName, int layer) {
-		ggbApi.setLayer(objName, layer);
-		
-	}
-	
-	/**
-	 * Returns the layer of the object with the given name in the geometry window.
-	 * returns layer, or -1 if object doesn't exist
-	 * Michael Borcherds 2008-02-27
-	 */
-	public synchronized int getLayer(String objName) {
-		return ggbApi.getLayer(objName);
-	}
-	
-	/**
-	 * Shows or hides a complete layer
-	 * Michael Borcherds 2008-02-27
-	 */
-	public synchronized void setLayerVisible(int layer, boolean visible) {
-		ggbApi.setLayerVisible(layer,visible);
-	}
-	
-	
-
-	/**
-	 * Sets the fixed state of the object with the given name.
-	 */
-	public synchronized void setFixed(String objName, boolean flag) {
-		ggbApi.setFixed(objName, flag);
-	}
-	
-	/**
-	 * Turns the trace of the object with the given name on or off.
-	 */
-	public synchronized void setTrace(String objName, boolean flag) {
-		ggbApi.setTrace(objName, flag);
-	}
-	
-	/**
-	 * Shows or hides the label of the object with the given name in the geometry window.
-	 */
-	public synchronized void setLabelVisible(String objName, boolean visible) {
-		ggbApi.setLabelVisible(objName, visible);
-	}
-	
-	/**
-	 * Sets the label style of the object with the given name in the geometry window.
-	 * Possible label styles are NAME = 0, NAME_VALUE = 1 and VALUE = 2.
-	 */
-	public synchronized void setLabelStyle(String objName, int style) {
-		ggbApi.setLabelStyle(objName, style);
-	}
-	
-	/**
-	 * Shows or hides the label of the object with the given name in the geometry window.
-	 */
-	public synchronized void setLabelMode(String objName, boolean visible) {
-		ggbApi.setLabelMode(objName, visible);
-	}
-	
-	/**
-	 * Sets the color of the object with the given name.
-	 */
-	public synchronized void setColor(String objName, int red, int green, int blue) {
-		ggbApi.setColor(objName, red, green, blue);
-	}	
-	
-	public synchronized void setLineStyle(String objName, int style) {
-		ggbApi.setLineStyle(objName, style);
-	}	
-	
-	public synchronized void setLineThickness(String objName, int thickness) {
-		ggbApi.setLineThickness(objName, thickness);
-	}	
-	
-	public synchronized void setPointStyle(String objName, int style) {
-		ggbApi.setPointStyle(objName, style);
-	}	
-	
-	public synchronized void setPointSize(String objName, int style) {
-		ggbApi.setPointSize(objName, style);
-	}	
-	
-	public synchronized void setFilling(String objName, double filling) {
-		ggbApi.setFilling(objName, filling);
-	}	
-	
-	/*
-	 * used by the automatic file tester (from JavaScript)
-	 */
-	public synchronized String getGraphicsViewCheckSum(final String algorithm, final String format) {
-		// avoid security problems calling from JavaScript
-		return (String)AccessController.doPrivileged(new PrivilegedAction() {
-			public Object run() {
-				// perform the security-sensitive operation here
-				return ggbApi.getGraphicsViewCheckSum(algorithm, format);
-			}
-		});
-
-
-
-	}
-
-		/**
-	 * Returns the color of the object as an hex string. Note that the hex-string 
-	 * starts with # and uses upper case letters, e.g. "#FF0000" for red.
-	 */
-	public synchronized String getColor(String objName) {
-		return ggbApi.getColor(objName);
-	}	
-	
-	public synchronized double getFilling(String objName) {
-		return ggbApi.getFilling(objName);
-	}	
-	
-	public synchronized int getLineStyle(String objName) {
-		return ggbApi.getLineStyle(objName);
-	}	
-	
-	public synchronized int getLineThickness(String objName) {
-		return ggbApi.getLineThickness(objName);
-	}	
-	
-	public synchronized int getPointStyle(String objName) {
-		return ggbApi.getPointStyle(objName);
-	}	
-	
-	public synchronized int getPointSize(String objName) {
-		return ggbApi.getPointSize(objName);
-	}	
-	
-	/**
-	 * Deletes the object with the given name.
-	 */
-	public synchronized void deleteObject(String objName) {		
-		ggbApi.deleteObject(objName);
-	}	
-	
-	public synchronized void setAnimating(String objName, boolean animate) {
-		ggbApi.setAnimating(objName, animate);
-	}
-	
-	public synchronized void setAnimationSpeed(String objName, double speed) {
-		ggbApi.setAnimationSpeed(objName, speed);
-	}
-	
-	public synchronized void startAnimation() {
-		kernel.getAnimatonManager().startAnimation();		
-	}
-	
-	public synchronized void stopAnimation() {
-		kernel.getAnimatonManager().stopAnimation();		
-	}
-
-	public void hideCursorWhenDragging(boolean hideCursorWhenDragging) {
-		kernel.getApplication().setUseTransparentCursorWhenDragging(hideCursorWhenDragging);
-	}
-	
-	public synchronized boolean isAnimationRunning() {
-		return kernel.getAnimatonManager().isRunning();		
-	}
-	
-	/**
-	 * Renames an object from oldName to newName.
-	 * @return whether renaming worked
-	 */
-	public synchronized boolean renameObject(String oldName, String newName) {		
-		return ggbApi.renameObject(oldName, newName);
-	}	
-	
-	/**
-	 * Returns true if the object with the given name exists.
-	 */
-	public synchronized boolean exists(String objName) {	
-		return ggbApi.exists(objName);
-	}	
-	
-	/**
-	 * Returns true if the object with the given name has a vaild
-	 * value at the moment.
-	 */
-	public synchronized boolean isDefined(String objName) {			
-		return ggbApi.isDefined(objName);
-	}	
-	
-	/**
-	 * Returns the value of the object with the given name as a string.
-	 */
-	public synchronized String getValueString(String objName) {
-		return ggbApi.getValueString(objName);
-	}
-	
-	/**
-	 * Returns the definition of the object with the given name as a string.
-	 */
-	public synchronized String getDefinitionString(String objName) {
-		return ggbApi.getDefinitionString(objName);
-	}
-	
-	/**
-	 * Returns the command of the object with the given name as a string.
-	 */
-	public synchronized String getCommandString(String objName) {	
-		return ggbApi.getCommandString(objName);
-	}
-	
-	/**
-	 * Returns the x-coord of the object with the given name. Note: returns 0 if
-	 * the object is not a point or a vector.
-	 */
-	public synchronized double getXcoord(String objName) {
-		return ggbApi.getXcoord(objName);
-	}
-	
-	/**
-	 * Returns the y-coord of the object with the given name. Note: returns 0 if
-	 * the object is not a point or a vector.
-	 */
-	public synchronized double getYcoord(String objName) {
-		return ggbApi.getYcoord(objName);
-	}
-	
-	/**
-	 * Sets the coordinates of the object with the given name. Note: if the
-	 * specified object is not a point or a vector, nothing happens.
-	 */
-	public synchronized void setCoords(String objName, double x, double y) {
-		ggbApi.setCoords(objName,x,y);
-	}
-	
-	/**
-	 * Returns the double value of the object with the given name. Note: returns 0 if
-	 * the object does not have a value.
-	 */
-	public synchronized double getValue(String objName) {
-		return ggbApi.getValue(objName);
-	}
-	
-	/**
-	 * Sets the double value of the object with the given name. Note: if the
-	 * specified object is not a number, nothing happens.
-	 */
-	public synchronized void setValue(String objName, double x) {
-		ggbApi.setValue(objName,x);
-	}
-	
-	/**
-	 * Turns the repainting of all views on or off.
-	 */
-	public synchronized void setRepaintingActive(boolean flag) {		
-		//Application.debug("set repainting: " + flag);
-		ggbApi.setRepaintingActive(flag);
-	}	
-	
-
-	/*
-	 * Methods to change the geometry window's properties	 
-	 */
-	
-	/**
-	 * Sets the Cartesian coordinate system in the graphics window.
-	 */
-	public synchronized void setCoordSystem(double xmin, double xmax, double ymin, double ymax) {
-		app.getEuclidianView().setRealWorldCoordSystem(xmin, xmax, ymin, ymax);
-	}
-	
-	/**
-	 * Shows or hides the x- and y-axis of the coordinate system in the graphics window.
-	 */
-	public synchronized void setAxesVisible(boolean xVisible, boolean yVisible) {		
-		app.getEuclidianView().showAxes(xVisible, yVisible);
-	}	
-	
-	/**
-	 * Shows or hides the coordinate grid in the graphics window.
-	 */
-	public synchronized void setGridVisible(boolean flag) {		
-		app.getEuclidianView().showGrid(flag);
-	}
-	
-
-	
-	/**
-	 * Returns an array with all object names.
-	 */
-	public synchronized String [] getAllObjectNames() {			
-		return ggbApi.getObjNames();
-	}	
-	
-	/**
-	 * Returns the number of objects in the construction.
-	 */
-	public synchronized int getObjectNumber() {					
-		return ggbApi.getObjNames().length;			
-	}	
-	
-	/**
-	 * Returns the name of the n-th object of this construction.
-	 */
-	public synchronized String getObjectName(int i) {	
-		return ggbApi.getObjectName(i);
-	}
-	
-	/**
-	 * Returns the type of the object with the given name as a string (e.g. point, line, circle, ...)
-	 */
-	public synchronized String getObjectType(String objName) {
-		return ggbApi.getObjectType(objName);
-	}
-	
-	/**
-	 * Sets the mode of the geometry window (EuclidianView). 
-	 */
-	public synchronized void setMode(int mode) {
-		app.setMode(mode);
-	}	
-	
-	
-	/*
-	 * Change listener implementation
-	 * Java to JavaScript
-	 */
-	
-	// maps between GeoElement and JavaScript function names
-	private HashMap updateListenerMap;
-	private ArrayList addListeners, removeListeners, renameListeners, updateListeners, clearListeners;
-	private JavaToJavaScriptView javaToJavaScriptView;
-	
-	/**
-	 * Registers a JavaScript function as an add listener for the applet's construction.
-	 *  Whenever a new object is created in the GeoGebraApplet's construction, the JavaScript 
-	 *  function JSFunctionName is called using the name of the newly created object as a single argument. 
-	 */
-	public synchronized void registerAddListener(String JSFunctionName) {
-		if (JSFunctionName == null || JSFunctionName.length() == 0)
-			return;				
-						
-		// init view
-		initJavaScriptView();
-		
-		// init list
-		if (addListeners == null) {
-			addListeners = new ArrayList();			
-		}		
-		addListeners.add(JSFunctionName);				
-		Application.debug("registerAddListener: " + JSFunctionName);
-	}
-	
-	/**
-	 * Removes a previously registered add listener 
-	 * @see registerAddListener() 
-	 */
-	public synchronized void unregisterAddListener(String JSFunctionName) {
-		if (addListeners != null) {
-			addListeners.remove(JSFunctionName);
-			Application.debug("unregisterAddListener: " + JSFunctionName);
-		}	
-	}	
-	
-	/**
-	 * Registers a JavaScript function as a remove listener for the applet's construction.
-	 * Whenever an object is deleted in the GeoGebraApplet's construction, the JavaScript 
-	 * function JSFunctionName is called using the name of the deleted object as a single argument. 	
-	 */
-	public synchronized void registerRemoveListener(String JSFunctionName) {
-		if (JSFunctionName == null || JSFunctionName.length() == 0)
-			return;				
-						
-		// init view
-		initJavaScriptView();
-		
-		// init list
-		if (removeListeners == null) {
-			removeListeners = new ArrayList();			
-		}		
-		removeListeners.add(JSFunctionName);				
-		Application.debug("registerRemoveListener: " + JSFunctionName);
-	}
-	
-	/**
-	 * Removes a previously registered remove listener 
-	 * @see registerRemoveListener() 
-	 */
-	public synchronized void unregisterRemoveListener(String JSFunctionName) {
-		if (removeListeners != null) {
-			removeListeners.remove(JSFunctionName);
-			Application.debug("unregisterRemoveListener: " + JSFunctionName);
-		}	
-	}	
-	
-	/**
-	 * Registers a JavaScript function as a clear listener for the applet's construction.
-	 * Whenever the construction in the GeoGebraApplet's is cleared (i.e. all objects are removed), the JavaScript 
-	 * function JSFunctionName is called using no arguments. 	
-	 */
-	public synchronized void registerClearListener(String JSFunctionName) {
-		if (JSFunctionName == null || JSFunctionName.length() == 0)
-			return;				
-						
-		// init view
-		initJavaScriptView();
-		
-		// init list
-		if (clearListeners == null) {
-			clearListeners = new ArrayList();			
-		}		
-		clearListeners.add(JSFunctionName);				
-		Application.debug("registerClearListener: " + JSFunctionName);
-	}
-	
-	/**
-	 * Removes a previously registered clear listener 
-	 * @see registerClearListener() 
-	 */
-	public synchronized void unregisterClearListener(String JSFunctionName) {
-		if (clearListeners != null) {
-			clearListeners.remove(JSFunctionName);
-			Application.debug("unregisterClearListener: " + JSFunctionName);
-		}	
-	}	
-	
-	/**
-	 * Registers a JavaScript function as a rename listener for the applet's construction.
-	 * Whenever an object is renamed in the GeoGebraApplet's construction, the JavaScript 
-	 * function JSFunctionName is called using the name of the deleted object as a single argument. 	
-	 */
-	public synchronized void registerRenameListener(String JSFunctionName) {
-		if (JSFunctionName == null || JSFunctionName.length() == 0)
-			return;				
-						
-		// init view
-		initJavaScriptView();
-		
-		// init list
-		if (renameListeners == null) {
-			renameListeners = new ArrayList();			
-		}		
-		renameListeners.add(JSFunctionName);				
-		Application.debug("registerRenameListener: " + JSFunctionName);
-	}
-	
-	/**
-	 * Removes a previously registered rename listener.
-	 * @see registerRenameListener() 
-	 */
-	public synchronized void unregisterRenameListener(String JSFunctionName) {
-		if (renameListeners != null) {
-			renameListeners.remove(JSFunctionName);
-			Application.debug("unregisterRenameListener: " + JSFunctionName);
-		}	
-	}	
-	
-	/**
-	 * Registers a JavaScript function as an update listener for the applet's construction.
-	 * Whenever any object is updated in the GeoGebraApplet's construction, the JavaScript 
-	 * function JSFunctionName is called using the name of the updated object as a single argument. 	
-	 */
-	public synchronized void registerUpdateListener(String JSFunctionName) {
-		if (JSFunctionName == null || JSFunctionName.length() == 0)
-			return;				
-						
-		// init view
-		initJavaScriptView();
-		
-		// init list
-		if (updateListeners == null) {
-			updateListeners = new ArrayList();			
-		}		
-		updateListeners.add(JSFunctionName);				
-		Application.debug("registerUpdateListener: " + JSFunctionName);
-	}
-	
-	/**
-	 * Removes a previously registered update listener.
-	 * @see registerRemoveListener() 
-	 */
-	public synchronized void unregisterUpdateListener(String JSFunctionName) {
-		if (updateListeners != null) {
-			updateListeners.remove(JSFunctionName);
-			Application.debug("unregisterUpdateListener: " + JSFunctionName);
-		}	
-	}	
-	
-	/**
-	 * Registers a JavaScript update listener for an object. Whenever the object with 
-	 * the given name changes, a JavaScript function named JSFunctionName 
-	 * is called using the name of the changed object as the single argument. 
-	 * If objName previously had a mapping JavaScript function, the old value 
-	 * is replaced.
-	 * 
-	 * Example: First, set a change listening JavaScript function:
-	 * ggbApplet.setChangeListener("A", "myJavaScriptFunction");
-	 * Then the GeoGebra Applet will call the Javascript function
-	 * myJavaScriptFunction("A");
-	 * whenever object A changes.	
-	 */
-	public synchronized void registerObjectUpdateListener(String objName, String JSFunctionName) {
-		if (JSFunctionName == null || JSFunctionName.length() == 0)
-			return;		
-		GeoElement geo = kernel.lookupLabel(objName);
-		if (geo == null) return;
-				
-		// init view
-		initJavaScriptView();
-		
-		// init map and view
-		if (updateListenerMap == null) {
-			updateListenerMap = new HashMap();			
-		}
-		
-		// add map entry
-		updateListenerMap.put(geo, JSFunctionName);		
-		Application.debug("registerUpdateListener: object: " + objName + ", function: " + JSFunctionName);
-	}
-	
-	/**
-	 * Removes a previously set change listener for the given object.
-	 * @see setChangeListener
-	 */
-	public synchronized void unregisterObjectUpdateListener(String objName) {
-		if (updateListenerMap != null) {
-			GeoElement geo = kernel.lookupLabel(objName);
-			if (geo != null) {
-				updateListenerMap.remove(geo);
-				Application.debug("unregisterUpdateListener for object: " + objName);
-			}
-		}
-	}				
-
-	/**
-	 * Implements the View interface for
-	 * Java to JavaScript communication, see
-	 * addChangeListener() and removeChangeListener()
-	 */	
-	private class JavaToJavaScriptView implements View {
-		
-		/**
-		 * Calls all registered add listeners.
-		 * @see registerAddListener()
-		 */
-		public void add(GeoElement geo) {
-			if (addListeners != null && geo.isLabelSet()) { 	
-				Object [] args = { geo.getLabel() };
-				notifyListeners(addListeners, args);
-			}
-		}
-		
-		/**
-		 * Calls all registered remove listeners.
-		 * @see registerRemoveListener()
-		 */
-		public void remove(GeoElement geo) {
-			if (removeListeners != null && geo.isLabelSet()) {  
-				Object [] args = { geo.getLabel() };
-				notifyListeners(removeListeners, args);						
-			}			
-		}
-		
-		/**
-		 * Calls all registered clear listeners.
-		 * @see registerClearListener()
-		 */
-		public void clearView() {
-			/* 
-			 * This code would make sense for a "reload" 
-			 * 
-			// try to keep all update listeners
-			if (updateListenerMap != null) {			
-				HashMap newGeoJSfunMap = new HashMap(); 
-				
-				// go through all geos and update their maps
-				Iterator it = updateListenerMap.keySet().iterator();
-				while (it.hasNext()) {
-					// try to find new geo with same label
-					GeoElement oldGeo = (GeoElement) it.next();				
-					GeoElement newGeo = kernel.lookupLabel(oldGeo.getLabel());
-					
-					if (newGeo != null)
-						// add mapping to new map
-						newGeoJSfunMap.put(newGeo,(String) updateListenerMap.get(oldGeo));				
-				}
-				
-				// use new map
-				updateListenerMap.clear();
-				updateListenerMap = newGeoJSfunMap;			
-			}
-			*/
-			
-			ggbApi.lastGeoElementsIteratorSize = 0;	//ulven 29.08.05: should have been a method...
-			updateListenerMap = null;			
-			if (clearListeners != null) {  				
-				notifyListeners(clearListeners, null);						
-			}
-		}
-		
-		/**
-		 * Calls all registered rename listeners.
-		 * @see registerRenameListener()
-		 */
-		public void rename(GeoElement geo) {						
-			if (renameListeners != null && geo.isLabelSet()) {
-				Object [] args = { geo.getOldLabel(), geo.getLabel() };
-				notifyListeners(renameListeners, args);				
-			}			
-		}
-		
-		/**
-		 * Calls all JavaScript functions (listeners) using 
-		 * the specified arguments.
-		 */
-		private void notifyListeners(ArrayList listeners, Object [] args) {										
-			int size = listeners.size();
-			for (int i=0; i < size; i++) {
-				String jsFunction = (String) listeners.get(i);										
-				callJavaScript(jsFunction, args);					
-			}			
-		}	
-																	
-		/**
-		 * Calls all registered update and updateObject listeners.
-		 * @see registerUpdateListener()
-		 */
-		public void update(GeoElement geo) {						
-			// update listeners
-			if (updateListeners != null && geo.isLabelSet()) {
-				Object [] args = { geo.getLabel() };
-				notifyListeners(updateListeners, args);	
-			}
-			
-			// updateObject listeners
-			if (updateListenerMap != null) {			
-				String jsFunction = (String) updateListenerMap.get(geo);		
-				if (jsFunction != null) {	
-					Object [] args = { geo.getLabel() };
-					callJavaScript(jsFunction, args);
-				}
-			}
-		}
-				
-		public void updateAuxiliaryObject(GeoElement geo) {
-			update(geo);
-		}				
-					
-		public void reset() {							
-		}
-				
-    	public void repaintView() {
-    		// no repaint should occur here: views that are
-    		// part of the applet do this on their own    		
-    	}    	    	
-	}
-		
-	private synchronized void initJavaScriptView() {
-		if (javaToJavaScriptView == null) {
-			javaToJavaScriptView = new JavaToJavaScriptView();
-			kernel.attach(javaToJavaScriptView); // register view
-			
-			try {							
-				browserWindow = JSObject.getWindow(applet);
-			} catch (Exception e) {							
-				Application.debug("Exception: could not initialize JSObject.getWindow() for GeoGebraApplet");
-			}    			
-		}
-	}
-	
-	private void callJavaScript(String jsFunction, Object [] args) {		
-		//Application.debug("callJavaScript: " + jsFunction);		
-		
-		try {			
-			if (browserWindow != null)
-				browserWindow.call(jsFunction, args);
-		} catch (Exception e) {						
-			System.err.println("Error calling JavaScript function: " + jsFunction);
-		}    
-	}	
-	
-	
-	private synchronized void initJavaScript() {
-		if (browserWindow == null) {
-			try {							
-				browserWindow = JSObject.getWindow(applet);
-			} catch (Exception e) {							
-				System.err.println("Exception: could not initialize JSObject.getWindow() for GeoGebraApplet");
-			}    			
-		}
-	}
-	
-	
-	
-}
+/* 
+GeoGebra - Dynamic Mathematics for Everyone
+http://www.geogebra.org
+
+This file is part of GeoGebra.
+
+This program is free software; you can redistribute it and/or modify it 
+under the terms of the GNU General Public License as published by 
+the Free Software Foundation.
+
+*/
+
+package geogebra.main;
+
+import geogebra.AppletImplementationInterface;
+import geogebra.GeoGebra;
+import geogebra.GeoGebraAppletPreloader;
+import geogebra.euclidian.EuclidianView;
+import geogebra.kernel.GeoElement;
+import geogebra.kernel.Kernel;
+import geogebra.kernel.arithmetic.MyBoolean;
+import geogebra.plugin.GgbAPI;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Cursor;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ComponentEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Locale;
+
+import javax.swing.BorderFactory;
+import javax.swing.JApplet;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.UIManager;
+
+import netscape.javascript.JSObject;
+
+
+/**
+ * GeoGebra applet implementation operating on a given JApplet object.
+ */
+public abstract class AppletImplementation implements AppletImplementationInterface {
+
+	private static final long serialVersionUID = 1L;
+	
+	private JApplet applet;
+	
+	protected Application app;
+	protected Kernel kernel;
+	private JButton btOpen;
+	private DoubleClickListener dcListener;
+	private EuclidianView ev;
+	public boolean showOpenButton, undoActive;
+	public boolean showToolBar, showToolBarHelp, showAlgebraInput;
+	public boolean enableRightClick = true;
+	public boolean enableChooserPopups = true;
+	public boolean errorDialogsActive = true;
+	public boolean enableLabelDrags = true;
+	boolean enableShiftDragZoom = true;
+	boolean allowRescaling = true;
+	public boolean showMenuBar = false;
+	//public boolean showSpreadsheet = false;
+	//public boolean showAlgebraView = false;
+	boolean showResetIcon = false;	
+	Color bgColor, borderColor;
+	private String fileStr, customToolBar;	
+	private int maxIconSize;
+	public boolean showFrame = true;
+	private JFrame wnd;
+	private JSObject browserWindow;
+	public int width, height;
+	//public static URL codeBase=null;
+	//public static URL documentBase=null;
+	
+	//private JavaScriptMethodHandler javaScriptMethodHandler;
+	//private boolean javascriptLoadFile=false, javascriptReset=false;
+	//private String javascriptLoadFileName="";
+	private GgbAPI  ggbApi=null;					//Ulven 29.05.08
+	
+	public String ggbOnInitParam = null;
+
+	/** Creates a new instance of GeoGebraApplet */	
+	protected AppletImplementation(JApplet applet) {
+		this.applet = applet;
+
+		// Allow rescaling eg ctrl+ ctrl- in Firefox
+		if (allowRescaling)	applet.addComponentListener(new java.awt.event.ComponentAdapter() {
+			public void componentResized(ComponentEvent e)
+			{
+				Component c = e.getComponent();
+				Application.debug("Applet resized to: "+c.getWidth()+", "+c.getHeight());
+				
+				if (!app.runningInFrame && app.onlyGraphicsViewShowing())
+				{
+					// use just horizontal scale factors
+					// under normal circumstances, these should be the same			
+					double zoomFactor = (double)c.getWidth() / (double)width;// (double)c.getHeight() / (double)height ;
+					app.getEuclidianView().zoomAroundCenter(zoomFactor);
+
+				}
+				
+				width = c.getWidth();
+				height = c.getHeight();
+				
+			}
+		   }); 
+
+		init();
+	}
+	
+	public JApplet getJApplet() {
+		return applet;
+	}
+	
+
+	public void dispose() {
+		app = null;		
+		kernel = null;
+		browserWindow = null;
+		ev = null;		
+
+		if (wnd != null) {
+			// see GeoGebraFrame.dispose()
+			wnd.dispose();
+			wnd = null;
+		}
+	}		
+	
+	/**
+	 * Initializes the CAS, GUI components, and downloads jar files 
+	 * in a separate thread.
+	 */
+	public void initInBackground() {	
+		// call JavaScript function ggbOnInit()
+		initJavaScript();
+		Object [] noArgs = { };
+		Object [] arg = { ggbOnInitParam };
+		
+		callJavaScript("ggbOnInit", (ggbOnInitParam == null) ? noArgs : arg );
+		
+		// give applet time to repaint
+		Thread initingThread = new Thread() {
+			public void run() {				
+				// wait a bit for applet to draw first time
+				// then start background initing of GUI elements
+				try {
+					Thread.sleep(1000);
+				} catch (InterruptedException e) {
+					e.printStackTrace();
+				}
+
+				// for applets with an "open GeoGebra" button or "double click to open window" 
+				// init window in background 
+				if (showOpenButton) {
+					initGeoGebraFrame();											
+				} 
+				else if (showFrame) {
+					wnd = app.getFrame();						
+				}	
+			
+				// load all jar files in background
+				GeoGebraAppletPreloader.loadAllJarFiles();
+
+				System.gc();
+			}									
+		};
+		initingThread.start();
+	}
+
+	private void init() {
+		//codeBase=this.getCodeBase();
+		//documentBase=this.getDocumentBase();
+		
+		//Application.debug("codeBase="+codeBase);
+		//Application.debug("documentBase="+documentBase);
+	
+		// get parameters
+		// filename of construction
+		fileStr = applet.getParameter("filename");
+		if (fileStr != null && 
+			!( fileStr.startsWith("http") || fileStr.startsWith("file") )) 
+		{
+			// add document base to file name 
+			String documentBase = applet.getDocumentBase().toString();
+			String path = documentBase.substring(0, documentBase.lastIndexOf('/')+1);
+			if (fileStr.startsWith("/")) {
+				fileStr = fileStr.substring(1);
+			}
+			fileStr = path + fileStr;			
+		} else {
+			// check if ggb file is encoded as base 64
+			String fileBase64 = applet.getParameter("ggbBase64");
+			if (fileBase64 != null)
+				fileStr = "base64://" + fileBase64;
+		}
+
+		// type = "button" or parameter is not available 
+		String typeStr = applet.getParameter("type");
+		showOpenButton = typeStr != null && typeStr.equals("button");
+
+		// showToolBar = "true" or parameter is not available
+		showToolBar = "true".equals(applet.getParameter("showToolBar"));
+		
+		// showToolBar = "true" or parameter is not available
+		showToolBarHelp = showToolBar && "true".equals(applet.getParameter("showToolBarHelp"));
+		
+		// customToolBar = "0 1 2 | 3 4 5 || 7 8 12" to set the visible toolbar modes
+		customToolBar = applet.getParameter("customToolBar");
+				
+		// showMenuBar = "true" or parameter is not available
+		showMenuBar = "true".equals(applet.getParameter("showMenuBar"));
+		
+		// showSpreadsheet = "true" or parameter is not available
+		//showSpreadsheet = "true".equals(applet.getParameter("showSpreadsheet"));
+		
+		// showAlgebraView = "true" or parameter is not available
+		//showAlgebraView = "true".equals(applet.getParameter("showAlgebraView"));
+		
+		// showResetIcon = "true" or parameter is not available
+		showResetIcon = "true".equals(applet.getParameter("showResetIcon"));
+
+		// showAlgebraInput = "true" or parameter is not available
+		showAlgebraInput = "true".equals(applet.getParameter("showAlgebraInput"));
+
+		// showFrame = "true" or "false"  states whether it is possible
+		// to open the application frame by double clicking on the drawing pad
+		// !false is used for downward compatibility	
+		showFrame = !"false".equals(applet.getParameter("framePossible"));
+			
+		// rightClickActive, default is "true"
+		enableRightClick = !"false".equals(applet.getParameter("enableRightClick"));
+		
+		// enableChooserPopups, default is "true"
+		enableChooserPopups = !"false".equals(applet.getParameter("enableChooserPopups"));
+		
+		// errorDialogsActive, default is "true"
+		errorDialogsActive = !"false".equals(applet.getParameter("errorDialogsActive"));
+		
+		// enableLabelDrags, default is "true"
+		enableLabelDrags = !"false".equals(applet.getParameter("enableLabelDrags"));
+		
+		// paramter for JavaScript ggbOnInit() call
+		ggbOnInitParam = applet.getParameter("ggbOnInitParam");
+		
+		// enableShiftDragZoom, default is "true"
+		enableShiftDragZoom = !"false".equals(applet.getParameter("enableShiftDragZoom"));		
+		
+		// allowRescaling, default is "false"
+		allowRescaling = "true".equals(applet.getParameter("allowRescaling"));		
+		
+		undoActive = (showToolBar || showMenuBar);
+		
+		// set language manually by iso language string
+		String language = applet.getParameter("language");
+		String country = applet.getParameter("country");		
+		if (language != null) {
+			if (country != null)
+				applet.setLocale(new Locale(language, country));
+			else
+				applet.setLocale(new Locale(language));
+		}	
+
+		// bgcolor = "#CCFFFF" specifies the background color to be used for
+		// the button panel
+		try {
+			bgColor = Color.decode(applet.getParameter("bgcolor"));
+		} catch (Exception e) {
+			bgColor = Color.white;
+		}
+		
+		// borderColor = "#CCFFFF" specifies the border color to be used for
+		// the applet panel
+		try {
+			borderColor = Color.decode(applet.getParameter("borderColor"));
+		} catch (Exception e) {
+			borderColor = Color.gray;
+		}
+		
+		// maximum icon size to be used in the toolbar
+		try {
+			maxIconSize = Integer.parseInt(applet.getParameter("maxIconSize"));
+		} catch (Exception e) {
+			maxIconSize = Application.DEFAULT_ICON_SIZE;
+		}
+
+		//	build application and open file
+		/*
+		if (fileStr == null) {
+			app = new CustomApplication(null, this, undoActive);
+		} else {						
+			String[] args = { fileStr };
+			app = new CustomApplication(args, this, undoActive);
+		}
+		*/
+		
+    	try {		
+  			if (Application.MAC_OS || Application.WINDOWS)
+  				UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+  			else // Linux or others
+  				UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
+  		} catch (Exception e) {
+  			Application.debug(e+"");
+  		}
+
+		if (fileStr == null) {
+			app = buildApplication(null, undoActive);
+		} else {						
+			String[] args = { fileStr };
+			app = buildApplication(args, undoActive);
+		}
+
+		kernel = app.getKernel();
+		
+		/* Ulven 29.05.08 */
+		ggbApi=app.getGgbApi();											
+	}
+
+	protected abstract Application buildApplication(String[] args, boolean undoActive);
+		
+	public Application getApplication() {
+		return app;
+	}
+	
+	public void initGUI() {		
+		JPanel myContenPane;
+		
+		// show only button to open application window	
+		if (showOpenButton) {
+			btOpen =
+				new JButton(
+					app.getPlain("Open")
+						+ " "
+						+ app.getPlain("ApplicationName"));
+			btOpen.addActionListener(new ButtonClickListener());
+			
+			// prepare content pane
+			myContenPane = new JPanel();
+			myContenPane.setBackground(bgColor);
+			myContenPane.setLayout(new FlowLayout(FlowLayout.CENTER));
+			myContenPane.add(btOpen);
+
+		}
+		// show interactive drawing pad
+		else {
+			// create applet panel
+			myContenPane = createGeoGebraAppletPanel();
+		
+			// border around applet panel
+			myContenPane.setBorder(BorderFactory.createLineBorder(borderColor));			
+
+			if (showFrame) {
+				//	open frame on double click
+				dcListener = new DoubleClickListener();				
+				ev.addMouseListener(dcListener);
+			}									
+		}
+			
+		// replace applet's content pane
+		Container cp = applet.getContentPane();
+		cp.setBackground(bgColor);
+		cp.removeAll();
+		cp.add(myContenPane);
+		
+		Application.debug("Initial size = "+cp.getWidth()+", "+cp.getHeight());
+		//Application.debug("Preferred size = "+app.getEuclidianView().getPreferredSize().getWidth()+", "+app.getEuclidianView().getPreferredSize().getHeight());
+		
+		width = cp.getWidth();
+		height = cp.getHeight();	
+		
+		setInitialScaling();
+		
+		// set move mode
+		app.setMoveMode();			
+	}
+	
+	/*
+	 * rescales if the width is not what's expected
+	 * eg if browser is zoomed
+	 */
+	private void setInitialScaling() {
+		if (allowRescaling) {			
+			if (!app.runningInFrame && app.onlyGraphicsViewShowing())
+			{
+				double zoomFactorX = (double)width / (double)app.getEuclidianView().getPreferredSize().getWidth();
+				double zoomFactorY = (double)height / (double)app.getEuclidianView().getPreferredSize().getHeight();
+				double zoomFactor = Math.min(zoomFactorX, zoomFactorY);
+				app.getEuclidianView().zoomAroundCenter(zoomFactor);
+			}
+		}
+
+	}
+
+
+	
+//	/**
+//	 * Initializes the user interface to only show the graphics view.
+//	 */
+//	public void initViewerGUI() {
+//		// set application parameters
+//		app.setUndoActive(false);			
+//		app.setShowMenuBar(false);
+//		app.setShowAlgebraInput(false);
+//		app.setShowToolBar(false, false);	
+//		app.setRightClickEnabled(false);
+//		app.setErrorDialogsActive(errorDialogsActive);
+//		app.setLabelDragsEnabled(enableLabelDrags);
+//		app.setShiftDragZoomEnabled(enableShiftDragZoom);
+//		app.setShowResetIcon(false);
+//		app.setMaxIconSize(maxIconSize);
+//						
+//		
+//		// build applet panel with graphics view
+//		JPanel panel = new JPanel(new BorderLayout());
+//		ev = app.getEuclidianView();
+//		panel.add(ev, BorderLayout.CENTER);
+//		// border around graphics panel
+//		panel.setBorder(BorderFactory.createLineBorder(borderColor));		
+//
+//		// replace applet's content pane
+//		Container cp = applet.getContentPane();
+//		cp.setBackground(bgColor);
+//		cp.removeAll();
+//		cp.add(panel);
+//		
+//		// set move mode
+//		app.setMoveMode();
+//	}
+	
+	protected JPanel createGeoGebraAppletPanel() {
+		JPanel appletPanel = new JPanel(new BorderLayout());
+		appletPanel.setBackground(bgColor);
+		
+		app.setUndoActive(undoActive);			
+		app.setShowMenuBar(showMenuBar);
+		//app.setShowSpreadsheetView(showSpreadsheet);
+		//app.setShowAlgebraView(showAlgebraView);
+		app.setShowAlgebraInput(showAlgebraInput);
+		app.setShowToolBar(showToolBar, showToolBarHelp);	
+		app.setRightClickEnabled(enableRightClick);
+		app.setChooserPopupsEnabled(enableChooserPopups);
+		app.setErrorDialogsActive(errorDialogsActive);
+		app.setLabelDragsEnabled(enableLabelDrags);
+		app.setShiftDragZoomEnabled(enableShiftDragZoom);
+		if (customToolBar != null && customToolBar.length() > 0 && showToolBar)
+			app.getGuiManager().setToolBarDefinition(customToolBar);
+		app.setShowResetIcon(showResetIcon);
+		app.setMaxIconSize(maxIconSize);
+		
+		appletPanel.add(app.buildApplicationPanel(), BorderLayout.CENTER);		
+		ev = app.getEuclidianView();		
+		ev.updateBackground();
+		
+		return appletPanel;
+	}
+	
+	
+
+	private class DoubleClickListener extends MouseAdapter {
+		public void mouseClicked(MouseEvent e) {
+			if (e.getClickCount() == 2) {			
+				showFrame();										
+			}
+		}
+	}
+
+	private class ButtonClickListener implements ActionListener {
+		public void actionPerformed(ActionEvent e) {
+			showFrame();				
+		}
+	}
+
+	private void showFrame() {
+		Thread worker = new Thread() {
+			public void run() {	
+				
+				app.runningInFrame = true;
+				
+				applet.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+				
+				doShowFrame();	
+				
+				applet.setCursor(Cursor.getDefaultCursor());
+			}        	
+        };
+        worker.start();						
+	}
+	
+	private synchronized void doShowFrame() {
+		if (showOpenButton) {
+			btOpen.setEnabled(false);
+			
+			if (wnd == null)
+				initGeoGebraFrame();			
+		} else {
+			//	clear applet		 
+			Container cp = applet.getContentPane();
+			cp.removeAll();
+			if (ev != null)
+				ev.removeMouseListener(dcListener);
+
+			JPanel p = new JPanel(new BorderLayout());
+			p.setBackground(Color.white);
+			JLabel label = new JLabel("GeoGebra " + app.getPlain("WindowOpened") + "...");
+			label.setFont(app.getPlainFont());
+			p.add(label, BorderLayout.CENTER);
+			cp.add(p);
+						
+			// initialize the GeoGebra frame's UIG
+			initGeoGebraFrame();			
+			applet.validate();
+		}				
+		
+		// show frame		
+		wnd.setVisible(true);		
+	}
+	
+	private synchronized void initGeoGebraFrame() {
+		// build application panel 
+		if (wnd == null) {
+			wnd = app.getFrame();		
+		}				
+		
+		app.setFrame(wnd);		
+		app.setShowMenuBar(true);
+		app.setShowAlgebraInput(true);		
+		app.setUndoActive(true);
+		app.setShowToolBar(true, true);	
+		app.setRightClickEnabled(true);
+		if (customToolBar != null && customToolBar.length() > 0)
+			app.getGuiManager().setToolBarDefinition(customToolBar);
+			
+		app.updateContentPane();
+		app.resetFonts();					
+	}
+
+	public void showApplet() {			
+		Thread worker = new Thread() {
+			public void run() {	
+				applet.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+				
+				wnd.setVisible(false); // hide frame
+				
+				if (showOpenButton) {
+					btOpen.setEnabled(true);
+				} else {		
+					reinitGUI();
+				}		
+				
+				applet.setCursor(Cursor.getDefaultCursor());
+			}        	
+        };
+        worker.start();				
+	}
+	
+	private void reinitGUI() {
+		
+		app.runningInFrame = false;
+		
+		Container cp = applet.getContentPane();
+		cp.removeAll();
+		
+		app.setApplet(this);
+		initGUI();
+		
+		app.resetFonts();
+		app.refreshViews();
+		
+		applet.validate();
+		System.gc();
+	}
+					
+
+	/* JAVA SCRIPT INTERFACE */
+	/* Rewritten by Ulven 29.05.08:
+	 * Moved method contents to GgbAPI
+	 * and put in redirections to GgbApi.
+	 * (Oneliners left as they are, nothing to gain...)
+	 * 
+	 * 
+	 * 
+	 */
+	
+	/**
+	 * Returns current construction as a ggb file in form of a byte array.
+	 * @return null if something went wrong 
+	 */
+	public synchronized byte [] getGGBfile() {
+		return ggbApi.getGGBfile();						//Ulven 29.05.08
+	}
+
+	/**
+	 * Returns current construction in XML format. May be used for saving.
+	 */
+	public synchronized String getXML() {
+		return ggbApi.getXML();
+	}
+	
+	/**
+	 * Returns the GeoGebra XML string for the given GeoElement object, 
+	 * i.e. only the <element> tag is returned. 
+	 */
+	public String getXML(String objName) {
+		return ggbApi.getXML(objName);	
+	}
+	
+	/**
+	 * For a dependent GeoElement objName the XML string of 
+	 * the parent algorithm and all its output objects is returned. 
+	 * For a free GeoElement objName "" is returned.
+	 */
+	public String getAlgorithmXML(String objName) {
+		return ggbApi.getAlgorithmXML(objName);
+	}	
+	
+	/**
+	 * Opens construction given in XML format. May be used for loading constructions.
+	 */
+	public synchronized void setXML(String xml) {
+		app.setXML(xml, true);
+	}
+	
+	/**
+	 * Evaluates the given XML string and changes the current construction. 
+	 * Note: the construction is NOT cleared before evaluating the XML string. 	 
+	 */
+	public synchronized void evalXML(String xmlString) {		
+		StringBuffer sb = new StringBuffer();
+		
+		sb.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
+		sb.append("<geogebra format=\"" + GeoGebra.XML_FILE_FORMAT + "\">\n");
+		sb.append(ev.getXML());
+		sb.append("<construction>\n");
+		sb.append(xmlString);
+		sb.append("</construction>\n");
+		sb.append("</geogebra>\n");
+		app.setXML(sb.toString(), false);
+	}
+
+	
+	
+	/**
+	 * Evaluates the given string as if it was entered into GeoGebra's 
+	 * input text field. 	 
+	 */
+	public synchronized boolean evalCommand(final String cmdString) {		
+		//waitForCAS();
+				
+		// avoid security problems calling from JavaScript
+		MyBoolean ret = (MyBoolean)AccessController.doPrivileged(new PrivilegedAction() {
+			public Object run() {
+				// perform the security-sensitive operation here
+				
+				// make sure translated command names are loaded
+				app.initTranslatedCommands();
+				
+				return new MyBoolean(app.getGgbApi().evalCommand(cmdString));
+			}
+		});
+		
+		//return success
+		return ret.getBoolean();
+	}
+
+	/**
+	 * Evaluates the given string using the MathPiper CAS.
+	 */
+	public synchronized String evalMathPiper(String cmdString) {
+		//waitForCAS();
+		
+		final String str = cmdString;
+		
+		// avoid security problems calling from JavaScript
+		return (String)AccessController.doPrivileged(new PrivilegedAction() {
+			public Object run() {
+				// perform the security-sensitive operation here
+				return kernel.evaluateMathPiper(str);
+
+			}
+		});
+	}
+	
+	/**
+	 * Evaluates the given string using the Yacas CAS.
+	 * @deprecated: use evalMathPiper() instead
+	 */
+	public synchronized String evalYacas(String cmdString) {
+		return evalMathPiper(cmdString);
+	}
+	
+	/**
+	 * prints a string to the Java Console
+	 */
+	public synchronized void debug(String string) {		
+		Application.debug(string);
+	}
+	
+//	/**
+//	 * Waits until the GeoGebraCAS has been loaded in the background.
+//	 * Note: the GeoGebraCAS is automatically inited in Application.initInBackground();
+//	 */
+//	private synchronized void waitForCAS() {
+//		if (kernel.isGeoGebraCASready()) return;
+//		
+//		// TODO: remove
+//		System.out.println("waiting for CAS to be inited ...");		
+//		
+//		while (!kernel.isGeoGebraCASready()) {
+//			try { Thread.sleep(50); } catch (Exception e) {}			
+//		}		
+//		
+//		// TODO: remove
+//		System.out.println("   CAS loaded!");
+//	}
+
+	/**
+	 * Turns on the fly creation of points in graphics view on (true) or off (false). 
+	 * Note: this is useful if you don't want tools to have the side effect
+	 * of creating points. For example, when this flag is set to false, the 
+	 * tool "line through two points" will not create points on the fly
+	 * when you click on the background of the graphics view. 
+	 */
+	public synchronized void setOnTheFlyPointCreationActive(boolean flag) {
+		app.setOnTheFlyPointCreationActive(flag);
+	}
+	
+	public synchronized void setUndoPoint() {
+		app.getKernel().getConstruction().storeUndoInfo();
+	}
+	
+	/**
+	 * Turns showing of error dialogs on (true) or (off). 
+	 * Note: this is especially useful together with evalCommand().
+	 */
+	public synchronized void setErrorDialogsActive(boolean flag) {
+		app.setErrorDialogsActive(flag);
+	}
+	
+	/**
+	 * Resets the initial construction (given in filename parameter) of this applet.	 
+	 */
+	public synchronized void reset() {	
+		
+		if (fileStr.startsWith("base64://")) {
+			byte[] zipFile;
+			try {
+				zipFile = geogebra.util.Base64.decode(fileStr
+						.substring(9));
+			} catch (IOException e) {
+				e.printStackTrace();
+				return;
+			}
+			app.loadXML(zipFile);
+			return;
+		}
+		
+		// avoid security problems calling from JavaScript
+		AccessController.doPrivileged(new PrivilegedAction() {
+			public Object run() {
+				// perform the security-sensitive operation here
+				app.setWaitCursor();
+				try {							
+					URL ggbURL = new URL(fileStr);
+					app.loadXML(ggbURL, fileStr.toLowerCase(Locale.US).endsWith(Application.FILE_EXT_GEOGEBRA_TOOL));
+					reinitGUI();
+					applet.validate();
+				} catch (Exception e) {
+					e.printStackTrace();
+				} 		
+				app.setDefaultCursor();	
+				
+				return null;
+
+			}
+		});
+	}
+	
+	/**
+	 * Refreshs all views. Note: clears traces in
+	 * geometry window.
+	 */
+	public synchronized void refreshViews() {
+		app.refreshViews();		 				
+	}
+	
+	/* returns IP address
+	 * 
+	 */
+	public synchronized String getIPAddress() {
+		return (String) AccessController.doPrivileged(new PrivilegedAction() {
+			public Object run() {
+				try {
+					InetAddress addr = InetAddress.getLocalHost();
+					// Get host name
+					return addr.getHostAddress();
+				} catch (UnknownHostException e) {
+					return "";
+				}
+			}
+		});
+	}
+			
+	/* returns hostname
+	 * 
+	 */
+	public synchronized String getHostname() {
+		return (String) AccessController.doPrivileged(new PrivilegedAction() {
+			public Object run() {
+				try {
+					InetAddress addr = InetAddress.getLocalHost();
+					// Get host name
+					return addr.getHostName();
+				} catch (UnknownHostException e) {
+					return "";
+				}
+			}
+		});
+	}
+			
+	/**
+	 * Loads a construction from a  file (given URL).	
+	 */
+	public synchronized void openFile(final String strURL) {
+		// avoid security problems calling from JavaScript
+		AccessController.doPrivileged(new PrivilegedAction() {
+			public Object run() {
+				// perform the security-sensitive operation here
+				// load file
+				app.setWaitCursor();
+				try {
+					String myStrURL = strURL;
+					String lowerCase = strURL.toLowerCase(Locale.US);
+					if (!( lowerCase.startsWith("http") || lowerCase.startsWith("file") )) {
+						myStrURL = applet.getCodeBase() + myStrURL;
+					}		
+					URL ggbURL = new URL(myStrURL);				
+					app.loadXML(ggbURL, lowerCase.endsWith(Application.FILE_EXT_GEOGEBRA_TOOL));
+					reinitGUI();
+				} catch (Exception e) {
+					e.printStackTrace();
+				}	
+				app.setDefaultCursor();						
+
+				return null;
+			}
+		});
+	}
+	
+	/*
+	public synchronized void setLanguage(String isoLanguageString) {	
+		app.setLanguage(new Locale(isoLanguageString));
+	}
+	
+	public synchronized void setLanguage(String isoLanguageString, String isoCountryString) {
+		app.setLanguage(new Locale(isoLanguageString, isoCountryString));
+	}
+	*/
+	
+	/**
+	 * Shows or hides the object with the given name in the geometry window.
+	 */
+	public synchronized void setVisible(String objName, boolean visible) {
+		ggbApi.setVisible(objName, visible);
+	}
+	
+	public synchronized boolean getVisible(String objName) {
+		return ggbApi.getVisible(objName);
+	}
+	
+	/**
+	 * Sets the layer of the object with the given name in the geometry window.
+	 * Michael Borcherds 2008-02-27
+	 */
+	public synchronized void setLayer(String objName, int layer) {
+		ggbApi.setLayer(objName, layer);
+		
+	}
+	
+	/**
+	 * Returns the layer of the object with the given name in the geometry window.
+	 * returns layer, or -1 if object doesn't exist
+	 * Michael Borcherds 2008-02-27
+	 */
+	public synchronized int getLayer(String objName) {
+		return ggbApi.getLayer(objName);
+	}
+	
+	/**
+	 * Shows or hides a complete layer
+	 * Michael Borcherds 2008-02-27
+	 */
+	public synchronized void setLayerVisible(int layer, boolean visible) {
+		ggbApi.setLayerVisible(layer,visible);
+	}
+	
+	
+
+	/**
+	 * Sets the fixed state of the object with the given name.
+	 */
+	public synchronized void setFixed(String objName, boolean flag) {
+		ggbApi.setFixed(objName, flag);
+	}
+	
+	/**
+	 * Turns the trace of the object with the given name on or off.
+	 */
+	public synchronized void setTrace(String objName, boolean flag) {
+		ggbApi.setTrace(objName, flag);
+	}
+	
+	/**
+	 * Shows or hides the label of the object with the given name in the geometry window.
+	 */
+	public synchronized void setLabelVisible(String objName, boolean visible) {
+		ggbApi.setLabelVisible(objName, visible);
+	}
+	
+	/**
+	 * Sets the label style of the object with the given name in the geometry window.
+	 * Possible label styles are NAME = 0, NAME_VALUE = 1 and VALUE = 2.
+	 */
+	public synchronized void setLabelStyle(String objName, int style) {
+		ggbApi.setLabelStyle(objName, style);
+	}
+	
+	/**
+	 * Shows or hides the label of the object with the given name in the geometry window.
+	 */
+	public synchronized void setLabelMode(String objName, boolean visible) {
+		ggbApi.setLabelMode(objName, visible);
+	}
+	
+	/**
+	 * Sets the color of the object with the given name.
+	 */
+	public synchronized void setColor(String objName, int red, int green, int blue) {
+		ggbApi.setColor(objName, red, green, blue);
+	}	
+	
+	public synchronized void setLineStyle(String objName, int style) {
+		ggbApi.setLineStyle(objName, style);
+	}	
+	
+	public synchronized void setLineThickness(String objName, int thickness) {
+		ggbApi.setLineThickness(objName, thickness);
+	}	
+	
+	public synchronized void setPointStyle(String objName, int style) {
+		ggbApi.setPointStyle(objName, style);
+	}	
+	
+	public synchronized void setPointSize(String objName, int style) {
+		ggbApi.setPointSize(objName, style);
+	}	
+	
+	public synchronized void setFilling(String objName, double filling) {
+		ggbApi.setFilling(objName, filling);
+	}	
+	
+	/*
+	 * used by the automatic file tester (from JavaScript)
+	 */
+	public synchronized String getGraphicsViewCheckSum(final String algorithm, final String format) {
+		// avoid security problems calling from JavaScript
+		return (String)AccessController.doPrivileged(new PrivilegedAction() {
+			public Object run() {
+				// perform the security-sensitive operation here
+				return ggbApi.getGraphicsViewCheckSum(algorithm, format);
+			}
+		});
+
+
+
+	}
+
+		/**
+	 * Returns the color of the object as an hex string. Note that the hex-string 
+	 * starts with # and uses upper case letters, e.g. "#FF0000" for red.
+	 */
+	public synchronized String getColor(String objName) {
+		return ggbApi.getColor(objName);
+	}	
+	
+	public synchronized double getFilling(String objName) {
+		return ggbApi.getFilling(objName);
+	}	
+	
+	public synchronized int getLineStyle(String objName) {
+		return ggbApi.getLineStyle(objName);
+	}	
+	
+	public synchronized int getLineThickness(String objName) {
+		return ggbApi.getLineThickness(objName);
+	}	
+	
+	public synchronized int getPointStyle(String objName) {
+		return ggbApi.getPointStyle(objName);
+	}	
+	
+	public synchronized int getPointSize(String objName) {
+		return ggbApi.getPointSize(objName);
+	}	
+	
+	/**
+	 * Deletes the object with the given name.
+	 */
+	public synchronized void deleteObject(String objName) {		
+		ggbApi.deleteObject(objName);
+	}	
+	
+	public synchronized void setAnimating(String objName, boolean animate) {
+		ggbApi.setAnimating(objName, animate);
+	}
+	
+	public synchronized void setAnimationSpeed(String objName, double speed) {
+		ggbApi.setAnimationSpeed(objName, speed);
+	}
+	
+	public synchronized void startAnimation() {
+		kernel.getAnimatonManager().startAnimation();		
+	}
+	
+	public synchronized void stopAnimation() {
+		kernel.getAnimatonManager().stopAnimation();		
+	}
+
+	public void hideCursorWhenDragging(boolean hideCursorWhenDragging) {
+		kernel.getApplication().setUseTransparentCursorWhenDragging(hideCursorWhenDragging);
+	}
+	
+	public synchronized boolean isAnimationRunning() {
+		return kernel.getAnimatonManager().isRunning();		
+	}
+	
+	/**
+	 * Renames an object from oldName to newName.
+	 * @return whether renaming worked
+	 */
+	public synchronized boolean renameObject(String oldName, String newName) {		
+		return ggbApi.renameObject(oldName, newName);
+	}	
+	
+	/**
+	 * Returns true if the object with the given name exists.
+	 */
+	public synchronized boolean exists(String objName) {	
+		return ggbApi.exists(objName);
+	}	
+	
+	/**
+	 * Returns true if the object with the given name has a vaild
+	 * value at the moment.
+	 */
+	public synchronized boolean isDefined(String objName) {			
+		return ggbApi.isDefined(objName);
+	}	
+	
+	/**
+	 * Returns the value of the object with the given name as a string.
+	 */
+	public synchronized String getValueString(String objName) {
+		return ggbApi.getValueString(objName);
+	}
+	
+	/**
+	 * Returns the definition of the object with the given name as a string.
+	 */
+	public synchronized String getDefinitionString(String objName) {
+		return ggbApi.getDefinitionString(objName);
+	}
+	
+	/**
+	 * Returns the command of the object with the given name as a string.
+	 */
+	public synchronized String getCommandString(String objName) {	
+		return ggbApi.getCommandString(objName);
+	}
+	
+	/**
+	 * Returns the x-coord of the object with the given name. Note: returns 0 if
+	 * the object is not a point or a vector.
+	 */
+	public synchronized double getXcoord(String objName) {
+		return ggbApi.getXcoord(objName);
+	}
+	
+	/**
+	 * Returns the y-coord of the object with the given name. Note: returns 0 if
+	 * the object is not a point or a vector.
+	 */
+	public synchronized double getYcoord(String objName) {
+		return ggbApi.getYcoord(objName);
+	}
+	
+	/**
+	 * Sets the coordinates of the object with the given name. Note: if the
+	 * specified object is not a point or a vector, nothing happens.
+	 */
+	public synchronized void setCoords(String objName, double x, double y) {
+		ggbApi.setCoords(objName,x,y);
+	}
+	
+	/**
+	 * Returns the double value of the object with the given name. Note: returns 0 if
+	 * the object does not have a value.
+	 */
+	public synchronized double getValue(String objName) {
+		return ggbApi.getValue(objName);
+	}
+	
+	/**
+	 * Sets the double value of the object with the given name. Note: if the
+	 * specified object is not a number, nothing happens.
+	 */
+	public synchronized void setValue(String objName, double x) {
+		ggbApi.setValue(objName,x);
+	}
+	
+	/**
+	 * Turns the repainting of all views on or off.
+	 */
+	public synchronized void setRepaintingActive(boolean flag) {		
+		//Application.debug("set repainting: " + flag);
+		ggbApi.setRepaintingActive(flag);
+	}	
+	
+
+	/*
+	 * Methods to change the geometry window's properties	 
+	 */
+	
+	/**
+	 * Sets the Cartesian coordinate system in the graphics window.
+	 */
+	public synchronized void setCoordSystem(double xmin, double xmax, double ymin, double ymax) {
+		app.getEuclidianView().setRealWorldCoordSystem(xmin, xmax, ymin, ymax);
+	}
+	
+	/**
+	 * Shows or hides the x- and y-axis of the coordinate system in the graphics window.
+	 */
+	public synchronized void setAxesVisible(boolean xVisible, boolean yVisible) {		
+		ggbApi.setAxesVisible(xVisible, yVisible);
+	}	
+	
+	/**
+	 * Shows or hides the coordinate grid in the graphics window.
+	 */
+	public synchronized void setGridVisible(boolean flag) {		
+		app.getEuclidianView().showGrid(flag);
+	}
+	
+
+	
+	/**
+	 * Returns an array with all object names.
+	 */
+	public synchronized String [] getAllObjectNames() {			
+		return ggbApi.getObjNames();
+	}	
+	
+	/**
+	 * Returns the number of objects in the construction.
+	 */
+	public synchronized int getObjectNumber() {					
+		return ggbApi.getObjNames().length;			
+	}	
+	
+	/**
+	 * Returns the name of the n-th object of this construction.
+	 */
+	public synchronized String getObjectName(int i) {	
+		return ggbApi.getObjectName(i);
+	}
+	
+	/**
+	 * Returns the type of the object with the given name as a string (e.g. point, line, circle, ...)
+	 */
+	public synchronized String getObjectType(String objName) {
+		return ggbApi.getObjectType(objName);
+	}
+	
+	/**
+	 * Sets the mode of the geometry window (EuclidianView). 
+	 */
+	public synchronized void setMode(int mode) {
+		app.setMode(mode);
+	}	
+	
+	
+	/*
+	 * Change listener implementation
+	 * Java to JavaScript
+	 */
+	
+	// maps between GeoElement and JavaScript function names
+	private HashMap updateListenerMap;
+	private ArrayList addListeners, removeListeners, renameListeners, updateListeners, clearListeners;
+	private JavaToJavaScriptView javaToJavaScriptView;
+	
+	/**
+	 * Registers a JavaScript function as an add listener for the applet's construction.
+	 *  Whenever a new object is created in the GeoGebraApplet's construction, the JavaScript 
+	 *  function JSFunctionName is called using the name of the newly created object as a single argument. 
+	 */
+	public synchronized void registerAddListener(String JSFunctionName) {
+		if (JSFunctionName == null || JSFunctionName.length() == 0)
+			return;				
+						
+		// init view
+		initJavaScriptView();
+		
+		// init list
+		if (addListeners == null) {
+			addListeners = new ArrayList();			
+		}		
+		addListeners.add(JSFunctionName);				
+		Application.debug("registerAddListener: " + JSFunctionName);
+	}
+	
+	/**
+	 * Removes a previously registered add listener 
+	 * @see registerAddListener() 
+	 */
+	public synchronized void unregisterAddListener(String JSFunctionName) {
+		if (addListeners != null) {
+			addListeners.remove(JSFunctionName);
+			Application.debug("unregisterAddListener: " + JSFunctionName);
+		}	
+	}	
+	
+	/**
+	 * Registers a JavaScript function as a remove listener for the applet's construction.
+	 * Whenever an object is deleted in the GeoGebraApplet's construction, the JavaScript 
+	 * function JSFunctionName is called using the name of the deleted object as a single argument. 	
+	 */
+	public synchronized void registerRemoveListener(String JSFunctionName) {
+		if (JSFunctionName == null || JSFunctionName.length() == 0)
+			return;				
+						
+		// init view
+		initJavaScriptView();
+		
+		// init list
+		if (removeListeners == null) {
+			removeListeners = new ArrayList();			
+		}		
+		removeListeners.add(JSFunctionName);				
+		Application.debug("registerRemoveListener: " + JSFunctionName);
+	}
+	
+	/**
+	 * Removes a previously registered remove listener 
+	 * @see registerRemoveListener() 
+	 */
+	public synchronized void unregisterRemoveListener(String JSFunctionName) {
+		if (removeListeners != null) {
+			removeListeners.remove(JSFunctionName);
+			Application.debug("unregisterRemoveListener: " + JSFunctionName);
+		}	
+	}	
+	
+	/**
+	 * Registers a JavaScript function as a clear listener for the applet's construction.
+	 * Whenever the construction in the GeoGebraApplet's is cleared (i.e. all objects are removed), the JavaScript 
+	 * function JSFunctionName is called using no arguments. 	
+	 */
+	public synchronized void registerClearListener(String JSFunctionName) {
+		if (JSFunctionName == null || JSFunctionName.length() == 0)
+			return;				
+						
+		// init view
+		initJavaScriptView();
+		
+		// init list
+		if (clearListeners == null) {
+			clearListeners = new ArrayList();			
+		}		
+		clearListeners.add(JSFunctionName);				
+		Application.debug("registerClearListener: " + JSFunctionName);
+	}
+	
+	/**
+	 * Removes a previously registered clear listener 
+	 * @see registerClearListener() 
+	 */
+	public synchronized void unregisterClearListener(String JSFunctionName) {
+		if (clearListeners != null) {
+			clearListeners.remove(JSFunctionName);
+			Application.debug("unregisterClearListener: " + JSFunctionName);
+		}	
+	}	
+	
+	/**
+	 * Registers a JavaScript function as a rename listener for the applet's construction.
+	 * Whenever an object is renamed in the GeoGebraApplet's construction, the JavaScript 
+	 * function JSFunctionName is called using the name of the deleted object as a single argument. 	
+	 */
+	public synchronized void registerRenameListener(String JSFunctionName) {
+		if (JSFunctionName == null || JSFunctionName.length() == 0)
+			return;				
+						
+		// init view
+		initJavaScriptView();
+		
+		// init list
+		if (renameListeners == null) {
+			renameListeners = new ArrayList();			
+		}		
+		renameListeners.add(JSFunctionName);				
+		Application.debug("registerRenameListener: " + JSFunctionName);
+	}
+	
+	/**
+	 * Removes a previously registered rename listener.
+	 * @see registerRenameListener() 
+	 */
+	public synchronized void unregisterRenameListener(String JSFunctionName) {
+		if (renameListeners != null) {
+			renameListeners.remove(JSFunctionName);
+			Application.debug("unregisterRenameListener: " + JSFunctionName);
+		}	
+	}	
+	
+	/**
+	 * Registers a JavaScript function as an update listener for the applet's construction.
+	 * Whenever any object is updated in the GeoGebraApplet's construction, the JavaScript 
+	 * function JSFunctionName is called using the name of the updated object as a single argument. 	
+	 */
+	public synchronized void registerUpdateListener(String JSFunctionName) {
+		if (JSFunctionName == null || JSFunctionName.length() == 0)
+			return;				
+						
+		// init view
+		initJavaScriptView();
+		
+		// init list
+		if (updateListeners == null) {
+			updateListeners = new ArrayList();			
+		}		
+		updateListeners.add(JSFunctionName);				
+		Application.debug("registerUpdateListener: " + JSFunctionName);
+	}
+	
+	/**
+	 * Removes a previously registered update listener.
+	 * @see registerRemoveListener() 
+	 */
+	public synchronized void unregisterUpdateListener(String JSFunctionName) {
+		if (updateListeners != null) {
+			updateListeners.remove(JSFunctionName);
+			Application.debug("unregisterUpdateListener: " + JSFunctionName);
+		}	
+	}	
+	
+	/**
+	 * Registers a JavaScript update listener for an object. Whenever the object with 
+	 * the given name changes, a JavaScript function named JSFunctionName 
+	 * is called using the name of the changed object as the single argument. 
+	 * If objName previously had a mapping JavaScript function, the old value 
+	 * is replaced.
+	 * 
+	 * Example: First, set a change listening JavaScript function:
+	 * ggbApplet.setChangeListener("A", "myJavaScriptFunction");
+	 * Then the GeoGebra Applet will call the Javascript function
+	 * myJavaScriptFunction("A");
+	 * whenever object A changes.	
+	 */
+	public synchronized void registerObjectUpdateListener(String objName, String JSFunctionName) {
+		if (JSFunctionName == null || JSFunctionName.length() == 0)
+			return;		
+		GeoElement geo = kernel.lookupLabel(objName);
+		if (geo == null) return;
+				
+		// init view
+		initJavaScriptView();
+		
+		// init map and view
+		if (updateListenerMap == null) {
+			updateListenerMap = new HashMap();			
+		}
+		
+		// add map entry
+		updateListenerMap.put(geo, JSFunctionName);		
+		Application.debug("registerUpdateListener: object: " + objName + ", function: " + JSFunctionName);
+	}
+	
+	/**
+	 * Removes a previously set change listener for the given object.
+	 * @see setChangeListener
+	 */
+	public synchronized void unregisterObjectUpdateListener(String objName) {
+		if (updateListenerMap != null) {
+			GeoElement geo = kernel.lookupLabel(objName);
+			if (geo != null) {
+				updateListenerMap.remove(geo);
+				Application.debug("unregisterUpdateListener for object: " + objName);
+			}
+		}
+	}				
+
+	/**
+	 * Implements the View interface for
+	 * Java to JavaScript communication, see
+	 * addChangeListener() and removeChangeListener()
+	 */	
+	private class JavaToJavaScriptView implements View {
+		
+		/**
+		 * Calls all registered add listeners.
+		 * @see registerAddListener()
+		 */
+		public void add(GeoElement geo) {
+			if (addListeners != null && geo.isLabelSet()) { 	
+				Object [] args = { geo.getLabel() };
+				notifyListeners(addListeners, args);
+			}
+		}
+		
+		/**
+		 * Calls all registered remove listeners.
+		 * @see registerRemoveListener()
+		 */
+		public void remove(GeoElement geo) {
+			if (removeListeners != null && geo.isLabelSet()) {  
+				Object [] args = { geo.getLabel() };
+				notifyListeners(removeListeners, args);						
+			}			
+		}
+		
+		/**
+		 * Calls all registered clear listeners.
+		 * @see registerClearListener()
+		 */
+		public void clearView() {
+			/* 
+			 * This code would make sense for a "reload" 
+			 * 
+			// try to keep all update listeners
+			if (updateListenerMap != null) {			
+				HashMap newGeoJSfunMap = new HashMap(); 
+				
+				// go through all geos and update their maps
+				Iterator it = updateListenerMap.keySet().iterator();
+				while (it.hasNext()) {
+					// try to find new geo with same label
+					GeoElement oldGeo = (GeoElement) it.next();				
+					GeoElement newGeo = kernel.lookupLabel(oldGeo.getLabel());
+					
+					if (newGeo != null)
+						// add mapping to new map
+						newGeoJSfunMap.put(newGeo,(String) updateListenerMap.get(oldGeo));				
+				}
+				
+				// use new map
+				updateListenerMap.clear();
+				updateListenerMap = newGeoJSfunMap;			
+			}
+			*/
+			
+			ggbApi.lastGeoElementsIteratorSize = 0;	//ulven 29.08.05: should have been a method...
+			updateListenerMap = null;			
+			if (clearListeners != null) {  				
+				notifyListeners(clearListeners, null);						
+			}
+		}
+		
+		/**
+		 * Calls all registered rename listeners.
+		 * @see registerRenameListener()
+		 */
+		public void rename(GeoElement geo) {						
+			if (renameListeners != null && geo.isLabelSet()) {
+				Object [] args = { geo.getOldLabel(), geo.getLabel() };
+				notifyListeners(renameListeners, args);				
+			}			
+		}
+		
+		/**
+		 * Calls all JavaScript functions (listeners) using 
+		 * the specified arguments.
+		 */
+		private void notifyListeners(ArrayList listeners, Object [] args) {										
+			if (!listenersEnabled) return;
+			int size = listeners.size();
+			for (int i=0; i < size; i++) {
+				String jsFunction = (String) listeners.get(i);										
+				callJavaScript(jsFunction, args);					
+			}			
+		}	
+																	
+		/**
+		 * Calls all registered update and updateObject listeners.
+		 * @see registerUpdateListener()
+		 */
+		public void update(GeoElement geo) {						
+			if (!listenersEnabled) return;
+			// update listeners
+			if (updateListeners != null && geo.isLabelSet()) {
+				Object [] args = { geo.getLabel() };
+				notifyListeners(updateListeners, args);	
+			}
+			
+			// updateObject listeners
+			if (updateListenerMap != null) {			
+				String jsFunction = (String) updateListenerMap.get(geo);		
+				if (jsFunction != null) {	
+					Object [] args = { geo.getLabel() };
+					callJavaScript(jsFunction, args);
+				}
+			}
+		}
+				
+		public void updateAuxiliaryObject(GeoElement geo) {
+			update(geo);
+		}				
+					
+		public void reset() {							
+		}
+				
+    	public void repaintView() {
+    		// no repaint should occur here: views that are
+    		// part of the applet do this on their own    		
+    	}    	    	
+	}
+		
+	private synchronized void initJavaScriptView() {
+		if (javaToJavaScriptView == null) {
+			javaToJavaScriptView = new JavaToJavaScriptView();
+			kernel.attach(javaToJavaScriptView); // register view
+			
+			try {							
+				browserWindow = JSObject.getWindow(applet);
+			} catch (Exception e) {							
+				Application.debug("Exception: could not initialize JSObject.getWindow() for GeoGebraApplet");
+			}    			
+		}
+	}
+	
+	private void callJavaScript(String jsFunction, Object [] args) {		
+		//Application.debug("callJavaScript: " + jsFunction);		
+		
+		try {			
+			if (browserWindow != null)
+				browserWindow.call(jsFunction, args);
+		} catch (Exception e) {						
+			System.err.println("Warning: JavaScript function '"+jsFunction+"' not found");
+		}    
+	}	
+	
+	
+	private synchronized void initJavaScript() {
+		if (browserWindow == null) {
+			try {							
+				browserWindow = JSObject.getWindow(applet);
+			} catch (Exception e) {							
+				System.err.println("Exception: could not initialize JSObject.getWindow() for GeoGebraApplet");
+			}    			
+		}
+	}
+	
+	boolean listenersEnabled = true;	
+	public void disableListeners() {
+		listenersEnabled = false;
+	}
+
+	public void enableListeners() {
+		listenersEnabled = true;
+	}
+
+
+	
+}
diff --git a/geogebra/main/Application.java b/geogebra/main/Application.java
index d5b4fbf..6da86a4 100644
--- a/geogebra/main/Application.java
+++ b/geogebra/main/Application.java
@@ -165,10 +165,7 @@ public abstract class Application implements KeyEventDispatcher {
 		supportedLocales.add(new Locale("pt", "BR")); // Portugese (Brazil)
 		supportedLocales.add(new Locale("pt", "PT")); // Portuguese (Portugal)
 		// supportedLocales.add(new Locale("pa")); // Punjabi
-		// TODO: remove IS_PRE_RELEASE
-		if (GeoGebra.IS_PRE_RELEASE)
-			supportedLocales.add(new Locale("ro")); // Romanian
-		
+		supportedLocales.add(new Locale("ro")); // Romanian
 		supportedLocales.add(new Locale("ru")); // Russian
 		supportedLocales.add(new Locale("sr")); // Serbian
 		// TODO: remove IS_PRE_RELEASE
@@ -295,6 +292,8 @@ public abstract class Application implements KeyEventDispatcher {
 			rbsettings;
 	private ImageManager imageManager;
 	private int maxIconSize = DEFAULT_ICON_SIZE;
+	
+	public boolean runningOnSugar = false;
 
 	// Hashtable for translation of commands from
 	// local language to internal name
@@ -315,12 +314,11 @@ public abstract class Application implements KeyEventDispatcher {
 	private boolean showGrid = false;
 	private boolean antialiasing = true;
 	private boolean showSpreadsheet = false;
-	private boolean showCAS = false;
-	private boolean disableUndo = false;
 	private boolean printScaleString = false;
 	private int labelingStyle = ConstructionDefaults.LABEL_VISIBLE_AUTOMATIC;
 
 	private boolean rightClickEnabled = true;
+	private boolean chooserPopupsEnabled = true;
 	private boolean labelDragsEnabled = true;
 	private boolean shiftDragZoomEnabled = true;
 	private boolean isErrorDialogsActive = true;
@@ -831,14 +829,17 @@ public abstract class Application implements KeyEventDispatcher {
 								.println("Usage: java -jar geogebra.jar [OPTION] [FILE]\n"
 										+ "Start GeoGebra with the specified OPTIONs and open the given FILE.\n"
 										+ "  --help\t\tprint this message\n"
-										+ "  --language=LANGUGE_CODE\t\tset language using locale strings, e.g. en, de, de_AT, ...\n"
+										+ "  --language=LANGUAGE_CODE\t\tset language using locale strings, e.g. en, de, de_AT, ...\n"
 										+ "  --showAlgebraInput=BOOLEAN\tshow/hide algebra input field\n"
 										+ "  --showAlgebraWindow=BOOLEAN\tshow/hide algebra window\n"
 										+ "  --showSpreadsheet=BOOLEAN\tshow/hide spreadsheet\n"
-										+ "  --showCAS=BOOLEAN\tshow/hide CAS window\n"
+										+ "  --fontSize=NUMBER\tset default font size\n"
+										+ "  --sugar\n"
+										+ "  --showSplash=BOOLEAN\tenable/disable the splash screen\n"
 										+ "  --enableUndo=BOOLEAN\tenable/disable Undo\n"
-										+ "  --showAxes=BOOLEAN\tshow/hide coordinate axes"
-										+ "  --antiAliasing=BOOLEAN\tturn anti-aliasing on/off");
+										+ "  --showAxes=BOOLEAN\tshow/hide coordinate axes\n"
+										+ "  --antiAliasing=BOOLEAN\tturn anti-aliasing on/off\n");
+					System.exit(0);
 					} else if (optionName.equals("language")) {
 						setLocale(getLocale(optionValue));
 
@@ -850,8 +851,10 @@ public abstract class Application implements KeyEventDispatcher {
 						setShowAlgebraView(!optionValue.equals("false"));
 					} else if (optionName.equals("showSpreadsheet")) {
 						setShowSpreadsheetView(!optionValue.equals("false"));
-					} else if (optionName.equals("showCAS")) {
-						setShowCasView(!optionValue.equals("false"));
+					} else if (optionName.equals("fontSize")) {
+						setFontSize(Integer.parseInt(optionValue));
+					} else if (optionName.equals("sugar")) {
+						runningOnSugar=true;
 					} else if (optionName.equals("enableUndo")) {
 						setUndoActive(!optionValue.equals("false"));
 					} else if (optionName.equals("showAxes")) {
@@ -1954,77 +1957,6 @@ public abstract class Application implements KeyEventDispatcher {
 		isSaved = false;
 	}
 
-	public boolean showCasView() {
-		return showCAS;
-	}
-
-	public void setShowCasView(boolean flag) {
-		if (showCAS == flag)
-			return;
-		showCAS = flag;
-
-		if (casView == null) {
-
-			getCasView();
-
-			// create JFrame for CAS view
-			casFrame = createCasFrame(casView);
-		}
-
-		// show or hide CAS window
-
-		casFrame.setVisible(showCAS);
-
-		updateMenubar();
-		isSaved = false;
-	}
-
-	private JFrame casFrame;
-
-	public CasManager getCasView() {
-		if (casView == null) {
-
-			// this code wraps the creation of the cas view and is
-			// necessary to allow dynamic loading of this class
-			ActionListener al = new ActionListener() {
-				public void actionPerformed(ActionEvent e) {
-					// casView = new
-					// geogebra.cas.view.CASView(Application.this);
-				}
-			};
-			al.actionPerformed(null);
-		}
-
-		return casView;
-	}
-
-	public boolean hasCasView() {
-		return casView != null;
-	}
-
-	private static JFrame createCasFrame(final CasManager casView) {
-		JFrame spFrame = new JFrame();
-
-		JComponent casViewComp = casView.getCASViewComponent();
-
-		// Button
-		JPanel btPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
-		btPanel.add(casView.createButton(casViewComp, 0));
-		btPanel.add(casView.createButton(casViewComp, 1));
-		btPanel.add(casView.createButton(casViewComp, 2));
-		btPanel.add(casView.createButton(casViewComp, 3));
-
-		Container contentPane = spFrame.getContentPane();
-		contentPane.setLayout(new BorderLayout());
-		contentPane.add(btPanel, BorderLayout.NORTH);
-		contentPane.add(casViewComp, BorderLayout.CENTER);
-		spFrame.setBackground(Color.white);
-		spFrame.setResizable(true);
-		spFrame.setTitle("GeoGebra CAS");
-		spFrame.pack();
-		return spFrame;
-	}
-
 	final public boolean showAlgebraView() {
 		return showAlgebraView;
 	}
@@ -2137,6 +2069,14 @@ public abstract class Application implements KeyEventDispatcher {
 	}
 
 	/**
+	 * Enables or disables popups when multiple objects selected This is useful
+	 * for applets.
+	 */
+	public void setChooserPopupsEnabled(boolean flag) {
+		chooserPopupsEnabled = flag;
+	}
+	
+	/**
 	 * Enables or disables label dragging in this application. This is useful
 	 * for applets.
 	 */
@@ -2148,6 +2088,10 @@ public abstract class Application implements KeyEventDispatcher {
 		return rightClickEnabled;
 	}
 
+	final public boolean areChooserPopupsEnabled() {
+		return chooserPopupsEnabled;
+	}
+
 	final public boolean isLabelDragsEnabled() {
 		return labelDragsEnabled;
 	}
@@ -3436,10 +3380,6 @@ public abstract class Application implements KeyEventDispatcher {
 		return commandDict;
 	}
 
-	public JFrame getCasFrame() {
-		return casFrame;
-	}
-
 	final static int MEMORY_CRITICAL = 100 * 1024;
 	static Runtime runtime = Runtime.getRuntime();
 
@@ -3547,5 +3487,14 @@ public abstract class Application implements KeyEventDispatcher {
 		}
 		return transparentCursor;
 	}
+	
+	public boolean onlyGraphicsViewShowing() {
+		return !showSpreadsheetView() && !showAlgebraView();
+	}
+
+	public AppletImplementation getApplet() {
+			return appletImpl;
+		
+	}
 
 }
diff --git a/geogebra/main/GlobalKeyDispatcher.java b/geogebra/main/GlobalKeyDispatcher.java
index ea60c83..8f28e42 100644
--- a/geogebra/main/GlobalKeyDispatcher.java
+++ b/geogebra/main/GlobalKeyDispatcher.java
@@ -409,7 +409,11 @@ public class GlobalKeyDispatcher implements KeyEventDispatcher {
 						double newValue = num.getValue() + changeVal * num.animationIncrement;
 						if (num.animationIncrement > Kernel.MIN_PRECISION) {
 							// round to decimal fraction, e.g. 2.800000000001 to 2.8
-							newValue = app.getKernel().checkDecimalFraction(newValue);
+							newValue = app.getKernel().checkDecimalFraction(newValue, 1 / num.animationIncrement);
+							if (num.isGeoAngle())
+								newValue = Kernel.PI_180 * app.getKernel().checkDecimalFraction(newValue * Kernel.CONST_180_PI, 1 / num.animationIncrement);
+							else
+								newValue = app.getKernel().checkDecimalFraction(newValue, 1 / num.animationIncrement);
 						}
 						num.setValue(newValue);					
 					} 
diff --git a/geogebra/plugin/GgbAPI.java b/geogebra/plugin/GgbAPI.java
index a32cfcc..1a17942 100644
--- a/geogebra/plugin/GgbAPI.java
+++ b/geogebra/plugin/GgbAPI.java
@@ -22,6 +22,7 @@ import geogebra.kernel.GeoVector;
 import geogebra.kernel.Kernel;
 import geogebra.kernel.PointProperties;
 import geogebra.kernel.Traceable;
+import geogebra.kernel.arithmetic.MyBoolean;
 import geogebra.kernel.arithmetic.NumberValue;
 import geogebra.kernel.commands.AlgebraProcessor;
 import geogebra.main.Application;
@@ -230,11 +231,23 @@ public class GgbAPI {
 	public synchronized boolean evalCommand(String cmdString) {
 		
 		//Application.debug("evalCommand called..."+cmdString);
+		GeoElement [] result;
 		
-		GeoElement [] result = kernel.getAlgebraProcessor().
-								processAlgebraCommand(cmdString, false);
-		// return success
-		return result != null;
+		if (cmdString.indexOf('\n') == -1) {
+			result = kernel.getAlgebraProcessor().processAlgebraCommand(cmdString, false);
+			// return success
+			return result != null;
+			
+		}
+
+		boolean ret = true;
+		String[] cmdStrings = cmdString.split("[\\n]+");
+		for (int i = 0 ; i < cmdStrings.length ; i++) {
+			result = kernel.getAlgebraProcessor().processAlgebraCommand(cmdStrings[i], false);
+			ret = ret & (result != null);
+		}
+		
+		return ret;
 	}
 
 	/**
@@ -302,7 +315,7 @@ public class GgbAPI {
 	public synchronized void openFile(String strURL) {
 		try {
 			String lowerCase = strURL.toLowerCase(Locale.US);
-			URL url = new URL(lowerCase);
+			URL url = new URL(strURL);
 			app.loadXML(url, lowerCase.endsWith(Application.FILE_EXT_GEOGEBRA_TOOL));
 		} catch (Exception e) {
 			e.printStackTrace();
@@ -806,6 +819,9 @@ public class GgbAPI {
 	 */
 	public synchronized void setAxesVisible(boolean xVisible, boolean yVisible) {		
 		app.getEuclidianView().showAxes(xVisible, yVisible);
+		//app.getEuclidianView().updateBackground();
+		//app.refreshViews();
+		kernel.notifyRepaint();
 	}	
 	
 	/**
diff --git a/geogebra/properties/command.properties b/geogebra/properties/command.properties
index b8f9aa3..98c06ec 100644
--- a/geogebra/properties/command.properties
+++ b/geogebra/properties/command.properties
@@ -525,7 +525,7 @@ SimplifySyntax=Simplify[ <Function> ]
 #toStringSyntax=ToString[ <Object> ]
 #replaced with
 Text=Text
-TextSyntax=Text[ <Object> ]\nText[ <Object>, <Boolean for Substitution of Variables> ]\nText[ <Object>, <Point> ]\nText[ <Object>, <Point>, <Boolean for Substitution of Variables> ]
+TextSyntax=Text[ <Object> ]\nText[ <Object>, <Boolean for Substitution of Variables> ]\nText[ <Object>, <Point> ]\nText[ <Object>, <Point>, <Boolean for Substitution of Variables> ]\nText[ <Object>, <Point> ]\nText[ <Object>, <Point>, <Boolean for Substitution of Variables>, <LaTeX formula> ]
 
 FitSin=FitSin
 FitSinSyntax=FitSin[ <List of Points> ]
diff --git a/geogebra/properties/command_ca.properties b/geogebra/properties/command_ca.properties
index 5d57875..b0c1f78 100644
--- a/geogebra/properties/command_ca.properties
+++ b/geogebra/properties/command_ca.properties
@@ -34,7 +34,7 @@ AxisStepYSyntax=PasEixX[]
 BarChart=GràficdeBarres
 BarChartSyntax=GràficdeBarres[ <Llista de Dades>, <Llista de Freqüències> ] \n\
 		GràficdeBarres[ <Llista de Dades>, <Llista de Freqüències>, <Amplada de les Barres> ] \n\
-		GràficdeBarres[ <Llista de Totes les Dades>, <Amplada de la Classe> ] \n\
+		GràficdeBarres[ <Llista de Totes les Dades>, <Amplada de les Classes> ] \n\
 		GràficdeBarres[<Valor Inicial>, <Valor Final>, <Llista de les Altures> ] \n\
 		GràficdeBarres[ <Valor Inicial>, <Valor Final>, <Expressió>, <Variable>, <Des del Nombre>, <Fins al Nombre>] \n\
 		GràficdeBarres[ <Valor Inicial>, <Valor Final>, <Expressió>, <Variable>, <Des del Nombre>, <Fins al Nombre>, <Amplada del Pas>] \n\
@@ -106,8 +106,8 @@ DeterminantSyntax=Determinant[ <Matriu> ]
 Diameter=Diàmetre
 DiameterSyntax=Diàmetre[ <Vector> , <Cònica> ]\n\
 		Diàmetre[ <Recta> , <Cònica> ]
-Dilate=Homotècia
-DilateSyntax=Homotècia[ <Objecte> , <Raó> , <Punt> ]
+Dilate=Homotecia
+DilateSyntax=Homotecia[ <Objecte> , <Raó> , <Punt> ]
 Direction=Direcció
 DirectionSyntax=Direcció[ <Recta> ]
 Directrix=Directriu
@@ -204,9 +204,9 @@ KeepIfSyntax=TriaSi[ <Condici
 LCM=MCM
 LCMSyntax=MCM[ <Nombre>, <Nombre> ]\n\
 		MCM[ <Llista de Nombres> ]
-LaTeX=LaTeX
-LaTeXSyntax=LaTeX[ <Objecte> ]\n\
-		LaTeX[ <Objecte>, <Booleana per Substitució de Variables> ]
+LaTeX=FórmulaText
+LaTeXSyntax=FórmulaText[ <Objecte> ]\\nFórmulaText[ <Objecte>, <Booleana per Substitució de Variables> ]\n\
+		
 Last=Últim
 LastSyntax=Últim[ <Llista> , <Nombre d'Elements> ]
 Length=Longitud
@@ -405,7 +405,10 @@ TangentSyntax=Tangent[ <Punt> , <C
 		Tangent[ <Punt> , <Funció> ]
 TaylorSeries=PolinomiDeTaylor
 TaylorSeriesSyntax=PolinomiDeTaylor[ <Funció> , <Nombre> , <Nombre> ]
-Text=
+# Text=Text
+# SintaxiText=Text[ <Objecte> ]
+# substituir amb
+Text=Text
 TextSyntax=Text[ <Objecte> ]\n\
 		Text[ <Objecte>, <Booleana per a Substitució de Variables> ]\n\
 		Text[ <Objecte>, <Punt> ]\n\
diff --git a/geogebra/properties/command_da.properties b/geogebra/properties/command_da.properties
index 9e19fb7..5274bdb 100644
--- a/geogebra/properties/command_da.properties
+++ b/geogebra/properties/command_da.properties
@@ -74,8 +74,8 @@ ColumnName=S
 ColumnNameSyntax=SøjleNavn[ <celle>]
 ColumnSyntax=Søjle[ <celle>]
 Command=Kommando
-Conic=Konisk
-ConicSyntax=Konisk[ <Punkt1>, <Punkt2>, <Punkt3>, <Punkt4>, <Punkt5> ]
+Conic=Keglesnit
+ConicSyntax=Keglesnit[ <Punkt1>, <Punkt2>, <Punkt3>, <Punkt4>, <Punkt5> ]
 ConstructionStep=Konstruktionstrin
 ConstructionStepSyntax=Konstruktionstrin[]\n\
 		Konstruktionstrin[<Objekt>]
diff --git a/geogebra/properties/command_nl.properties b/geogebra/properties/command_nl.properties
index e71833a..c77a665 100644
--- a/geogebra/properties/command_nl.properties
+++ b/geogebra/properties/command_nl.properties
@@ -288,9 +288,9 @@ OrthogonalLineSyntax=Loodlijn[ <Punt>, <Rechte> ]\n\
 OrthogonalVector=Normaalvector
 OrthogonalVectorSyntax=Normaalvector[ <Rechte> ]\n\
 		Normaalvector[ <Vector> ]
-OsculatingCircle=OsculerendeCirkel
-OsculatingCircleSyntax=OsculerendeCirkel[ <Punt>, <Functie> ]\n\
-		OsculerendeCirkel[ <Punt>, <Kromme> ]
+OsculatingCircle=Osculatiecirkel
+OsculatingCircleSyntax=Osculatiecirkel[ <Punt>, <Functie> ]\n\
+		Osculatiecirkel[ <Punt>, <Kromme> ]
 Parabola=Parabool
 ParabolaSyntax=Parabool[ <Punt>, <Rechte> ]
 Parameter=Parameter
diff --git a/geogebra/properties/command_sq.properties b/geogebra/properties/command_sq.properties
index 531f7fe..f691305 100644
--- a/geogebra/properties/command_sq.properties
+++ b/geogebra/properties/command_sq.properties
@@ -29,7 +29,7 @@ AsymptoteSyntax=Syprine[ <Pike>, ..., <Pike> ]\n\
 Axes=Boshte
 AxesSyntax=Boshte[ <Konike> ]
 AxisStepX=HapiBoshtorX
-AxisStepXSyntax=\ HapiBoshtorX[]
+AxisStepXSyntax=HapiBoshtorX[]
 AxisStepY=HapiBoshtorY
 AxisStepYSyntax=HapiBoshtorY[]
 BarChart=DiagrameShtylle
@@ -71,7 +71,7 @@ ColumnNameSyntax=EmerKolone[ <Qeliza e Faqes se hapur> ]
 ColumnSyntax=Kolone[ <Qeliza e Faqes se hapur> ]
 Command=Komande
 Conic=Konike
-ConicSyntax=Konike[ <Pike>, <Pike>, <Pike>, <Pike>, <Pike>\ 
+ConicSyntax=Konike[ <Pike>, <Pike>, <Pike>, <Pike>, <Pike>
 ConstructionStep=HapNdertimi
 ConstructionStepSyntax=HapNdertimi[ <Objekt> ]
 Corner=Qoshe
@@ -79,7 +79,7 @@ CornerSyntax=Qoshe[ <Imazh>, <Numri i Qoshes> ]\n\
 		Qoshe[ <Tekst>, <Numri i Qoshes> ]\n\
 		Qoshe[ <Numri i Qoshes> ]
 CountIf=NumeroNqs
-CountIfSyntax=NumeroNqs[ <Kondita>, <Lista>\ 
+CountIfSyntax=NumeroNqs[ <Kondita>, <Lista>
 Covariance=Kovariance
 CovarianceSyntax=Kovariance[ <Liste Numrash>, <Liste Numrash> ]\n\
 		Kovariance[ <Liste Pikash> ]
@@ -188,7 +188,7 @@ IntersectSyntax=Nderpres[ <Objekt>, <Objekt> ]\n\
 Intersection=Prerje
 IntersectionSyntax=Prerje[ <Liste>, <Liste> ]
 InverseNormal=InversNormale
-InverseNormalSyntax=InverseNormale[ <Mesatare>, < Shmangie Standarde>, <Probabilitet>\ 
+InverseNormalSyntax=InverseNormale[ <Mesatare>, < Shmangie Standarde>, <Probabilitet>
 Invert=Invertoj
 InvertSyntax=Invertoj[ <Matrice> ]
 IsInteger=NumeriPlote
diff --git a/geogebra/properties/command_vi.properties b/geogebra/properties/command_vi.properties
index d0196b6..9f90be2 100644
--- a/geogebra/properties/command_vi.properties
+++ b/geogebra/properties/command_vi.properties
@@ -1,6 +1,6 @@
 
-AffineRatio=HeSoTuongQuan
-AffineRatioSyntax=H\u1ec7S\u1ed1T\u01b0\u01a1ngQuan[ <\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m> ]
+AffineRatio=TiSoDon
+AffineRatioSyntax=T\u1ec9S\u1ed1\u0110\u01a1n[ <\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m> ]
 Angle=Goc
 AngleSyntax=Góc[<s\u1ed1>]\n\
 		Góc[<véct\u01a1>]\n\
@@ -9,44 +9,44 @@ AngleSyntax=G
 		Góc[<\u0111\u01b0\u1eddng th\u1eb3ng>, <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
 		Góc[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
 		Góc[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <góc>]\n\
-		Góc[<\u0111\u01b0\u1eddng Conic>]\n\
+		Góc[<\u0111\u01b0\u1eddng côníc>]\n\
 		Góc[< \u0111a giác>]\n\
 		
 AngularBisector=DuongPhanGiac
 AngularBisectorSyntax=\u0110\u01b0\u1eddngPhânGiác[<\u0111\u01b0\u1eddng th\u1eb3ng>, <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
 		\u0110\u01b0\u1eddngPhânGiác[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
-Append=Chèn
-AppendSyntax=Chèn[<Danh sách>,<\u0110\u1ed1i t\u01b0\u1ee3ng>]\n\
-		Chèn[<\u0110\u1ed1i t\u01b0\u1ee3ng>,<Danh sách>]
+Append=ChenNoi
+AppendSyntax=ChènN\u1ed1i[<danh sách>,<\u0111\u1ed1i t\u01b0\u1ee3ng>]\n\
+		ChènN\u1ed1i[<\u0111\u1ed1i t\u01b0\u1ee3ng>,<danh sách>]
 Arc=Cung
-ArcSyntax=Cung[<\u0111\u01b0\u1eddng Conic>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
-		Cung[<\u0111\u01b0\u1eddng Conic>, <s\u1ed1>, <s\u1ed1>]
+ArcSyntax=Cung[<\u0111\u01b0\u1eddng côníc>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
+		Cung[<\u0111\u01b0\u1eddng côníc>, <s\u1ed1>, <s\u1ed1>]
 Area=DienTich
 AreaSyntax=Di\u1ec7nTích[<\u0111i\u1ec3m>, ... , <\u0111i\u1ec3m>]
 Asymptote=TiemCan
-AsymptoteSyntax=Ti\u1ec7mC\u1eadn[<\u0111\u01b0\u1eddng conic>]
+AsymptoteSyntax=Ti\u1ec7mC\u1eadn[<\u0111\u01b0\u1eddng côníc>]
 Axes=Truc
-AxesSyntax=Tr\u1ee5c[<\u0111\u01b0\u1eddng Conic>]
-AxisStepX=\u0110\u01a1nv\u1ecbTr\u1ee5cX
+AxesSyntax=Tr\u1ee5c[<\u0111\u01b0\u1eddng côníc>]
+AxisStepX=DonViTrucX
 AxisStepXSyntax=\u0110\u01a1nv\u1ecbTr\u1ee5cX[]
-AxisStepY=\u0110\u01a1nv\u1ecbTr\u1ee5cY
+AxisStepY=DonViTrucY
 AxisStepYSyntax=\u0110\u01a1nv\u1ecbTr\u1ee5cY[]
-BarChart=Bi\u1ec3u\u0110\u1ed3
-BarChartSyntax=Bi\u1ec3u\u0110\u1ed3[ <Danh sách d\u1eef li\u1ec7u>, <Danh sách t\u1ea7n s\u1ed1> ]\n\
-		Bi\u1ec3u\u0110\u1ed3[ <Danh sách d\u1eef li\u1ec7u>, <List of Frequencies>, <Width of Bars> ]\n\
-		Bi\u1ec3u\u0110\u1ed3[ <Danh sách d\u1eef li\u1ec7u thô>, <Width of Bars> ]\n\
-		Bi\u1ec3u\u0110\u1ed3[ <Giá tr\u1ecb b\u1eaft \u0111\u1ea7u>, <Giá tr\u1ecb k\u1ebft thúc>, <Danh sách chi\u1ec1u cao> ]\n\
-		Bi\u1ec3u\u0110\u1ed3[ <Giá tr\u1ecb b\u1eaft \u0111\u1ea7u>, <Giá tr\u1ecb k\u1ebft thúc>, <Bi\u1ec3u th\u1ee9c>, <Bi\u1ebfn>, <T\u1eeb s\u1ed1>, <\u0110\u1ebfn s\u1ed1> ]\n\
-		Bi\u1ec3u\u0110\u1ed3[ <Giá tr\u1ecb b\u1eaft \u0111\u1ea7u>, <Giá tr\u1ecb k\u1ebft thúc>, <Bi\u1ec3u th\u1ee9c>, <Bi\u1ebfn>, <T\u1eeb s\u1ed1>, <\u0110\u1ebfn s\u1ed1>, <B\u01b0\u1edbc> ]
-Binomial=Nh\u1ecbTh\u1ee9c
-BinomialSyntax=Tr\u01b0\u1eddngNh\u1ecbTh\u1ee9c[<S\u1ed1>,<S\u1ed1>]
-BoxPlot=\u0110\u1ed3Th\u1ecbH\u1ed9p
-BoxPlotSyntax=\u0110\u1ed3Th\u1ecbH\u1ed9p[ <NhánhY>, <T\u1ec9L\u1ec7Y>, <Danh sách d\u1eef li\u1ec7u thô> ]\n\
-		\u0110\u1ed3Th\u1ecbH\u1ed9p[ <NhánhY>, <T\u1ec9L\u1ec7Y>, <Giá tr\u1ecb  b\u1eaft \u0111\u1ea7u>, <Q1>, <Tâm>, <Q3>, <Giá tr\u1ecb k\u1ebft thúc> ]
-CellRange=DãyÔ
-CellRangeSyntax=DãyÔ[<Ô b\u1eaft \u0111\u1ea7u>,<Ô k\u1ebft thúc>]
+BarChart=BieuDoHinhCot
+BarChartSyntax=Bi\u1ec3u\u0110\u1ed3HìnhC\u1ed9t[ <danh sách d\u1eef li\u1ec7u>, <danh sách t\u1ea7n s\u1ed1> ]\n\
+		Bi\u1ec3u\u0110\u1ed3HìnhC\u1ed9t[ <danh sách d\u1eef li\u1ec7u>, <danh sách t\u1ea7n s\u1ed1>, <\u0111\u1ed9 r\u1ed9ng c\u1ee7a c\u1ed9t> ]\n\
+		Bi\u1ec3u\u0110\u1ed3HìnhC\u1ed9t[ <danh sách d\u1eef li\u1ec7u thô>, <\u0111\u1ed9 r\u1ed9ng c\u1ee7a c\u1ed9t> ]\n\
+		Bi\u1ec3u\u0110\u1ed3HìnhC\u1ed9t[ <giá tr\u1ecb b\u1eaft \u0111\u1ea7u>, <giá tr\u1ecb k\u1ebft thúc>, <danh sách chi\u1ec1u cao> ]\n\
+		Bi\u1ec3u\u0110\u1ed3HìnhC\u1ed9t[ <giá tr\u1ecb b\u1eaft \u0111\u1ea7u>, <giá tr\u1ecb k\u1ebft thúc>, <bi\u1ec3u th\u1ee9c>, <bi\u1ebfn>, <t\u1eeb s\u1ed1...>, <\u0111\u1ebfn s\u1ed1...> ]\n\
+		Bi\u1ec3u\u0110\u1ed3HìnhC\u1ed9t[ <giá tr\u1ecb b\u1eaft \u0111\u1ea7u>, <giá tr\u1ecb k\u1ebft thúc>, <bi\u1ec3u th\u1ee9c>, <bi\u1ebfn>, <t\u1eeb s\u1ed1...>, <\u0111\u1ebfn s\u1ed1...>, <b\u01b0\u1edbc nh\u1ea3y> ]
+Binomial=NhiThuc
+BinomialSyntax=Nh\u1ecbTh\u1ee9c[<s\u1ed1>,<s\u1ed1>]
+BoxPlot=BieuDoHinhHop
+BoxPlotSyntax=Bi\u1ec3u\u0110\u1ed3HìnhH\u1ed9p[ <nhánh Y>, <t\u1ec9 l\u1ec7 Y>, <danh sách d\u1eef li\u1ec7u thô> ]\n\
+		Bi\u1ec3u\u0110\u1ed3HìnhH\u1ed9p[ <nhánh Y>, <t\u1ec9 l\u1ec7 Y>, <giá tr\u1ecb  b\u1eaft \u0111\u1ea7u>, <Q1>, <tâm>, <Q3>, <giá tr\u1ecb k\u1ebft thúc> ]
+CellRange=DayO
+CellRangeSyntax=DãyÔ[<ô b\u1eaft \u0111\u1ea7u>,<ô k\u1ebft thúc>]
 Center=Tam
-CenterSyntax=Tâm[<\u0111\u01b0\u1eddng Conic>]
+CenterSyntax=Tâm[<\u0111\u01b0\u1eddng côníc>]
 Centroid=TrongTam
 CentroidSyntax=Tr\u1ecdngTâm[<\u0111a giác>]
 Circle=DuongTron
@@ -58,41 +58,41 @@ CircleSyntax=\u0110\u01b0\u1eddngTr
 		\u0110\u01b0\u1eddngTròn[<\u0111i\u1ec3m>, <\u0111o\u1ea1n th\u1eb3ng>]\n\
 		\u0110\u01b0\u1eddngTròn[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
 		\u0110\u01b0\u1eddngTròn[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
-CircumcircleArc=CungTronQua3Diem
+CircumcircleArc=CungTron3Diem
 CircumcircleArcSyntax=CungTrònQua3\u0110i\u1ec3m[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
-CircumcircleSector=HinhQuatQua3Diem
+CircumcircleSector=HinhQuat3Diem
 CircumcircleSectorSyntax=HìnhQu\u1ea1tQua3\u0110i\u1ec3m[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
 Circumference=ChuViConic
-CircumferenceSyntax=ChuViConic[ <Conic> ]
-Column=C\u1ed9t
-ColumnName=TênC\u1ed9t
-ColumnNameSyntax=TênC\u1ed9t[<Ô b\u1ea3ng tính>]
-ColumnSyntax=C\u1ed9t[<Ô b\u1ea3ng tính>]
-Command=L\u1ec7nh
+CircumferenceSyntax=ChuViConic[ <\u0111\u01b0\u1eddng côníc> ]
+Column=Cot
+ColumnName=TenCot
+ColumnNameSyntax=TênC\u1ed9t[<ô b\u1ea3ng tính>]
+ColumnSyntax=C\u1ed9t[<ô b\u1ea3ng tính>]
+Command=Câu l\u1ec7nh
 Conic=Conic
-ConicSyntax=Conic[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
-ConstructionStep=B\u01b0\u1edbcD\u1ef1ng
+ConicSyntax=Côníc[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
+ConstructionStep=BuocDung
 ConstructionStepSyntax=B\u01b0\u1edbcD\u1ef1ng[]\n\
-		B\u01b0\u1edbcD\u1ef1ng[<\u0110\u1ed1i t\u01b0\u1ee3ng>]
+		B\u01b0\u1edbcD\u1ef1ng[<\u0111\u1ed1i t\u01b0\u1ee3ng>]
 Corner=GocAnh
 CornerSyntax=Góc\u1ea2nh[<\u1ea3nh>, <\u0111\u1ec9nh>]
-CountIf=\u0110\u1ebfmCó\u0110i\u1ec1uKi\u1ec7n
-CountIfSyntax=\u0110\u1ebfmCó\u0110i\u1ec1uKi\u1ec7n[<\u0110i\u1ec1u ki\u1ec7n>,<Danh sách>]
-Covariance=Hi\u1ec7pPh\u01b0\u01a1ngSai
-CovarianceSyntax=Hi\u1ec7pPh\u01b0\u01a1ngSai[<Danh sách s\u1ed1>,<Danh sách s\u1ed1>]\n\
-		Hi\u1ec7pPh\u01b0\u01a1ngSai[<Danh sách \u0111i\u1ec3m>]
-CrossRatio=HeSoKep
-CrossRatioSyntax=H\u1ec7S\u1ed1Kép[ <\u0111i\u1ec3m>, <\u0111i\u1ec3mt>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m> ]
+CountIf=DemDieuKien
+CountIfSyntax=\u0110\u1ebfm\u0110i\u1ec1uKi\u1ec7n[<\u0111i\u1ec1u ki\u1ec7n>,<danh sách>]
+Covariance=HiepPhuongSai
+CovarianceSyntax=Hi\u1ec7pPh\u01b0\u01a1ngSai[<danh sách s\u1ed1>,<danh sách s\u1ed1>]\n\
+		Hi\u1ec7pPh\u01b0\u01a1ngSai[<danh sách \u0111i\u1ec3m>]
+CrossRatio=TiSoKep
+CrossRatioSyntax=T\u1ec9S\u1ed1Kép[ <\u0111i\u1ec3m>, <\u0111i\u1ec3mt>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m> ]
 Curvature=DoCong
 CurvatureSyntax=\u0110\u1ed9Cong[ <\u0111i\u1ec3m>, <hàm s\u1ed1> ]\n\
 		\u0110\u1ed9Cong[ <\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng cong> ]
 CurvatureVector=VectoDoCong
 CurvatureVectorSyntax=Vect\u01a1\u0110\u1ed9Cong[ <\u0111i\u1ec3m>, <hàm s\u1ed1> ]\n\
 		Vect\u01a1\u0110\u1ed9Cong[ <\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng cong> ]
-CurveCartesian=DoCong
-CurveCartesianSyntax=\u0110\u1ed9Cong[ <bi\u1ec3u th\u1ee9c>, <bi\u1ec3u th\u1ee9c>, <bi\u1ebfn s\u1ed1>, <t\u1eeb>, <\u0111\u1ebfn> ]
-Defined=\u0110ã\u0110\u1ecbnhNgh\u0129a
-DefinedSyntax=\u0110ã\u0110\u1ecbnhNgh\u0129a[<\u0110\u1ed1i t\u01b0\u1ee3ng>]
+CurveCartesian=DoCongToaDo
+CurveCartesianSyntax=\u0110\u1ed9Cong\u0110\u1ec1Các[ <bi\u1ec3u th\u1ee9c>, <bi\u1ec3u th\u1ee9c>, <bi\u1ebfn s\u1ed1>, <t\u1eeb>, <\u0111\u1ebfn> ]
+Defined=DaDinhNghia
+DefinedSyntax=\u0110ã\u0110\u1ecbnhNgh\u0129a[<\u0111\u1ed1i t\u01b0\u1ee3ng>]
 Delete=Xoa
 DeleteSyntax=Xóa[<\u0111\u1ed1i t\u01b0\u1ee3ng>]
 Derivative=DaoHam
@@ -100,128 +100,130 @@ DerivativeSyntax=\u0110\u1ea1oH
 		\u0110\u1ea1oHàm[<hàm s\u1ed1>, < s\u1ed1>]\n\
 		\u0110\u1ea1oHàm[ <\u0111\u01b0\u1eddng cong> ]\n\
 		\u0110\u1ea1oHàm[ <\u0111\u01b0\u1eddng cong>, <s\u1ed1> ]
-Determinant=\u0110\u1ecbnhTh\u1ee9c
-DeterminantSyntax=\u0110\u1ecbnhTh\u1ee9c[<Matr\u1eadn>]
+Determinant=DinhThuc
+DeterminantSyntax=\u0110\u1ecbnhTh\u1ee9c[<ma tr\u1eadn>]
 Diameter=DuongKinh
-DiameterSyntax=\u0110\u01b0\u1eddngKính[<véct\u01a1>, <\u0111\u01b0\u1eddng Conic>]\n\
-		\u0110\u01b0\u1eddngKính[<\u0111\u01b0\u1eddng th\u1eb3ng>, <\u0111\u01b0\u1eddng Conic>]
-Dilate=ThayDoiHinhDangKichThuoc
-DilateSyntax=Thay\u0110\u1ed5iHìnhD\u1ea1ngKíchTh\u01b0\u1edbc[<\u0111i\u1ec3m>, <s\u1ed1>, <\u0111i\u1ec3m>]\n\
-		Thay\u0110\u1ed5iHìnhD\u1ea1ngKíchTh\u01b0\u1edbc[<\u0111\u01b0\u1eddng th\u1eb3ng>, <s\u1ed1>, <\u0111i\u1ec3m>]\n\
-		Thay\u0110\u1ed5iHìnhD\u1ea1ngKíchTh\u01b0\u1edbc[<\u0111\u01b0\u1eddng Conic>, <\u0111i\u1ec3m>]\n\
-		Thay\u0110\u1ed5iHìnhD\u1ea1ngKíchTh\u01b0\u1edbc[<\u0111a giác>, <s\u1ed1>, <\u0111i\u1ec3m>]\n\
-		Thay\u0110\u1ed5iHìnhD\u1ea1ngKíchTh\u01b0\u1edbc[<\u0111a giác>, <s\u1ed1>, <\u0111i\u1ec3m>]
+DiameterSyntax=\u0110\u01b0\u1eddngKính[<véct\u01a1>, <\u0111\u01b0\u1eddng côníc>]\n\
+		\u0110\u01b0\u1eddngKính[<\u0111\u01b0\u1eddng th\u1eb3ng>, <\u0111\u01b0\u1eddng côníc>]
+Dilate=PhepViTu
+DilateSyntax=PhépV\u1ecbT\u1ef1[<\u0111i\u1ec3m>, <t\u1ec9 s\u1ed1 v\u1ecb t\u1ef1>, <\u0111i\u1ec3m>]\n\
+		PhépV\u1ecbT\u1ef1[<\u0111\u01b0\u1eddng th\u1eb3ng>, <t\u1ec9 s\u1ed1 v\u1ecb t\u1ef1>, <\u0111i\u1ec3m>]\n\
+		PhépV\u1ecbT\u1ef1[<\u0111\u01b0\u1eddng côníc>, <\u0111i\u1ec3m>]\n\
+		PhépV\u1ecbT\u1ef1[<\u0111a giác>, <t\u1ec9 s\u1ed1 v\u1ecb t\u1ef1>, <\u0111i\u1ec3m>]\n\
+		PhépV\u1ecbT\u1ef1[<\u0111a giác>, <t\u1ec9 s\u1ed1 v\u1ecb t\u1ef1>, <\u0111i\u1ec3m>]
 Direction=VectoChiPhuong
 DirectionSyntax=Véct\u01a1Ch\u1ec9Ph\u01b0\u01a1ng<\u0111\u01b0\u1eddng th\u1eb3ng>]
 Directrix=DuongChuan
-DirectrixSyntax=\u0110\u01b0\u1eddngChu\u1ea9n[<\u0111\u01b0\u1eddng Conic>]
+DirectrixSyntax=\u0110\u01b0\u1eddngChu\u1ea9n[<\u0111\u01b0\u1eddng côníc>]
 Distance=KhoangCach
 DistanceSyntax=Kho\u1ea3ngCách[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
 		Kho\u1ea3ngCách[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
 		Kho\u1ea3ngCách[<\u0111\u01b0\u1eddng th\u1eb3ng>, <\u0111i\u1ec3m>]
 Div=PhanNguyen
 DivSyntax=Ph\u1ea7nNguyên[ <s\u1ed1>, <s\u1ed1> ]
-Element=YeuTo
-ElementSyntax=Y\u1ebfuT\u1ed1[ <Danh sách>, <s\u1ed1> ]
+Element=PhanTu
+ElementSyntax=Ph\u1ea7nT\u1eed[ <danh sách>, <s\u1ed1> ]
 Ellipse=Elip
-EllipseSyntax=Elip[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <ch\u1eef s\u1ed1>]\n\
-		Elip[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111o\u1ea1n th\u1eb3ng>]
+EllipseSyntax=Elíp[<tiêu \u0111i\u1ec3m>, <tiêu \u0111i\u1ec3m>, <\u0111\u1ed9 dài n\u1eeda tr\u1ee5c l\u1edbn>]\n\
+		Elíp[<tiêu \u0111i\u1ec3m>, <tiêu \u0111i\u1ec3m>, <\u0111o\u1ea1n th\u1eb3ng>]\n\
+		Elíp[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
 Excentricity=TamSai
-ExcentricitySyntax=TâmSai[<\u0111\u01b0\u1eddng Conic>]
-Expand=M\u1edfR\u1ed9ng
-ExpandSyntax=M\u1edfR\u1ed9ng[<Hàm>]
+ExcentricitySyntax=TâmSai[<\u0111\u01b0\u1eddng côníc>]
+Expand=KhaiTrien
+ExpandSyntax=KhaiTri\u1ec3n[<hàm s\u1ed1>]
 Extremum=CucTri
 ExtremumSyntax=C\u1ef1cTr\u1ecb[<\u0111a th\u1ee9c>]
-Factor=NhânT\u1eed
-FactorSyntax=NhânT\u1eed[<\u0110aTh\u1ee9c>]
-First=Ph\u1ea7nT\u1eedTh\u1ee9Nh\u1ea5t
-FirstAxis=TrucThuNhat
-FirstAxisLength=DoDaiTrucThuNhat
-FirstAxisLengthSyntax=\u0110\u1ed9DàiTr\u1ee5cTh\u1ee9Nh\u1ea5t[<\u0111\u01b0\u1eddng Conic>]
-FirstAxisSyntax=Tr\u1ee5cTh\u1ee9Nh\u1ea5t[<\u0111\u01b0\u1eddng Conic>]
-FirstSyntax=Ph\u1ea7nT\u1eedTh\u1ee9Nh\u1ea5t[<Danhsách>]\n\
-		Ph\u1ea7nT\u1eedTh\u1ee9Nh\u1ea5t[<Danhsách>,<S\u1ed1 ph\u1ea7n t\u1eed>]
-FitExp=TínhH\u1ed3iQuyM\u0169
-FitExpSyntax=TínhH\u1ed3iQuyM\u0169[<Danh sách \u0111i\u1ec3m>]
-FitLineX=TínhH\u1ed3iQuy\u0110\u01b0\u1eddngX
-FitLineXSyntax=TínhH\u1ed3iQuy\u0110\u01b0\u1eddngX[<Danh sách \u0111i\u1ec3m>]
-FitLineY=TínhH\u1ed3iQuy\u0110\u01b0\u1eddngY
-FitLineYSyntax=TínhH\u1ed3iQuy\u0110\u01b0\u1eddngY[<Danh sách \u0111i\u1ec3m>]
-FitLog=TínhH\u1ed3iQuyLogarít
-FitLogSyntax=TínhH\u1ed3iQuyLogarít[<Danh sách \u0111i\u1ec3m>]
-FitLogistic=TínhH\u1ed3iQuyLôgistic
-FitLogisticSyntax=TínhH\u1ed3iQuyLôgistic[<Danh sách \u0111i\u1ec3m>]
-FitPoly=TínhH\u1ed3iQuy\u0110aTh\u1ee9c
-FitPolySyntax=TínhH\u1ed3iQuy\u0110aTh\u1ee9c[<Danh sách \u0111i\u1ec3m>,<C\u1ea5p \u0111a th\u1ee9c>]
-FitPow=TínhH\u1ed3iQuyLu\u1ef9Th\u1eeba
-FitPowSyntax=TínhH\u1ed3iQuyLu\u1ef9Th\u1eeba[<Danh sách \u0111i\u1ec3m>]
-FitSin=TínhH\u1ed3iQuySin
-FitSinSyntax=TínhH\u1ed3iQuySin[<Danh sách \u0111i\u1ec3m>]
+Factor=NhanTu
+FactorSyntax=NhânT\u1eed[<\u0111a th\u1ee9c>]
+First=PhanTuThuNhat
+FirstAxis=TrucLon
+FirstAxisLength=DoDaiTrucLon
+FirstAxisLengthSyntax=\u0110\u1ed9DàiTr\u1ee5cTh\u1ee9Nh\u1ea5t[<\u0111\u01b0\u1eddng côníc>]
+FirstAxisSyntax=Tr\u1ee5cL\u1edbn[<\u0111\u01b0\u1eddng côníc>]
+FirstSyntax=Ph\u1ea7nT\u1eedTh\u1ee9Nh\u1ea5t[<danhsách>]\n\
+		Ph\u1ea7nT\u1eedTh\u1ee9Nh\u1ea5t[<danhsách>,<s\u1ed1 ph\u1ea7n t\u1eed>]
+FitExp=TinhHoiQuyMu
+FitExpSyntax=TínhH\u1ed3iQuyM\u0169[<danh sách \u0111i\u1ec3m>]
+FitLineX=TinhHoiQuyDuongX
+FitLineXSyntax=TínhH\u1ed3iQuy\u0110\u01b0\u1eddngX[<danh sách \u0111i\u1ec3m>]
+FitLineY=TinhHoiQuyDuongY
+FitLineYSyntax=TínhH\u1ed3iQuy\u0110\u01b0\u1eddngY[<danh sách \u0111i\u1ec3m>]
+FitLog=TinhHoiQuyLogarit
+FitLogSyntax=TínhH\u1ed3iQuyLôgarít[<danh sách \u0111i\u1ec3m>]
+FitLogistic=TinhHoiQuyLogistic
+FitLogisticSyntax=TínhH\u1ed3iQuyLôgistíc[<danh sách \u0111i\u1ec3m>]
+FitPoly=TinhHoiQuyDaThuc
+FitPolySyntax=TínhH\u1ed3iQuy\u0110aTh\u1ee9c[<danh sách \u0111i\u1ec3m>,<b\u1eadc c\u1ee7a \u0111a th\u1ee9c>]
+FitPow=TinhHoiQuyLuyThua
+FitPowSyntax=TínhH\u1ed3iQuyLu\u1ef9Th\u1eeba[<danh sách \u0111i\u1ec3m>]
+FitSin=TinhHoiQuySin
+FitSinSyntax=TínhH\u1ed3iQuySin[<danh sách \u0111i\u1ec3m>]
 Focus=TieuDiem
-FocusSyntax=Tiêu\u0110i\u1ec3m[<\u0111\u01b0\u1eddng Conic>]
-FractionText=PhânS\u1ed1
-FractionTextSyntax=PhânS\u1ed1[<S\u1ed1>]
+FocusSyntax=Tiêu\u0110i\u1ec3m[<\u0111\u01b0\u1eddng côníc>]
+FractionText=PhanSo
+FractionTextSyntax=PhânS\u1ed1[<s\u1ed1>]
 Function=HamSo
 FunctionSyntax=HàmS\u1ed1[<hàm s\u1ed1>, <s\u1ed1>, <s\u1ed1>]
-GCD=GCD
-GCDSyntax=GCD[<S\u1ed1>,<S\u1ed1>]\n\
-		GCD[<Danh sách s\u1ed1>]
-Histogram=Bi\u1ec3u\u0110\u1ed3T\u1ea7nS\u1ed1
-HistogramSyntax=Bi\u1ec3u\u0110\u1ed3T\u1ea7nS\u1ed1[<Danh sách các biên>,<Danh sách chi\u1ec1u cao>]\n\
-		Bi\u1ec3u\u0110\u1ed3T\u1ea7nS\u1ed1[<Danh sách các biên>,<Danh sách d\u1eef li\u1ec7u thô>]
-Hyperbola=Hyberbol
-HyperbolaSyntax=Hyperbol<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <s\u1ed1>]\n\
-		Hyperbol[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111o\u1ea1n th\u1eb3ng>]
-If=If
-IfSyntax=If[<\u0111i\u1ec1u ki\u1ec7n>, <thì>]\n\
-		If[<\u0111i\u1ec1u ki\u1ec7n>, <thì>, <ng\u01b0\u1ee3c l\u1ea1i>]
-Insert=Chèn
-InsertSyntax=Chèn[<Danh sách>,<Danh sách>,<V\u1ecb trí>]\n\
-		Chèn[<\u0110\u1ed1i t\u01b0\u1ee3ng>,<Danh sách>,<V\u1ecb trí>]
+GCD=USCLN
+GCDSyntax=\u01af\u1edbcS\u1ed1ChungL\u1edbnNh\u1ea5t[<s\u1ed1>,<s\u1ed1>]\n\
+		\u01af\u1edbcS\u1ed1ChungL\u1edbnNh\u1ea5t[<danh sách s\u1ed1>]
+Histogram=BieuDo
+HistogramSyntax=Bi\u1ec3u\u0110\u1ed3[<danh sách các biên>,<danh sách chi\u1ec1u cao>]\n\
+		Bi\u1ec3u\u0110\u1ed3[<danh sách các biên>,<danh sách d\u1eef li\u1ec7u thô>]
+Hyperbola=Hypebon
+HyperbolaSyntax=Hypebôn[<tiêu\u0111i\u1ec3m>, <tiêu \u0111i\u1ec3m>, <\u0111\u1ed9 dài n\u1eeda tr\u1ee5c l\u1edbn>]\n\
+		Hypebôn[<tiêu \u0111i\u1ec3m>, <tiêu \u0111i\u1ec3m>, <\u0111o\u1ea1n th\u1eb3ng>]\n\
+		Hypebôn[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
+If=Neu
+IfSyntax=N\u1ebfu[<\u0111i\u1ec1u ki\u1ec7n>, <thì>]\n\
+		N\u1ebfu[<\u0111i\u1ec1u ki\u1ec7n>, <thì>, <tr\u01b0\u1eddng h\u1ee3p khác>]
+Insert=Chen
+InsertSyntax=Chèn[<danh sách>,<danh sách>,<v\u1ecb trí>]\n\
+		Chèn[<\u0111\u1ed1i t\u01b0\u1ee3ng>,<danh sách>,<v\u1ecb trí>]
 Integral=TichPhan
 IntegralSyntax=TíchPhân[<hàm s\u1ed1>]\n\
-		TíchPhân[<hàm s\u1ed1>, <ch\u1eef s\u1ed1>, <s\u1ed1>]\n\
-		TíchPâhn[<hàm s\u1ed1>, <hàm s\u1ed1>, <s\u1ed1>, <s\u1ed1>]
+		TíchPhân[<hàm s\u1ed1>, <c\u1eadn d\u01b0\u1edbi>, <c\u1eadn trên>]\n\
+		TíchPhân[<hàm s\u1ed1>, <hàm s\u1ed1>, <c\u1eadn d\u01b0\u1edbi>, <c\u1eadn trên>]
 Intersect=GiaoDiem
 IntersectSyntax=Giao\u0110i\u1ec3m[<\u0111\u1ed1i t\u01b0\u1ee3ng>, <\u0111\u1ed1i t\u01b0\u1ee3ng>]\n\
-		Giao\u0110i\u1ec3m[<\u0111\u1ed1i t\u01b0\u1ee3ng>, <\u0111\u1ed1i t\u01b0\u1ee3ng>, <s\u1ed1>]\n\
-		Giao\u0110i\u1ec3m[<\u0111\u1ed5i t\u01b0\u1ee3ng>, <\u0111\u1ed1i t\u01b0\u1ee3ng>, <\u0111i\u1ec3m>]
+		Giao\u0110i\u1ec3m[<\u0111\u1ed1i t\u01b0\u1ee3ng>, <\u0111\u1ed1i t\u01b0\u1ee3ng>, <giao \u0111i\u1ec3m th\u1ee9...>]\n\
+		Giao\u0110i\u1ec3m[<\u0111\u1ed5i t\u01b0\u1ee3ng>, <\u0111\u1ed1i t\u01b0\u1ee3ng>, <\u0111i\u1ec3m \u0111\u1ea7u>]
 Intersection=Giao
-IntersectionSyntax=Giao[<Danh sách>,<Danh sách>]
-InverseNormal=Ngh\u1ecbch\u0110\u1ea3o
-InverseNormalSyntax=Ngh\u1ecbch\u0110\u1ea3o[<Trung bình>,<\u0110\u1ed9 l\u1ec7ch chu\u1ea9n>,<Xác su\u1ea5t>]
-Invert=Ngh\u1ecbch\u0110\u1ea3o
-InvertSyntax=Ngh\u1ecbch\u0110\u1ea3o[<Ma tr\u1eadn>]
-IsInteger=LàS\u1ed1Nguyên
-IsIntegerSyntax=LàS\u1ed1Nguyên[<S\u1ed1>]
+IntersectionSyntax=Giao[<danh sách>,<danh sách>]
+InverseNormal=NghichDaoThuong
+InverseNormalSyntax=Ngh\u1ecbch\u0110\u1ea3oTh\u01b0\u1eddng[<trung bình>,<\u0111\u1ed9 l\u1ec7ch chu\u1ea9n>,<xác su\u1ea5t>]
+Invert=NghichDao
+InvertSyntax=Ngh\u1ecbch\u0110\u1ea3o[<ma tr\u1eadn>]
+IsInteger=LaSoNguyen
+IsIntegerSyntax=LàS\u1ed1Nguyên[<s\u1ed1>]
 Iteration=Lap
 IterationList=DanhSachLap
 IterationListSyntax=DanhSáchL\u1eb7p[ <hàm s\u1ed1>, <giá tr\u1ecb b\u1eaft \u0111\u1ea7u>, <s\u1ed1 n> ]
 IterationSyntax=Lap[ <hàm s\u1ed1>, <giá tr\u1ecb x0>, <s\u1ed1 n> ]
-Join=H\u1ee3pN\u1ed1i
-JoinSyntax=H\u1ee3pN\u1ed1i[<Danh sách>,<Danh sách>, ...]\n\
-		H\u1ee3pN\u1ed1i[<T\u1eadp h\u1ee3p danh sách>]
-KeepIf=L\u1ecdc\u0110i\u1ec1uKi\u1ec7n
-KeepIfSyntax=L\u1ecdc\u0110i\u1ec1uKi\u1ec7n[<\u0110i\u1ec1u ki\u1ec7n>,<Danh sách>]
-LCM=LCM
-LCMSyntax=LCM[ <S\u1ed1>, <S\u1ed1> ]\n\
-		LCM[ <Danh sách s\u1ed1> ]
-LaTeX=CôngTh\u1ee9c
-LaTeXSyntax=CôngTh\u1ee9c[ <\u0110\u1ed1i t\u01b0\u1ee3ng> ]\n\
-		CôngTh\u1ee9c[ <\u0110\u1ed1i t\u01b0\u1ee3ng>, <True (Có), False (Không) Thay bi\u1ebfn vào ph\u01b0\u01a1ng trình> ]
-Last=Ph\u1ea7nT\u1eedCu\u1ed1i
-LastSyntax=Ph\u1ea7nT\u1eedCu\u1ed1i[ <Danh sách> ]\n\
-		Ph\u1ea7nT\u1eedCu\u1ed1i[ <Danh sách> , <S\u1ed1 các ph\u1ea7n t\u1eed> ]
+Join=HopNoi
+JoinSyntax=H\u1ee3pN\u1ed1i[<danh sách>,<danh sách>, ...]\n\
+		H\u1ee3pN\u1ed1i[<t\u1eadp h\u1ee3p danh sách>]
+KeepIf=LocDieuKien
+KeepIfSyntax=L\u1ecdc\u0110i\u1ec1uKi\u1ec7n[<\u0111i\u1ec1u ki\u1ec7n>,<danh sách>]
+LCM=BSCNN
+LCMSyntax=B\u1ed9iS\u1ed1ChungNh\u1ecfNh\u1ea5t[ <s\u1ed1>, <s\u1ed1> ]\n\
+		B\u1ed9iS\u1ed1ChungNh\u1ecfNh\u1ea5t[ <danh sách s\u1ed1> ]
+LaTeX=CongThucToan
+LaTeXSyntax=CôngTh\u1ee9cToán[ <\u0111\u1ed1i t\u01b0\u1ee3ng> ]\n\
+		CôngTh\u1ee9cToán[ <\u0111\u1ed1i t\u01b0\u1ee3ng>, <\u0110úng, Sai Thay bi\u1ebfn vào ph\u01b0\u01a1ng trình> ]
+Last=PhanTuCuoi
+LastSyntax=Ph\u1ea7nT\u1eedCu\u1ed1i[ <danh sách> ]\n\
+		Ph\u1ea7nT\u1eedCu\u1ed1i[ <danh sách> , <s\u1ed1 các ph\u1ea7n t\u1eed> ]
 Length=DoDai
-LengthSyntax=DoDai[ <Vec-t\u01a1> ]\n\
-		DoDai[ <\u0110i\u1ec3m> ]\n\
-		DoDai[<hàm s\u1ed1>, <s\u1ed1>, <s\u1ed1> ]\n\
-		DoDai[<hàm s\u1ed1>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m> ]\n\
-		DoDai[<\u0111\u01b0\u1eddng cong>, <s\u1ed1>, <s\u1ed1> ]\n\
-		DoDai[<\u0111\u01b0\u1eddng cong>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m> ]\n\
-		DoDai[ <danh sách > ]
-LetterToUnicode=KýT\u1ef1Unicode
-LetterToUnicodeSyntax=KýT\u1ef1Unicode[<Ký t\u1ef1>]
+LengthSyntax=\u0110\u1ed9Dài[ <véct\u01a1>\n\
+		\u0110\u1ed9Dài[ <\u0111i\u1ec3m> ]\n\
+		\u0110\u1ed9Dài[<hàm s\u1ed1>, <hoành \u0111\u1ed9 \u0111\u1ea7u>, <hoành \u0111\u1ed9 cu\u1ed1i>]\n\
+		\u0110\u1ed9Dài[<hàm s\u1ed1>, <\u0111i\u1ec3m \u0111\u1ea7u>, <\u0111i\u1ec3m cu\u1ed1i>]\n\
+		\u0110\u1ed9Dài[<\u0111\u01b0\u1eddng cong>, <hoành \u0111\u1ed9 \u0111\u1ea7u>, <hoành \u0111\u1ed9 cu\u1ed1i>]\n\
+		\u0110\u1ed9Dài[<\u0111\u01b0\u1eddng cong>, <\u0111i\u1ec3m \u0111\u1ea7u>, <\u0111i\u1ec3m cu\u1ed1i>]\n\
+		\u0110\u1ed9Dài[ <danh sách >]
+LetterToUnicode=KyTuUnicode
+LetterToUnicodeSyntax=KýT\u1ef1Unicode[<ký t\u1ef1>]
 Limit=GioiHan
 LimitSyntax=Gi\u1edbiH\u1ea1n[ <hàm s\u1ed1>, <bi\u1ebfn s\u1ed1>, <s\u1ed1> ]
 Line=DuongThang
@@ -233,222 +235,220 @@ LineSyntax=\u0110\u01b0\u1eddngTh\u1eb3ng[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
 		\u0110\u01b0\u1eddngTh\u1eb3ng[<\u0111i\u1ec3m>, <véct\u01a1>]
 Locus=QuyTich
 LocusSyntax=Q\u0169yTích[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
-LowerSum=PhanHoachDuoi
-LowerSumSyntax=PhânHo\u1ea1chD\u01b0\u1edbi[ <hàm s\u1ed1>, <ch\u1eef s\u1ed1>, <ch\u1eef s\u1ed1>, <ch\u1eef s\u1ed1> ]
-Max=Max
-MaxSyntax=Max[ <s\u1ed1>, <s\u1ed1> ]\n\
-		Max[ <danh sách> ]
-Mean=TrungBình
-MeanSyntax=TrungBình[<Danh sách s\u1ed1>]
-MeanX=TrungBìnhX
-MeanXSyntax=TrungBìnhX[<Danh sách \u0111i\u1ec3m>]
-MeanY=TrungBìnhY
-MeanYSyntax=TrungBìnhY[<Danh sách \u0111i\u1ec3m>]
-Median=TrungBình
-MedianSyntax=TrungBình[<Danh sách s\u1ed1>]
+LowerSum=TongTichPhanDuoi
+LowerSumSyntax=T\u1ed5ngTíchPhânD\u01b0\u1edbi[ <hàm s\u1ed1>, <hoành \u0111\u1ed9 \u0111\u1ea7u>, <hoành \u0111\u1ed9 cu\u1ed1i>, <s\u1ed1 l\u1ea7n phân ho\u1ea1ch> ]
+Max=GTLN
+MaxSyntax=GiáTr\u1ecbL\u1edbnNh\u1ea5t[ <s\u1ed1>, <s\u1ed1>]\n\
+		GiáTr\u1ecbL\u1edbnNh\u1ea5t[ <danh sách>]
+Mean=TrungBinh
+MeanSyntax=TrungBình[<danh sách s\u1ed1>]
+MeanX=TrungBinhX
+MeanXSyntax=TrungBìnhX[<danh sách \u0111i\u1ec3m>]
+MeanY=TrungBinhY
+MeanYSyntax=TrungBìnhY[<danh sách \u0111i\u1ec3m>]
+Median=TrungVi
+MedianSyntax=TrungV\u1ecb[<danh sách s\u1ed1>]
 Midpoint=TrungDiem
 MidpointSyntax=Trung\u0110i\u1ec3m[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
 		Trung\u0110i\u1ec3m[<\u0111o\u1ea1n th\u1eb3ng>]\n\
-		Trung\u0110i\u1ec3m[<\u0111\u01b0\u1eddng Conic>]
-Min=Min
-MinSyntax=Min[ <s\u1ed1>, <s\u1ed1> ]\n\
-		Min[ <danh sách> ]
-Mirror=DoiXung
-MirrorSyntax=\u0110\u1ed1iX\u1ee9ng[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
-		\u0110\u1ed1iX\u1ee9ng[<\u0111\u01b0\u1eddng th\u1eb3ng>, <\u0111i\u1ec3m>]\n\
-		\u0110\u1ed1iX\u1ee9ng[<\u0111\u01b0\u1eddng Conic>, <\u0111i\u1ec3m>]\n\
-		\u0110\u1ed1iX\u1ee9ng[<hình \u0111a giác>, <\u0111i\u1ec3m>]\n\
-		\u0110\u1ed1iX\u1ee9ng[<\u1ea3nh>, <\u0111i\u1ec3m>]\n\
-		\n\
-		\u0110\u1ed1iX\u1ee9ng[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
-		\u0110\u1ed1iX\u1ee9ng[<\u0111\u01b0\u1eddng th\u1eb3ng>,  <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
-		\u0110\u1ed1iX\u1ee9ng[<\u0111\u01b0\u1eddng Conic>, <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
-		\u0110\u1ed1iX\u1ee9ng[<hình \u0111a giác>, <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
-		\u0110\u1ed1iX\u1ee9ng[<\u1ea3nh>, <\u0111\u01b0\u1eddng th\u1eb3ng>]
+		Trung\u0110i\u1ec3m[<\u0111\u01b0\u1eddng côníc>]
+Min=GTNN
+MinSyntax=GiáTr\u1ecbNh\u1ecfNh\u1ea5t[ <s\u1ed1>, <s\u1ed1>]\n\
+		GiáTr\u1ecbNh\u1ecfNh\u1ea5t[<danh sách>]
+Mirror=PhepDoiXung
+MirrorSyntax=Phép\u0110\u1ed1iX\u1ee9ng[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
+		Phép\u0110\u1ed1iX\u1ee9ng[<\u0111\u01b0\u1eddng th\u1eb3ng>, <\u0111i\u1ec3m>]\n\
+		PhépPhép\u0110\u1ed1iX\u1ee9ng[<\u0111\u01b0\u1eddng côníc>, <\u0111i\u1ec3m>]\n\
+		Phép\u0110\u1ed1iX\u1ee9ng[<hình \u0111a giác>, <\u0111i\u1ec3m>]\n\
+		Phép\u0110\u1ed1iX\u1ee9ng[<\u1ea3nh>, <\u0111i\u1ec3m>]\n\
+		Phép\u0110\u1ed1iX\u1ee9ng[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
+		Phép\u0110\u1ed1iX\u1ee9ng[<\u0111\u01b0\u1eddng th\u1eb3ng>,  <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
+		Phép\u0110\u1ed1iX\u1ee9ng[<\u0111\u01b0\u1eddng côníc>, <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
+		Phép\u0110\u1ed1iX\u1ee9ng[<hình \u0111a giác>, <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
+		Phép\u0110\u1ed1iX\u1ee9ng[<\u1ea3nh>, <\u0111\u01b0\u1eddng th\u1eb3ng>]
 Mod=SoDu
 ModSyntax=S\u1ed1D\u01b0[ <s\u1ed1>, <s\u1ed1> ]
-Mode=D\u1ea1ng
-ModeSyntax=D\u1ea1ng[<Danh sách s\u1ed1>]
-Name=Tên
-NameSyntax=Tên[ <\u0110\u1ed1i t\u01b0\u1ee3ng> ]
-Normal=Chu\u1ea9nT\u1eafc
-NormalSyntax=Chu\u1ea9nT\u1eafc[<Trung bình>,<\u0110\u1ed9 l\u1ec7ch chu\u1ea9n>,<Giá tr\u1ecb bi\u1ebfn>]
-Object=\u0110\u1ed1iT\u01b0\u1ee3ng
-ObjectSyntax=\u0110\u1ed1iT\u01b0\u1ee3ng[<Tên \u0111\u1ed1i t\u01b0\u1ee3ng d\u1ea1ng text>]
+Mode=Mot
+ModeSyntax=M\u1ed1t[<danh sách s\u1ed1>]
+Name=Ten
+NameSyntax=Tên[ <\u0111\u1ed1i t\u01b0\u1ee3ng> ]
+Normal=DangChuanTac
+NormalSyntax=D\u1ea1ngChu\u1ea9nT\u1eafc[<trung bình>,<\u0111\u1ed9 l\u1ec7ch chu\u1ea9n>,<giá tr\u1ecb bi\u1ebfn>]
+Object=DoiTuong
+ObjectSyntax=\u0110\u1ed1iT\u01b0\u1ee3ng[<tên \u0111\u1ed1i t\u01b0\u1ee3ng d\u1ea1ng v\u0103n b\u1ea3n>]
 OrthogonalLine=DuongVuongGoc
-OrthogonalLineSyntax=DuongVuongGoc[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
-		DuongVuongGoc[<\u0111i\u1ec3m>, <véct\u01a1>]
+OrthogonalLineSyntax=\u0110\u01b0\u1eddngVuôngGóc[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
+		\u0110\u01b0\u1eddngVuôngGóc[<\u0111i\u1ec3m>, <véct\u01a1>]
 OrthogonalVector=VectoPhapTuyen
 OrthogonalVectorSyntax=Véct\u01a1PhápTuy\u1ebfn[<\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
 		Véct\u01a1PhápTuy\u1ebfn[<véct\u01a1>]
 OsculatingCircle=DuongTronMatTiep
-OsculatingCircleSyntax=\u0110\u01b0\u1eddngTrònM\u1eadtTi\u1ebfp[ <\u0111i\u1ec3m>, <hàm s\u1ed1> ]\n\
-		\u0110\u01b0\u1eddngTrònM\u1eadtTi\u1ebfp[ <\u0111i\u1ec3m>, <hàm s\u1ed1> ]
-PMCC=PMCC
-PMCCSyntax=H\u1ec7S\u1ed1T\u01b0\u01a1ngQuan[<Danh sách to\u1ea1 \u0111\u1ed9 x>,<Danh sách to\u1ea1 \u0111\u1ed9 y>]\n\
-		H\u1ec7S\u1ed1T\u01b0\u01a1ngQuan[<Danh sách \u0111i\u1ec3m>]
-Parabola=Parabol
-ParabolaSyntax=Parabol[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng th\u1eb3ng>]
+OsculatingCircleSyntax=\u0110\u01b0\u1eddngTrònM\u1eadtTi\u1ebfp[<\u0111i\u1ec3m>, <hàm s\u1ed1>]\n\
+		\u0110\u01b0\u1eddngTrònM\u1eadtTi\u1ebfp[<\u0111i\u1ec3m>, <hàm s\u1ed1>]
+PMCC=HeSoTuongQuan
+PMCCSyntax=H\u1ec7S\u1ed1T\u01b0\u01a1ngQuan[<danh sách to\u1ea1 \u0111\u1ed9 x>,<danh sách to\u1ea1 \u0111\u1ed9 y>]\n\
+		H\u1ec7S\u1ed1T\u01b0\u01a1ngQuan[<danh sách \u0111i\u1ec3m>]
+Parabola=Parabon
+ParabolaSyntax=Parabôn[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng th\u1eb3ng>]
 Parameter=ThamSoTieu
-ParameterSyntax=ThamS\u1ed1Tiêu[<\u0111\u01b0\u1eddng Conic>]
+ParameterSyntax=ThamS\u1ed1Tiêu[<\u0111\u01b0\u1eddng côníc>]
 Perimeter=ChuViDaGiac
-PerimeterSyntax=ChuVi\u0110aGiác[ <\u0110a giác> ]
+PerimeterSyntax=ChuVi\u0110aGiác[ <\u0111a giác> ]
 Point=Diem
 PointSyntax=\u0110i\u1ec3m[<\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
 		\u0110i\u1ec3m[<\u0111a giác>]\n\
-		\u0110i\u1ec3m[<\u0111\u01b0\u1eddng Conic>]\n\
+		\u0110i\u1ec3m[<\u0111\u01b0\u1eddng côníc>]\n\
 		\u0110i\u1ec3m[<hàm s\u1ed1>]\n\
 		\u0110i\u1ec3m[<véct\u01a1>]\n\
 		\u0110i\u1ec3m[<\u0111i\u1ec3m>, <véct\u01a1>]
 Polar=DuongDoiCuc
-PolarSyntax=\u0110\u01b0\u1eddng\u0110\u1ed1iC\u1ef1c[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng Conic>]
+PolarSyntax=\u0110\u01b0\u1eddng\u0110\u1ed1iC\u1ef1c[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng côníc>]
 Polygon=DaGiac
-PolygonSyntax=Hình\u0110aGiác[<\u0111i\u1ec3m>, ... , <\u0111i\u1ec3m>]
-Polyline=
-PolylineSyntax=
-Polynomial=KhaiTrien
-PolynomialSyntax=KhaiTri\u1ec3n[<hàm s\u1ed1>]
-Product=TíchS\u1ed1
-ProductSyntax=TíchS\u1ed1[<Danh sách s\u1ed1>]
+PolygonSyntax=\u0110aGiác[<\u0111i\u1ec3m>, ... , <\u0111i\u1ec3m>]
+Polyline=ChumDuongThang
+PolylineSyntax=Chùm\u0110\u01b0\u1eddngTh\u1eb3ng
+Polynomial=DaThuc
+PolynomialSyntax=\u0110aTh\u1ee9c[<hàm s\u1ed1>]
+Product=Tich
+ProductSyntax=Tích<danh sách s\u1ed1>]
 Q1=Q1
-Q1Syntax=Q1[<Danh sách s\u1ed1>]
+Q1Syntax=Q1[<danh sách s\u1ed1>]
 Q3=Q3
-Q3Syntax=Q3[<Danh sách s\u1ed1>]
+Q3Syntax=Q3[<danh sách s\u1ed1>]
 Radius=BanKinh
-RadiusSyntax=BánKính[<\u0111\u01b0\u1eddng Conic>]
-Random=S\u1ed1Ng\u1eabuNhiên
-RandomBinomial=Nh\u1ecbTh\u1ee9cNg\u1eabuNhiên
-RandomBinomialSyntax=Nh\u1ecbTh\u1ee9cNg\u1eabuNhiên[<S\u1ed1 nghi\u1ec7m>,<Xác su\u1ea5t>]
-RandomNormal=S\u1ed1Ng\u1eabuNhiên
-RandomNormalSyntax=S\u1ed1Ng\u1eabuNhiên[<Trung bình>,<\u0110\u1ed9 l\u1ec7ch chu\u1ea9n>]
-RandomPoisson=S\u1ed1Ng\u1eabuNhiênPoisson
-RandomPoissonSyntax=S\u1ed1Ng\u1eabuNhiênPoisson[<Trung bình>]
-RandomSyntax=S\u1ed1Ng\u1eabuNhiên[<S\u1ed1 nh\u1ecf nh\u1ea5t>,<S\u1ed1 l\u1edbn nh\u1ea5t>]
+RadiusSyntax=BánKính[<\u0111\u01b0\u1eddng côníc>]
+Random=SoNgauNhien
+RandomBinomial=NhiThucNgauNhien
+RandomBinomialSyntax=Nh\u1ecbTh\u1ee9cNg\u1eabuNhiên[<s\u1ed1 phép th\u1eed>,<xác su\u1ea5t>]
+RandomNormal=SoNgauNhienThuong
+RandomNormalSyntax=S\u1ed1Ng\u1eabuNhiênTh\u01b0\u1eddng[<trung bình>,<\u0111\u1ed9 l\u1ec7ch chu\u1ea9n>]
+RandomPoisson=SoNgauNhienPoisson
+RandomPoissonSyntax=S\u1ed1Ng\u1eabuNhiênPoátXông[<trung bình>]
+RandomSyntax=S\u1ed1Ng\u1eabuNhiên[<s\u1ed1 nh\u1ecf nh\u1ea5t>,<s\u1ed1 l\u1edbn nh\u1ea5t>]
 Ray=Tia
 RaySyntax=Tia[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
 		Tia[<\u0111i\u1ec3m>, <véct\u01a1>]
 Relation=QuanHe
 RelationSyntax=QuanH\u1ec7[<\u0111\u1ed1i t\u01b0\u1ee3ng>, <\u0111\u1ed1i t\u01b0\u1ee3ng>]
-RemoveUndefined=Xoá\u0110\u1ed1iT\u01b0\u1ee3ngCh\u01b0a\u0110\u1ecbnhNgh\u0129a
-RemoveUndefinedSyntax=Xoá\u0110\u1ed1iT\u01b0\u1ee3ngCh\u01b0a\u0110\u1ecbnhNgh\u0129a[<Danh sách>]
-Reverse=Ngh\u1ecbch\u0110\u1ea3o
-ReverseSyntax=Ngh\u1ecbch\u0110\u1ea3o[<Danh sách>]
+RemoveUndefined=XoaDoiTuongChuaDinhNghia
+RemoveUndefinedSyntax=Xoá\u0110\u1ed1iT\u01b0\u1ee3ngCh\u01b0a\u0110\u1ecbnhNgh\u0129a[<danh sách>]
+Reverse=BaoToan
+ReverseSyntax=B\u1ea3oToàn[<danh sách>]
 Root=Nghiem
 RootSyntax=Nghi\u1ec7m[<\u0111a th\u1ee9c>]\n\
 		Nghi\u1ec7m[<hàm s\u1ed1>, <s\u1ed1>]\n\
 		Nghi\u1ec7m[<hàm s\u1ed1>, <s\u1ed1>, <s\u1ed1>]
-Rotate=Xoay
-RotateSyntax=Xoay[<\u0111i\u1ec3m>, <góc>]\n\
-		Xoay[<véct\u01a1>, <góc>]\n\
-		Xoay[<\u0111\u01b0\u1eddng th\u1eb3ng>, <góc>]\n\
-		Xoay[<\u0111\u01b0\u1eddng Conic>, <góc>]\n\
-		Xoay[<hình \u0111a giác>, <góc>]\n\
-		Xoay[<\u1ea3nh>, <góc>]\n\
-		\n\
-		Xoay[<\u0111i\u1ec3m>, <góc>, <\u0111i\u1ec3m>]\n\
-		Xoay[<\u0111\u01b0\u1eddng th\u1eb3ng>, <góc>, <\u0111i\u1ec3m>]\n\
-		Xoay[<\u0111\u01b0\u1eddng Conic>, <góc>, <\u0111i\u1ec3m>]\n\
-		Xoay[<hình \u0111a giác>, <góc>, \u0111i\u1ec3m]\n\
-		Xoay[<\u1ea3nh>, <góc>, <\u0111i\u1ec3m>]
-Row=Dòng
+Rotate=PhepQuay
+RotateSyntax=PhépQuay[<tâm quay>, <góc quay>]\n\
+		PhépQuay[<véct\u01a1>, <góc quay>]\n\
+		PhépQuay[<\u0111\u01b0\u1eddng th\u1eb3ng>, <góc quay>]\n\
+		PhépQuay[<\u0111\u01b0\u1eddng côníc>, <góc quay>]\n\
+		PhépQuay[<hình \u0111a giác>, <góc quay>]\n\
+		PhépQuay[<\u1ea3nh>, <góc quay>]\n\
+		PhépQuay[<\u0111i\u1ec3m>, <góc quay>, <\u0111i\u1ec3m>]\n\
+		PhépQuay[<\u0111\u01b0\u1eddng th\u1eb3ng>, <góc quay>, <\u0111i\u1ec3m>]\n\
+		PhépQuay[<\u0111\u01b0\u1eddng côníc>, <góc quay>, <\u0111i\u1ec3m>]\n\
+		PhépQuay[<hình \u0111a giác>, <góc quay>, \u0111i\u1ec3m]\n\
+		PhépQuay[<\u1ea3nh>, <góc quay>, <\u0111i\u1ec3m>]
+Row=Dong
 RowSyntax=Dòng[<Ô b\u1ea3ng tính>]
-SD=\u0110\u1ed9L\u1ec7chChu\u1ea9n
-SDSyntax=\u0110\u1ed9L\u1ec7chChu\u1ea9n[<Danh sách S\u1ed1>]
-SXX=XícmaXX
-SXXSyntax=Xícma[ <Danh sách s\u1ed1>, <Danh sách s\u1ed1> ]\n\
-		Xícma[ <Danh sách \u0111i\u1ec3m> ]
-SXY=XícmaXY
-SXYSyntax=XícmaXY[<Danh sách s\u1ed1>,<Danh sách s\u1ed1>]\n\
-		XícmaXY[<Danh sách \u0111i\u1ec3m>]
-SYY=XícmaYY
-SYYSyntax=XícmaYY[ <Danh sách s\u1ed1>, <Danh sách s\u1ed1> ]\n\
-		XícmaYY[ <Danh sách \u0111i\u1ec3m> ]
-SecondAxis=TrucThuHai
-SecondAxisLength=DoDaiTrucThuHai
-SecondAxisLengthSyntax=\u0110\u1ed9DàiTr\u1ee5cTh\u1ee9Hai[<\u0111\u01b0\u1eddng Conic>]
-SecondAxisSyntax=Tr\u1ee5cTh\u1ee9Hai[<\u0111\u01b0\u1eddng Conic>]
+SD=DoLechChuan
+SDSyntax=\u0110\u1ed9L\u1ec7chChu\u1ea9n[<danh sách s\u1ed1>]
+SXX=PhuongSaiXX
+SXXSyntax=Ph\u01b0\u01a1ngSaiXX[ <danh sách s\u1ed1>, <danh sách s\u1ed1> ]\n\
+		Ph\u01b0\u01a1ngSaiXX[ <danh sách \u0111i\u1ec3m> ]
+SXY=PhuongSaiXY
+SXYSyntax=Ph\u01b0\u01a1ngSaiXY[<danh sách s\u1ed1>,<danh sách s\u1ed1>]\n\
+		Ph\u01b0\u01a1ngSaiXY[<danh sách \u0111i\u1ec3m>]
+SYY=PhuongSaiYY
+SYYSyntax=Ph\u01b0\u01a1ngSaiYY[ <danh sách s\u1ed1>, <danh sách s\u1ed1> ]\n\
+		Ph\u01b0\u01a1ngSaiYY[ <danh sách \u0111i\u1ec3m> ]
+SecondAxis=TrucBe
+SecondAxisLength=DoDaiTrucBe
+SecondAxisLengthSyntax=\u0110\u1ed9DàiTr\u1ee5cBé[<\u0111\u01b0\u1eddng côníc>]
+SecondAxisSyntax=Tr\u1ee5cBé[<\u0111\u01b0\u1eddng côníc>]
 Sector=HinhQuatConic
-SectorSyntax=HìnhQu\u1ea1tConic[<\u0111\u01b0\u1eddng Conic>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
-		HìnhQu\u1ea1tConic[<\u0111\u01b0\u1eddng Conic>, <s\u1ed1>, <s\u1ed1>]
+SectorSyntax=HìnhQu\u1ea1tCôníc[<\u0111\u01b0\u1eddng côníc>, <\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
+		HìnhQu\u1ea1tCôníc[<\u0111\u01b0\u1eddng côníc>, <s\u1ed1>, <s\u1ed1>]
 Segment=DoanThang
 SegmentSyntax=\u0110o\u1ea1nTh\u1eb3ng[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]\n\
 		\u0110o\u1ea1nTh\u1eb3ng[<\u0111i\u1ec3m>, <s\u1ed1>]
-Semicircle=HinhBanNguyet
-SemicircleSyntax=HìnhBánNguy\u1ec7t[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
+Semicircle=NuaDuongTron
+SemicircleSyntax=N\u1eeda\u0110\u01b0\u1eddngTròn[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
 Sequence=DaySo
 SequenceSyntax=DãyS\u1ed1[<bi\u1ec3u th\u1ee9c>, <bi\u1ebfn s\u1ed1>, <t\u1eeb>, <\u0111\u1ebfn>]\n\
-		DãyS\u1ed1[<bi\u1ec3u th\u1ee9c>, <bi\u1ebfn s\u1ed1>, <t\u1eeb>, <\u0111\u1ebfn>, <b\u01b0\u1edbc nh\u1ea3y>]
-SigmaXX=XícmaXX
-SigmaXXSyntax=Xícma[ <Danh sách s\u1ed1> ]\n\
-		Xícma[ <Danh sách \u0111i\u1ec3m> ]
-SigmaXY=XícmaXY
-SigmaXYSyntax=XícmaXY[<Danh sách to\u1ea1 \u0111\u1ed9 x>,<Danh sách to\u1ea1 \u0111\u1ed9 y>]\n\
-		XícmaXY[<Danh sách \u0111i\u1ec3m>]
-SigmaYY=XícmaYY
-SigmaYYSyntax=XícmaYY[<Danh sách \u0111i\u1ec3m>]
-Simplify=RútG\u1ecdn
-SimplifySyntax=RútG\u1ecdn[<Hàm>]
-Slope=DoDoc
-SlopeSyntax=\u0110\u1ed9D\u1ed1c<\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
-		\u0110\u1ed9D\u1ed1c[<hàm s\u1ed1>]
-Sort=S\u1eafpX\u1ebfp
-SortSyntax=S\u1eafpX\u1ebfp[<Danh sách>]
-Sum=T\u1ed5ng
-SumSyntax=T\u1ed5ng[<Danh sách>]\n\
-		T\u1ed5ng[<Danh sách>,<S\u1ed1 ph\u1ea7n t\u1eed>]
-TableText=B\u1ea3ngText
-TableTextSyntax=B\u1ea3ngText[ <Danh sách>, <Danh sách>, ... ]\n\
-		B\u1ea3ngText[ <Danh sách>, <Danh sách>, ..., <Canh l\u1ec1> ]
-Take=L\u1ea5y
-TakeSyntax=L\u1ea5y[<Danh sách>,<V\u1ecb trí b\u1eaft \u0111\u1ea7u>,<V\u1ecb trí k\u1ebft thúc>]
+		DãyS\u1ed1[<bi\u1ec3u th\u1ee9c>, <bi\u1ebfn s\u1ed1>, <t\u1eeb>, <\u0111\u1ebfn>, <công sai>]
+SigmaXX=XichMaXX
+SigmaXXSyntax=XíchMaXX[ <danh sách s\u1ed1> ]\n\
+		XíchMaXX[ <danh sách \u0111i\u1ec3m> ]
+SigmaXY=XichMaXY
+SigmaXYSyntax=XíchMaXY[<danh sách to\u1ea1 \u0111\u1ed9 x>,<danh sách to\u1ea1 \u0111\u1ed9 y>]\n\
+		XíchMaXY[<danh sách \u0111i\u1ec3m>]
+SigmaYY=XichMaYY
+SigmaYYSyntax=XíchMaYY[<danh sách \u0111i\u1ec3m>]
+Simplify=RutGon
+SimplifySyntax=RútG\u1ecdn[<hàm s\u1ed1>]
+Slope=HeSoGoc
+SlopeSyntax=H\u1ec7S\u1ed1Góc[<\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
+		H\u1ec7S\u1ed1Góc[<hàm s\u1ed1>]
+Sort=SapXep
+SortSyntax=S\u1eafpX\u1ebfp[<danh sách>]
+Sum=Tong
+SumSyntax=T\u1ed5ng[<danh sách>]\n\
+		T\u1ed5ng[<danh sách>,<s\u1ed1 ph\u1ea7n t\u1eed>]
+TableText=BangVanBan
+TableTextSyntax=B\u1ea3ngV\u0103nB\u1ea3n[ <danh sách>, <danh sách>, ... ]\n\
+		B\u1ea3ngV\u0103nB\u1ea3n[ <danh sách>, <danh sách>, ..., <canh l\u1ec1> ]
+Take=Lay
+TakeSyntax=L\u1ea5y[<danh sách>,<v\u1ecb trí b\u1eaft \u0111\u1ea7u>,<v\u1ecb trí k\u1ebft thúc>]
 Tangent=TiepTuyen
-TangentSyntax=Ti\u1ebfpTuy\u1ebfn[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng Conic>]\n\
-		Ti\u1ebfpTuy\u1ebfn[<\u0111\u1eeb\u01a1ng th\u1eb3ng>, <\u0111\u01b0\u1eddng Conic>]\n\
+TangentSyntax=Ti\u1ebfpTuy\u1ebfn[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng côníc>]\n\
+		Ti\u1ebfpTuy\u1ebfn[<\u0111\u1eeb\u01a1ng th\u1eb3ng>, <\u0111\u01b0\u1eddng côníc>]\n\
 		Ti\u1ebfpTuy\u1ebfn[<ch\u1eef s\u1ed1>, <hàm s\u1ed1>]\n\
 		Ti\u1ebfpTuy\u1ebfn[<\u0111i\u1ec3m>, <hàm s\u1ed1>]\n\
 		Ti\u1ebfpTuy\u1ebfn[<\u0111i\u1ec3m>, <\u0111\u01b0\u1eddng cong>]
 TaylorSeries=KhaiTrienTaylor
 TaylorSeriesSyntax=KhaiTri\u1ec3nTaylor[<hàm s\u1ed1>, < s\u1ed1>, < s\u1ed1>]
-Text=K\u1ebftQu\u1ea3Text
-TextSyntax=K\u1ebftQu\u1ea3Text[ <\u0110\u1ed1i t\u01b0\u1ee3ng> ]\n\
-		K\u1ebftQu\u1ea3Text[ <\u0110\u1ed1i t\u01b0\u1ee3ng>, <True(Có) False(Không) thay th\u1ebf bi\u1ebfn> ]\n\
-		K\u1ebftQu\u1ea3Text[ <\u0110\u1ed1i t\u01b0\u1ee3ng>, <\u0110i\u1ec3m> ]\n\
-		K\u1ebftQu\u1ea3Text[ <\u0110\u1ed1i t\u01b0\u1ee3ng>, <\u0110i\u1ec3m>, <True(Có) False(Không) thay th\u1ebf bi\u1ebfn> ]
-TextToUnicode=K\u1ebftQu\u1ea3Unicode
-TextToUnicodeSyntax=K\u1ebftQu\u1ea3Unicode[<"Text">]
-Translate=TinhTien
-TranslateSyntax=T\u1ecbnhTi\u1ebfn[<\u0111i\u1ec3m>, <véct\u01a1>]\n\
-		T\u1ecbnhTi\u1ebfn[<\u0111\u01b0\u1eddng th\u1eb3ng>, <véct\u01a1>]\n\
-		T\u1ecbnhTi\u1ebfn[<\u0111\u01b0\u1eddng Conic>, <véct\u01a1>]\n\
-		T\u1ecbnhTi\u1ebfn[<hàm s\u1ed1>, <véct\u01a1>]\n\
-		T\u1ecbnhTi\u1ebfn[<\u0111i\u1ec3m>, <véct\u01a1>]\n\
-		T\u1ecbnhTi\u1ebfn[<hình \u0111a giác>, <véct\u01a1>]\n\
-		T\u1ecbnhTi\u1ebfn[<\u1ea3nh>, <véct\u01a1>]\n\
-		T\u1ecbnhTi\u1ebfn[<Vect\u01a1>, <\u0111i\u1ec3m>]
-Transpose=HoánV\u1ecb
-TransposeSyntax=HoánV\u1ecb[<Ma tr\u1eadn>]
-TrapezoidalSum=CôngTh\u1ee9cHìnhThang
-TrapezoidalSumSyntax=CôngTh\u1ee9cHìnhThang[<Hàm>,<Giá tr\u1ecb X b\u1eaft \u0111\u1ea7u>,<Giá tr\u1ecb X k\u1ebft thúc>,<S\u1ed1 hình thang>]
+Text=VanBan
+TextSyntax=V\u0103nB\u1ea3n[ <\u0110\u1ed1i t\u01b0\u1ee3ng> ]\n\
+		V\u0103nB\u1ea3n[ <\u0110\u1ed1i t\u01b0\u1ee3ng>, <True(Có) False(Không) thay th\u1ebf bi\u1ebfn> ]\n\
+		V\u0103nB\u1ea3n[ <\u0110\u1ed1i t\u01b0\u1ee3ng>, <\u0110i\u1ec3m> ]\n\
+		V\u0103nB\u1ea3n[ <\u0110\u1ed1i t\u01b0\u1ee3ng>, <\u0110i\u1ec3m>, <True(Có) False(Không) thay th\u1ebf bi\u1ebfn> ]
+TextToUnicode=VanBanUnicode
+TextToUnicodeSyntax=V\u0103nB\u1ea3nUnicode[<"Text">]
+Translate=PhepTinhTien
+TranslateSyntax=PhépT\u1ecbnhTi\u1ebfn[<\u0111i\u1ec3m>, <véct\u01a1 t\u1ecbnh ti\u1ebfn>]\n\
+		PhépT\u1ecbnhTi\u1ebfn[<\u0111\u01b0\u1eddng th\u1eb3ng>, <véct\u01a1 t\u1ecbnh ti\u1ebfn>]\n\
+		PhépT\u1ecbnhTi\u1ebfn[<\u0111\u01b0\u1eddng côníc>, <véct\u01a1 t\u1ecbnh ti\u1ebfn>]\n\
+		PhépT\u1ecbnhTi\u1ebfn[<hàm s\u1ed1>, <véct\u01a1 t\u1ecbnh ti\u1ebfn>]\n\
+		PhépT\u1ecbnhTi\u1ebfn[<\u0111i\u1ec3m>, <véct\u01a1 t\u1ecbnh ti\u1ebfn>]\n\
+		PhépT\u1ecbnhTi\u1ebfn[<hình \u0111a giác>, <véct\u01a1 t\u1ecbnh ti\u1ebfn>]\n\
+		PhépT\u1ecbnhTi\u1ebfn[<\u1ea3nh>, <véct\u01a1 t\u1ecbnh ti\u1ebfn>]\n\
+		PhépT\u1ecbnhTi\u1ebfn[<véct\u01a1 t\u1ecbnh ti\u1ebfn>, <\u0111i\u1ec3m>]
+Transpose=HoanVi
+TransposeSyntax=HoánV\u1ecb[<ma tr\u1eadn>]
+TrapezoidalSum=TongHinhThang
+TrapezoidalSumSyntax=T\u1ed5ngHìnhThang[<hàm s\u1ed1>,<giá tr\u1ecb hoành \u0111\u1ed9 \u0111\u1ea7u>,<giá tr\u1ecb hoành \u0111\u1ed9 cu\u1ed1i>,<s\u1ed1 hình thang>]
 TurningPoint=DiemUon
 TurningPointSyntax=\u0110i\u1ec3mU\u1ed1n[<hàm \u0111a th\u1ee9c>]
-UnicodeToLetter=UnicodeThànhKýT\u1ef1
-UnicodeToLetterSyntax=UnicodeThànhKýT\u1ef1[<S\u1ed1 nguyên>]
-UnicodeToText=UnicodeThànhText
-UnicodeToTextSyntax=UnicodeThànhText[<Danh sách s\u1ed1 nguyên>]
-Union=H\u1ee3p
-UnionSyntax=H\u1ee3p[<Danh sách>,<Danh sách>]
+UnicodeToLetter=UnicodeThanhKyTu
+UnicodeToLetterSyntax=UnicodeThànhKýT\u1ef1[<s\u1ed1 nguyên>]
+UnicodeToText=UnicodeThanhVanBan
+UnicodeToTextSyntax=UnicodeThànhV\u0103nB\u1ea3n[<danh sách s\u1ed1 nguyên>]
+Union=Hop
+UnionSyntax=H\u1ee3p[<danh sách>,<danh sách>]
 UnitOrthogonalVector=VectoPhapTuyenDonVi
 UnitOrthogonalVectorSyntax=Véct\u01a1PhápTuy\u1ebfn\u0110\u01a1nV\u1ecb[<\u0111\u01b0\u1eddng th\u1eb3ng>]\n\
 		Véct\u01a1PhápTuy\u1ebfn\u0110\u01a1nV\u1ecb[<véct\u01a1>]
 UnitVector=VectoChiPhuongDonVi
 UnitVectorSyntax=Véct\u01a1Ch\u1ec9Ph\u01b0\u01a1ng\u0110\u01a1nV\u1ecb[<véct\u01a1>]\n\
 		Véct\u01a1Ch\u1ec9Ph\u01b0\u01a1ng\u0110\u01a1nV\u1ecb[<\u0111\u01b0\u1eddng th\u1eb3ng>]
-UpperSum=PhanHoachTren
-UpperSumSyntax=PhânHo\u1ea1chTrên<hàm s\u1ed1>, <ch\u1eef s\u1ed1>, <ch\u1eef s\u1ed1>, <ch\u1eef s\u1ed1>]
-Variance=Ph\u01b0\u01a1ngSai
-VarianceSyntax=Ph\u01b0\u01a1ngSai[<Danh sách s\u1ed1>]
+UpperSum=TongTichPhanTren
+UpperSumSyntax=T\u1ed5ngTíchPhânTrên<hàm s\u1ed1>, <hoành \u0111\u1ed9 \u0111\u1ea7u>, <hoành \u0111\u1ed9 cu\u1ed1i>, <s\u1ed1 hình ch\u1eef nh\u1eadt>]
+Variance=PhuongSai
+VarianceSyntax=Ph\u01b0\u01a1ngSai[<danh sách s\u1ed1>]
 Vector=Vecto
 VectorSyntax=Véct\u01a1[<\u0111i\u1ec3m>]\n\
 		Véct\u01a1[<\u0111i\u1ec3m>, <\u0111i\u1ec3m>]
 Vertex=Dinh
-VertexSyntax=\u0110\u1ec9nh[<\u0111\u01b0\u1eddng Conic>]
+VertexSyntax=\u0110\u1ec9nh[<\u0111\u01b0\u1eddng côníc>]
diff --git a/geogebra/properties/error_nl.properties b/geogebra/properties/error_nl.properties
index 2cc66ee..69f2eab 100644
--- a/geogebra/properties/error_nl.properties
+++ b/geogebra/properties/error_nl.properties
@@ -43,7 +43,7 @@ LengthMustBeConstant=Elke lengte moet constant zijn
 LoadFileFailed=Openen van het bestand is mislukt
 NameUsed=Deze naam is reeds in gebruik
 NumberExpected=Geef een getal
-PasteImageFailed=Sorry, kan bitmap niet plakken van kladblok
+PasteImageFailed=Sorry, kan Bitmap niet plakken van kladblok
 RenameFailed=Wijzigen naam is mislukt
 ReplaceFailed=Herdefiniëren is mislukt
 SaveFileFailed=Opslaan van het bestand is mislukt
diff --git a/geogebra/properties/error_ro.properties b/geogebra/properties/error_ro.properties
index 25af3e9..0cbf10f 100644
--- a/geogebra/properties/error_ro.properties
+++ b/geogebra/properties/error_ro.properties
@@ -61,12 +61,12 @@ UndefinedVariable=Variabil\u0103 nedefinit\u0103.
 UnknownCommand=Comand\u0103 necunoscut\u0103
 UnsupportedLAF=Aspectul \u015fi textura alese nu sunt disponibile pe computer.
 VectorExpected=Se a\u015fteapt\u0103 un punct sau un vector.
-isNoAngle=nu este un unghi\ 
+isNoAngle=nu este un unghi
 isNoConic=nu este o conic\u0103
 isNoFunction=nu este o func\u0163ie
-isNoLength=nu este o lungime\ 
-isNoLine=nu este o dreapt\u0103\ 
-isNoNumber=nu este un num\u0103r\ 
-isNoPoint=nu este un punct\ 
+isNoLength=nu este o lungime
+isNoLine=nu este o dreapt\u0103
+isNoNumber=nu este un num\u0103r
+isNoPoint=nu este un punct
 isNoText=nu este un text
 isNoVector=nu este un vector
diff --git a/geogebra/properties/error_sq.properties b/geogebra/properties/error_sq.properties
index 7235bad..54b5b7f 100644
--- a/geogebra/properties/error_sq.properties
+++ b/geogebra/properties/error_sq.properties
@@ -13,7 +13,7 @@ Error=Gabim
 ExponentMustBeConstant=Cdo eksponent te jete konstant
 ExponentMustBeInteger=Cdo eksponent te jete numer i plote
 ExportJarMissing=Na vjen keq, dokumenti gjeogjebra_export.jar mungon ose eshte i korruptuarr
-FileFormatNewer=Ju lutem, beni rinovim me versionin me te ri te GjeoGjebres. Ky format dokumenti nuk mbeshtetet.\ 
+FileFormatNewer=Ju lutem, beni rinovim me versionin me te ri te GjeoGjebres. Ky format dokumenti nuk mbeshtetet.
 FileFormatUnknown=Format i panjohur dokumenti
 FileNotFound=Dokumenti nuk gjehet
 FunctionExpected=Funksion i pritur
@@ -44,7 +44,7 @@ PasteImageFailed=Na vjen keq, nuk mund te ngjitej bitmap qe nga kllipbordi(vendi
 RenameFailed=Riemertimi deshtoi
 ReplaceFailed=Ripercaktimi deshtoi
 SaveFileFailed=Ruajtja e dokumentit deshtoi
-Tool.CommandNameTaken=Emri komandes tashme eshte perdorur nga mjet tjeter.\ 
+Tool.CommandNameTaken=Emri komandes tashme eshte perdorur nga mjet tjeter.
 Tool.CreationFailed=Mjeti nuk mund te krijohej.
 Tool.DeleteUsed=Mjeti eshte perdorur ne ndertim dhe nuk mund te fshihej.
 Tool.InputNotNeeded=Objekti futes nuk nevojitet.
diff --git a/geogebra/properties/error_vi.properties b/geogebra/properties/error_vi.properties
index 4ad31bd..f762fd0 100644
--- a/geogebra/properties/error_vi.properties
+++ b/geogebra/properties/error_vi.properties
@@ -1,7 +1,7 @@
 
 AngleMustBeConstant=M\u1ecdi s\u1ed1 \u0111o c\u1ee7a góc b\u1eaft bu\u1ed9c ph\u1ea3i là m\u1ed9t h\u1eb1ng s\u1ed1
 AppletWindowClosing=Vui lòng \u0111óng các c\u1eeda s\u1ed5 trình duy\u1ec7t tr\u01b0\u1edbc khi thoát GeoGebra
-AssignmentDependentToFree=Các  \u0111\u1ed1i t\u01b0\u1ee3ng t\u1ef1 do không th\u1ec3 vi\u1ebft \u0111è lên
+AssignmentDependentToFree=Các \u0111\u1ed1i t\u01b0\u1ee3ng t\u1ef1 do không th\u1ec3 vi\u1ebft \u0111è lên
 AssignmentToDependent=Các \u0111\u1ed1i t\u01b0\u1ee3ng ph\u1ee5 thu\u1ed9c không th\u1ec3 ghi \u0111è lên nhau
 AssignmentToFixed=Không th\u1ec3 thay \u0111\u1ed5i các \u0111\u1ed1i t\u01b0\u1ee3ng c\u1ed1 \u0111\u1ecbnh
 CAS.GeneralErrorMessage=Giá tr\u1ecb nh\u1eadp vào không h\u1ee3p l\u1ec7
@@ -17,13 +17,13 @@ FileFormatNewer=Vui l
 		T\u1eadp tin này không \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3
 FileFormatUnknown=Không xác \u0111\u1ecbnh \u0111\u01b0\u1ee3c \u0111\u1ecbnh d\u1ea1ng c\u1ee7a t\u1eadp tin
 FileNotFound=Không tìm th\u1ea5y t\u1eadp tin
-FunctionExpected=Hàm mong \u0111\u1ee3i
+FunctionExpected=Hàm s\u1ed1 th\u1ecfa mãn
 HelpNotFound=Không tìm th\u1ea5y tr\u1ee3 giúp tr\u1ef1c tuy\u1ebfn
 IllegalAddition=Phép c\u1ed9ng không h\u1ee3p l\u1ec7
 IllegalArgument=\u0110\u1ed1i s\u1ed1 không h\u1ee3p l\u1ec7
 IllegalArgumentNumber=Giá tr\u1ecb c\u1ee7a \u0111\u1ed1i s\u1ed1 không h\u1ee3p l\u1ec7
 IllegalAssignment=Ch\u1eef s\u1ed1 không h\u1ee3p l\u1ec7
-IllegalBoolean=Toán t\u1eed logic (Bool) không h\u1ee3p l\u1ec7
+IllegalBoolean=Toán t\u1eed lôgíc không h\u1ee3p l\u1ec7
 IllegalComparison=Phép so sánh không h\u1ee3p l\u1ec7
 IllegalComplexMultiplication=Phép tính không h\u1ee3p l\u1ec7
 IllegalDivision=Phép chia không h\u1ee3p l\u1ec7
@@ -36,12 +36,12 @@ InvalidEquation=Ph\u01b0\u01a1ng tr
 InvalidFunction=Hàm s\u1ed1 không h\u1ee3p l\u1ec7: Vui lòng nh\u1eadp vào hàm s\u1ed1 theo x
 InvalidInput=Giá tr\u1ecb nh\u1eadp vào không h\u1ee3p l\u1ec7
 LengthMustBeConstant=Chi\u1ec1u dài b\u1eaft bu\u1ed9c ph\u1ea3i là m\u1ed9t h\u1eb1ng s\u1ed1
-LoadFileFailed=L\u1ed7 khi m\u1edf t\u1eadp tin
-Macro.CreationFailed=Không th\u1ec3 t\u1ea1o Macro
+LoadFileFailed=L\u1ed7i khi m\u1edf t\u1eadp tin
+Macro.CreationFailed=Không th\u1ec3 t\u1ea1o Mácrô
 Macro.InputNotNeeded=Không c\u1ea7n nh\u1eadp vào \u0111\u1ed1i t\u01b0\u1ee3ng
 Macro.OutputNotDependent=\u0110\u1ed1i t\u01b0\u1ee3ng tr\u1ea3 v\u1ec1 không ph\u1ee5 thu\u1ed9c vào \u0111\u1ed1i t\u01b0\u1ee3ng nh\u1eadp vào
 NameUsed=Tên này \u0111ã \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng
-NumberExpected=S\u1ed1 mong \u0111\u1ee3i
+NumberExpected=S\u1ed1 th\u1ecfa mãn
 PasteImageFailed=Không th\u1ec3 dán hình t\u1eeb b\u1ed9 nh\u1edb
 RenameFailed=\u0110\u1ed5i tên không thành công
 ReplaceFailed=\u0110\u1ecbnh ngh\u0129a l\u1ea1i khái ni\u1ec7m không thành công
@@ -55,9 +55,9 @@ URLnotFound=M\u1edf \u0111\u01b0\u1eddng d\u1eabn URL kh
 UndefinedVariable=Bi\u1ebfn s\u1ed1 ch\u01b0a \u0111\u1ecbnh ngh\u0129a
 UnknownCommand=Câu l\u1ec7nh ch\u01b0a \u0111\u1ecbnh ngh\u0129a
 UnsupportedLAF=Máy tính c\u1ee7a b\u1ea1n không h\u1ed7 tr\u1ee3 giao di\u1ec7n \u0111\u01b0\u1ee3c ch\u1ecdn
-VectorExpected=\u0110i\u1ec3m ho\u1eb7c véct\u01a1 mong \u0111\u1ee3i
+VectorExpected=\u0110i\u1ec3m ho\u1eb7c véct\u01a1 th\u1ecfa mãn
 isNoAngle=không ph\u1ea3i là m\u1ed9t góc
-isNoConic=không ph\u1ea3i là m\u1ed9t \u0111\u01b0\u1eddng Conic
+isNoConic=không ph\u1ea3i là m\u1ed9t \u0111\u01b0\u1eddng Côníc
 isNoFunction=không ph\u1ea3i là m\u1ed9t hàm s\u1ed1
 isNoLength=không ph\u1ea3i là \u0111\u1ed9 dài
 isNoLine=không ph\u1ea3i là m\u1ed9t \u0111\u01b0\u1eddng th\u1eb3ng
diff --git a/geogebra/properties/javaui_vi.properties b/geogebra/properties/javaui_vi.properties
index 5718c15..78fa6de 100644
--- a/geogebra/properties/javaui_vi.properties
+++ b/geogebra/properties/javaui_vi.properties
@@ -1,10 +1,10 @@
 
-FileChooser.FileChooserDetailsText=Chi ti\u1ebft
-FileChooser.acceptAllFileFilterText=T\u1ea5t c\u1ea3 t\u1eadp tin
-FileChooser.cancelButtonText=Hu\u1ef7
-FileChooser.cancelButtonToolTipText=Hu\u1ef7
-FileChooser.deleteFileButtonText=Xoá
-FileChooser.deleteFileButtonToolTipText=Xoá các t\u1eadp tin \u0111\u01b0\u1ee3c ch\u1ecdn
+FileChooser.FileChooserDetailsText=Chi ti\u1ebft t\u1eadp tin \u0111\u01b0\u1ee3c ch\u1ecdn
+FileChooser.acceptAllFileFilterText=Ch\u1ea5p nh\u1eadn t\u1ea5t c\u1ea3 t\u1eadp tin \u0111\u01b0\u1ee3c l\u1ecdc
+FileChooser.cancelButtonText=Hu\u1ef7 nút v\u0103n b\u1ea3n
+FileChooser.cancelButtonToolTipText=Hu\u1ef7 nút công c\u1ee5 v\u0103n b\u1ea3n
+FileChooser.deleteFileButtonText=Xoá t\u1eadp tin nút v\u0103n b\u1ea3n
+FileChooser.deleteFileButtonToolTipText=Xoá t\u1eadp tin nút công c\u1ee5 v\u0103n b\u1ea3n \u0111\u01b0\u1ee3c ch\u1ecdn
 FileChooser.detailsViewActionLabelText=Chi ti\u1ebft
 FileChooser.detailsViewButtonAccessibleName=Chi ti\u1ebft
 FileChooser.detailsViewButtonToolTipText=Chi ti\u1ebft
@@ -52,6 +52,6 @@ FileChooser.saveInLabelText=L\u01b0u trong:
 FileChooser.sortMenuLabelText=S\u1eafp x\u1ebfp bi\u1ec3u t\u01b0\u1ee3ng theo:
 FileChooser.upFolderAccessibleName=Lên
 FileChooser.upFolderToolTipText=Lên
-FileChooser.updateButtonText=C\u1eadp nh\u1eadt
-FileChooser.updateButtonToolTipText=C\u1eadp nh\u1eadt
+FileChooser.updateButtonText=C\u1eadp nh\u1eadt v\u0103n b\u1ea3n
+FileChooser.updateButtonToolTipText=C\u1eadp nh\u1eadt công c\u1ee5
 FileChooser.viewMenuLabelText=Hi\u1ec3n th\u1ecb
diff --git a/geogebra/properties/menu.properties b/geogebra/properties/menu.properties
index a73cc11..95a57d7 100644
--- a/geogebra/properties/menu.properties
+++ b/geogebra/properties/menu.properties
@@ -137,7 +137,7 @@ Tangent=Tangents
 #V2.5 changed
 Text=Insert Text
 
-TranslateView=Move Drawing Pad
+TranslateView=Move Graphics View
 
 Undo=Undo
 
@@ -304,7 +304,7 @@ Conic5.Help=Select five points on conic
 
 Relation.Help=Select two objects
 
-TranslateView.Help=Drag the drawing pad or one axis (Shift + Drag)
+TranslateView.Help=Drag the Graphics View or one axis (Shift + Drag)
 
 ShowHideObject.Help=Select objects to hide, then switch to another tool
 
@@ -316,9 +316,9 @@ Delete.Help=Select object
 
 Vector.Help=Select starting point, then end point
 
-Text.Help=Click on the drawing pad or on point to specify position
+Text.Help=Click on the Graphics View or on point to specify position
 
-Image.Help=Click on the drawing pad or on point to specify position
+Image.Help=Click on the Graphics View or on point to specify position
 
 Midpoint.Help=Select two points, one segment, circle, or conic
 
@@ -332,7 +332,7 @@ CircumcircleArc3.Help=Select three points on arc
 
 CircumcircleSector3.Help=Select three points on sector
 
-Slider.Help=Click on the drawing pad to specify position
+Slider.Help=Click on the Graphics View to specify position
 
 MirrorAtPoint.Help=Select object to reflect, then center point
 
@@ -356,9 +356,9 @@ Distance.Help=Select two points, segment, polygon, or circle
 
 MoveRotate.Help=Select rotation center point, then drag object
 
-ZoomIn.Help=Click on the drawing pad to zoom in (Mouse Wheel)
+ZoomIn.Help=Click on the Graphics View to zoom in (Mouse Wheel)
 
-ZoomOut.Help=Click on the drawing pad to zoom out (Mouse Wheel)
+ZoomOut.Help=Click on the Graphics View to zoom out (Mouse Wheel)
 
 Locus.Help=Select locus point, then point on object
 
@@ -378,7 +378,7 @@ Fix=Fix On / Off
 Fix.Help=Select object to fix / free it
 
 ShowCheckBox=Check Box to Show / Hide Objects
-ShowCheckBox.Help=Click on the drawing pad to specify position
+ShowCheckBox.Help=Click on the Graphics View to specify position
 
 General=General
 
diff --git a/geogebra/properties/menu_ca.properties b/geogebra/properties/menu_ca.properties
index 9c6d727..f6760d8 100644
--- a/geogebra/properties/menu_ca.properties
+++ b/geogebra/properties/menu_ca.properties
@@ -144,12 +144,12 @@ Landscape=Apa
 Language=Idioma
 License=Llicència
 LineBisector=Mediatriu
-LineBisector.Help=Dos punts o un segment
+LineBisector.Help=Seleccioneu dos punts o un segment
 LineMenu=Recta
 Load=Obre
 # V2.5.1 begin
 Locus=Lloc geomètric
-Locus.Help=Seleccioneu un punt del lloc geomètric i un punt d'una recta
+Locus.Help=Seleccioneu un punt del lloc geomètric i el punt generador, definit sobre una línia
 LookAndFeel=Aparença
 LowQuality=Qualitat baixa
 ManagePerspectives=Gestió d'Escenaris
diff --git a/geogebra/properties/menu_da.properties b/geogebra/properties/menu_da.properties
index 387aedb..08b36a4 100644
--- a/geogebra/properties/menu_da.properties
+++ b/geogebra/properties/menu_da.properties
@@ -49,14 +49,14 @@ CloseFile=Luk fil
 CmdList=Kommando liste
 CollapseAll=Luk alle
 CommandName=Kommando navn
-Compasses=Vinkelmåler
-Compasses.Help=Toppunkt og derefter afsnit eller yderligere to punkter
+Compasses=Passer
+Compasses.Help=Vælg linjestykke eller to punkter og derefter centrum
 Condition.ShowObject=Betingelse for at vise objekt
 Conditions=Betingelser
-Conic=Konisk
-Conic5=Konisk gennem fem punkter
-Conic5.Help=Klik på fem punkter på den koniske
-ConicMenu=Konisk
+Conic=Keglesnit
+Conic5=Keglesnit gennem fem punkter
+Conic5.Help=Klik på fem punkter
+ConicMenu=Keglesnit
 ConicSectionTools=Keglesnits værktøjer
 Continuity=Kontinuitet
 ConvertToCoordinates=Omskriv til koordinator
diff --git a/geogebra/properties/menu_de.properties b/geogebra/properties/menu_de.properties
index b32089e..6c28ea8 100644
--- a/geogebra/properties/menu_de.properties
+++ b/geogebra/properties/menu_de.properties
@@ -51,7 +51,7 @@ CollapseAll=Alle reduzieren
 CommandName=Befehlsname
 Compasses=Zirkel
 Compasses.Help=Wähle ein Strecke oder zwei Punkte für den Radius, dann den Mittelpunkt
-Condition.ShowObject=Bedingung um Objekt anzuzeigen
+Condition.ShowObject=Bedingung, um Objekt anzuzeigen
 Conditions=Bedingungen
 Conic=Kegelschnitt
 Conic5=Kegelschnitt durch fünf Punkte
diff --git a/geogebra/properties/menu_nl.properties b/geogebra/properties/menu_nl.properties
index 8983e2e..3e445da 100644
--- a/geogebra/properties/menu_nl.properties
+++ b/geogebra/properties/menu_nl.properties
@@ -313,9 +313,9 @@ Select=Selecteer object
 Select.Help=Klik op object om het te selecteren
 # v3
 SelectAll=Alles selecteren
-SelectAncestors=Vorige lagen selecteren
-SelectCurrentLayer=Huidige laag selecteren
-SelectDescendants=Volgende lagen selecteren
+SelectAncestors=Voorouders selecteren
+SelectCurrentLayer=Huidige selecteren
+SelectDescendants=Nakomelingen selecteren
 Semicircle=Halfcirkel door twee punten
 # v3
 Semicircle.Help=Twee punten
diff --git a/geogebra/properties/menu_no_NO.properties b/geogebra/properties/menu_no_NO.properties
index 623e402..144da18 100644
--- a/geogebra/properties/menu_no_NO.properties
+++ b/geogebra/properties/menu_no_NO.properties
@@ -283,7 +283,7 @@ Trace.Help=Velg objekt(er) for 
 TransformationTools=Verktøyer for omforminger
 TranslateByVector=Flytt objekt med vektor
 TranslateByVector.Help=Velg objekt som skal flyttes, deretter vektor
-TranslateView=Flytt grafikkfeltet\ 
+TranslateView=Flytt grafikkfeltet
 TranslateView.Help=Flytt hele grafikkfeltet eller dra i en av aksene (Shift + Flytt)
 Undo=Angre
 UserInterface=Brukergrensesnitt
diff --git a/geogebra/properties/menu_ro.properties b/geogebra/properties/menu_ro.properties
index 45e72c3..537459e 100644
--- a/geogebra/properties/menu_ro.properties
+++ b/geogebra/properties/menu_ro.properties
@@ -29,10 +29,10 @@ CircleArcTools=Cerc \u015fi instrumente arc
 CirclePointRadius=Cerc cu centru \u015fi raz\u0103
 CirclePointRadius.Help=Selectare punctul de centru \u015fi introducere raza
 CircleSector3=Sector circular cu centrul între dou\u0103 puncte
-CircleSector3.Help=Selectare centru \u015fi dou\u0103 puncte \ 
+CircleSector3.Help=Selectare centru \u015fi dou\u0103 puncte 
 CircumcircleArc3=Arc Circumcircular prin trei puncte
 CircumcircleArc3.Help=Selectare trei puncte pe arc
-CircumcircleSector3=Sector circumcircular prin trei puncte\ 
+CircumcircleSector3=Sector circumcircular prin trei puncte
 CircumcircleSector3.Help=Selectare trei puncte pe sector
 ClearColumn=\u015etergere coloan\u0103
 ClearColumns=\u015etergere coloane
@@ -96,9 +96,9 @@ FastHelp=Ajutor rapid
 File=Fi\u015fier
 Files=Fi\u015fiere
 FitLine=Linie de regresie
-FitLine.Help=Selectare puncte folosind dreptunghiul de selec\u0163ie sau lista de puncte\ 
+FitLine.Help=Selectare puncte folosind dreptunghiul de selec\u0163ie sau lista de puncte
 Fix=Reparare Activ / Inactiv
-Fix.Help=Selectare / Deselectare obiect de reparat\ 
+Fix.Help=Selectare / Deselectare obiect de reparat
 FontSize=Dimensiune font
 Functionality=Func\u0163ionalitate
 General=General
@@ -162,7 +162,7 @@ Mode=Mod
 Motif=Motiv
 Move=Deplasare
 Move.Help=Glisare sau selectare obiecte (Esc)
-MoveRotate=Rota\u0163ie în jurul unui punct\ 
+MoveRotate=Rota\u0163ie în jurul unui punct
 MoveRotate.Help=Selectare centrul de rota\u0163ie apoi glisare obiectul
 MovementTools=Instrumente de mi\u015fcare
 NameIcon=Nume & Pictogram\u0103
@@ -232,7 +232,7 @@ Select=Selectare obiect
 Select.Help=Click pe obiect pentru selectare
 SelectAll=Selectare total\u0103
 SelectAncestors=Selectare p\u0103rin\u0163i
-SelectCurrentLayer=Selectare nivel curent\ 
+SelectCurrentLayer=Selectare nivel curent
 SelectDescendants=Selectare descende\u0163i
 Semicircle=Semicerc prin dou\u0103 puncte
 Semicircle.Help=Selectare dou\u0103 puncte
@@ -243,15 +243,15 @@ Settings.Save=Salvare set\u0103ri
 ShowCheckBox=Caset\u0103 de selectare pentru afi\u015fare / ascundere obiecte
 ShowCheckBox.Help=Click pe suprafa\u0163a de desen pentru specificare pozi\u0163ie
 ShowHideLabel=Afi\u015fare / Ascundere obiect
-ShowHideLabel.Help=Selectare obiect\ 
+ShowHideLabel.Help=Selectare obiect
 ShowHideObject=Afi\u015fare / Ascundere obiect
 ShowHideObject.Help=Selectare obiect de ascuns, apoi schimbare c\u0103tre alt instrument
-ShowInToolBar=Afi\u015fare în bara de instrumente\ 
+ShowInToolBar=Afi\u015fare în bara de instrumente
 ShowInputField=Afi\u015fare bara de intr\u0103ri
 ShowMenuBar=Afi\u015fare bara de meniu
 ShowResetIcon=Afi\u015fare pictogram\u0103 pentru resetarea construc\u0163iei
 ShowToolBar=Afi\u015fare bara de instrumente
-ShowToolBarHelp=Afi\u015fare ajutor bar\u0103 de instrumente\ 
+ShowToolBarHelp=Afi\u015fare ajutor bar\u0103 de instrumente
 ShowViewTitlebar=Afi\u015fare bara de titlu a vizualiz\u0103rilor
 Slider=Instrument glisare
 Slider.Help=Click pe suprafa\u0163a de desen pentru a specifica pozi\u0163ia
@@ -279,7 +279,7 @@ Tools=Instrumente
 Trace=Urm\u0103 Activ\u0103 / Inactiv\u0103
 Trace.Help=Selectare obiect pentru afi\u015fare / ascundere urm\u0103
 TransformationTools=Instrumente de transformare
-TranslateByVector=Translatare obiect prin vector\ 
+TranslateByVector=Translatare obiect prin vector
 TranslateByVector.Help=Selectare obiect de traslatat, apoi vector
 TranslateView=Mi\u015fcare suprafa\u0163\u0103 de desen
 TranslateView.Help=Glisare suprafa\u0163\u0103 de desen sau o ax\u0103 (Shift + Drag)
@@ -295,8 +295,8 @@ Window=Fereastr\u0103
 Windows=Ferestre
 Zoom=Panoramare
 ZoomIn=Amplificare panoram\u0103
-ZoomIn.Help=Click pe surafa\u0163a de desen pentru amplificarea imaginii (roti\u0163\u0103 mouse)\ 
+ZoomIn.Help=Click pe surafa\u0163a de desen pentru amplificarea imaginii (roti\u0163\u0103 mouse)
 ZoomOut=Reducere panoram\u0103
-ZoomOut.Help=Click pe surafa\u0163a de desen pentru mic\u015forarea imaginii (roti\u0163\u0103 mouse)\ 
+ZoomOut.Help=Click pe surafa\u0163a de desen pentru mic\u015forarea imaginii (roti\u0163\u0103 mouse)
 off=Oprit
 on=Pornit
diff --git a/geogebra/properties/menu_sq.properties b/geogebra/properties/menu_sq.properties
index 99b4a78..0a5b651 100644
--- a/geogebra/properties/menu_sq.properties
+++ b/geogebra/properties/menu_sq.properties
@@ -158,7 +158,7 @@ Midpoint=Pike Mesi
 Midpoint.Help=Zgjidh dy pika, nje segment, rreth ose konike
 MirrorAtCircle=Pasqyro piken ne rreth
 MirrorAtCircle.Help=Zgjidh piken per pasqyrim, pastaj rrethin
-MirrorAtLine=Pasqyro objektin lidhur me drejtzen\ 
+MirrorAtLine=Pasqyro objektin lidhur me drejtzen
 MirrorAtLine.Help=Zgjidh objektin per pasqyrim, pastaj drejtzen e pasqyrimit
 MirrorAtPoint=Pasqyro objektin lidhur me Piken
 MirrorAtPoint.Help=Zgjidh objektin per pasqyrim, pastaj piken qendrore
@@ -229,7 +229,7 @@ Rounding=Rrumbullakosje
 Save=Ruaj
 SaveAs=Ruaj si
 SaveCurrentFileQuestion=Doni ta ruani Dokumentin Aktual
-SaveCurrentPerspective=Ruaj Perspektiven e tanishme\ 
+SaveCurrentPerspective=Ruaj Perspektiven e tanishme
 Segment=Segment midis dy pikave
 Segment.Help=Zgjidh dy pika
 SegmentFixed=Segment me gjatesi te dhene nga pika
@@ -280,7 +280,7 @@ ToolHelp=Mjeti Ndihme
 ToolName=Mjeti Emer
 Toolbar=Brez Mjetesh
 Toolbar.Customize=Pershtat Brez-Mjeti
-Toolbar.ResetDefault=Brez mjeti per Rivendosjen e Paracaktuar\ 
+Toolbar.ResetDefault=Brez mjeti per Rivendosjen e Paracaktuar
 Tools=Mjete
 Trace=Gjurme
 Trace.Help=Zgjidh objekt per te shfaqur\\fshehur gjurmen e tij
diff --git a/geogebra/properties/menu_vi.properties b/geogebra/properties/menu_vi.properties
index a2872df..1af5abc 100644
--- a/geogebra/properties/menu_vi.properties
+++ b/geogebra/properties/menu_vi.properties
@@ -9,7 +9,7 @@ AngleUnit=\u0110\u01a1n v\u1ecb c\u1ee7a g
 AngularBisector=\u0110\u01b0\u1eddng phân giác
 AngularBisector.Help=Ch\u1ecdn 3 \u0111i\u1ec3m ho\u1eb7c 2 \u0111\u01b0\u1eddng th\u1eb3ng
 Area=Di\u1ec7n tích
-Area.Help=\u0110a giác, \u0111\u01b0\u1eddng tròn ho\u1eb7c \u0111\u01b0\u1eddng conic
+Area.Help=\u0110a giác, \u0111\u01b0\u1eddng tròn ho\u1eb7c \u0111\u01b0\u1eddng côníc
 Axes=H\u1ec7 tr\u1ee5c t\u1ecda \u0111\u1ed9
 BasicLineTools=Công c\u1ee5 \u0110\u01b0\u1eddng Th\u1eb3ng
 Blue=Xanh
@@ -19,9 +19,9 @@ Cancel=Hu\u1ef7
 CheckboxSize=Kích th\u01b0\u1edbc ô ch\u1ecdn
 CheckboxSize.Large=L\u1edbn
 CheckboxSize.Regular=Bình th\u01b0\u1eddng
-Circle2=Hình tròn khi bi\u1ebft tâm và 1 \u0111i\u1ec3m trên \u0111\u01b0\u1eddng tròn
+Circle2=\u0110\u01b0\u1eddng tròn khi bi\u1ebft tâm và 1 \u0111i\u1ec3m trên \u0111\u01b0\u1eddng tròn
 Circle2.Help=Xác \u0111\u1ecbnh tâm và 1 \u0111i\u1ec3m thu\u1ed9c \u0111\u01b0\u1eddng tròn
-Circle3=Hình tròn khi bi\u1ebft 3 \u0111i\u1ec3m thu\u1ed9c \u0111\u01b0\u1eddng tròn
+Circle3=\u0110\u01b0\u1eddng tròn khi bi\u1ebft 3 \u0111i\u1ec3m thu\u1ed9c \u0111\u01b0\u1eddng tròn
 Circle3.Help=Xác \u0111\u1ecbnh 3 \u0111i\u1ec3m thu\u1ed9c \u0111\u01b0\u1eddng tròn
 CircleArc3=Cung tròn khi bi\u1ebft tâm và 2 \u0111i\u1ec3m trên cung tròn
 CircleArc3.Help=Xác \u0111\u1ecbnh tâm và 2 \u0111i\u1ec3m thu\u1ed9c cung tròn
@@ -34,7 +34,7 @@ CircleSector3=H
 CircleSector3.Help=Xác \u0111\u1ecbnh tâm và 2 \u0111i\u1ec3m thu\u1ed9c hình qu\u1ea1t
 CircumcircleArc3=Cung tròn qua 3 \u0111i\u1ec3m
 CircumcircleArc3.Help=Xác \u0111\u1ecbnh 3 \u0111i\u1ec3m thu\u1ed9c cung tròn
-CircumcircleSector3=Hình qu\u1ea1t qua 3 \u0111i\u1ec3m
+CircumcircleSector3=Hình qu\u1ea1t \u0111i qua 3 \u0111i\u1ec3m
 CircumcircleSector3.Help=Xác \u0111\u1ecbnh 3 \u0111i\u1ec3m thu\u1ed9c hình qu\u1ea1t
 ClearColumn=Xoá C\u1ed9t
 ClearColumns=Xoá các C\u1ed9t
@@ -52,11 +52,11 @@ Compasses=Com-pa
 Compasses.Help=Ch\u1ecdn m\u1ea3ng ho\u1eb7c hai \u0111i\u1ec3m c\u1ee7a bán kính, r\u1ed3i ch\u1ecdn \u0111i\u1ec3m gi\u1eefa
 Condition.ShowObject=\u0110i\u1ec1u k\u1ec7n c\u1ea7n có \u0111\u1ec3 \u0111\u1ed1i t\u01b0\u1ee3ng \u0111\u01b0\u1ee3c hi\u1ec3n th\u1ecb
 Conditions=\u0110i\u1ec1u ki\u1ec7n
-Conic=\u0110\u01b0\u1eddng Conic
-Conic5=\u0110\u01b0\u1eddng Conic qua 5 \u0111i\u1ec3m
-Conic5.Help=Xác \u0111\u1ecbnh 5 \u0111i\u1ec3m thu\u1ed9c \u0111\u01b0\u1eddng Conic
-ConicMenu=\u0110\u01b0\u1eddng Conic
-ConicSectionTools=Công c\u1ee5 Cônic
+Conic=\u0110\u01b0\u1eddng Côníc
+Conic5=\u0110\u01b0\u1eddng Côníc qua 5 \u0111i\u1ec3m
+Conic5.Help=Xác \u0111\u1ecbnh 5 \u0111i\u1ec3m thu\u1ed9c \u0111\u01b0\u1eddng Côníc
+ConicMenu=\u0110\u01b0\u1eddng Côníc
+ConicSectionTools=Công c\u1ee5 Côníc
 Continuity=Liên t\u1ee5c
 Copy=Sao chép
 CopyToInputBar=Sao chép vào thanh k\u1ebft xu\u1ea5t
@@ -86,17 +86,17 @@ DontSave=Kh
 DrawingPadToClipboard=Sao chép vùng làm vi\u1ec7c vào b\u1ed9 nh\u1edb
 DynamicColors=Màu s\u1eafc
 Edit=Ch\u1ec9nh s\u1eeda
-Ellipse3=Ê-líp
-Ellipse3.Help=Ch\u1ecdn tiêu \u0111i\u1ec3m và 1 \u0111i\u1ec3m trên ê-líp
+Ellipse3=Elíp
+Ellipse3.Help=Ch\u1ecdn tiêu \u0111i\u1ec3m và 1 \u0111i\u1ec3m trên Elíp
 EnableLabelDrags=Cho phép kéo th\u1ea3 các nhãn
 EnableRightClick=Cho phép nh\u1ea5p ph\u1ea3i chu\u1ed9t
-English=English
+English=Ti\u1ebfng Anh
 Exit=Thoát
 ExpandAll=M\u1edf r\u1ed9ng t\u1ea5t c\u1ea3
 Export=Xu\u1ea5t
 FastHelp=Tr\u1ee3 giúp nhanh
 File=H\u1ed3 s\u01a1
-Files=H\u1ed3 s\u01a1
+Files=T\u1eadp h\u1ed3 s\u01a1
 FitLine=\u0110\u01b0\u1eddng th\u1eb3ng
 FitLine.Help=Ch\u1ecdn các \u0111i\u1ec3m b\u1eb1ng kh\u1ed1i, ho\u1eb7c danh sách \u0111i\u1ec3m
 Fix=C\u1ed1 \u0111\u1ecbnh / Không c\u1ed1 \u0111\u1ecbnh
@@ -106,14 +106,14 @@ Functionality=Theo ch\u1ee9c n\u0103ng
 General=T\u1ed5ng quan
 GeneralTools=Công c\u1ee5 chung
 Geometry=Hình h\u1ecdc
-German=German
+German=Ti\u1ebfng \u0110\u1ee9c
 GraphicsQuality=Ch\u1ea5t l\u01b0\u1ee3ng \u1ea3nh
-Green=Xanh lá
+Green=Màu xanh lá cây
 Grid=L\u01b0\u1edbi
 Help=Tr\u1ee3 giúp
 HighQuality=Ch\u1ea5t l\u01b0\u1ee3ng cao
-Hyperbola3=Hypécbôn
-Hyperbola3.Help=Ch\u1ecdn tiêu \u0111i\u1ec3m và 1 \u0111i\u1ec1m trên hypécbôn
+Hyperbola3=Hypebôn
+Hyperbola3.Help=Ch\u1ecdn tiêu \u0111i\u1ec3m và 1 \u0111i\u1ec1m trên Hypebôn
 Icon=Bi\u1ec3u t\u01b0\u1ee3ng
 IgnoreDocumentPerspective=B\u1ecf qua cách trình bày c\u1ee7a các v\u0103n b\u1ea3n \u0111ã m\u1edf
 Image=Chèn \u1ea3nh
@@ -122,13 +122,13 @@ InputField=Khung nh\u1eadp l\u1ec7nh
 InputField.Help=Ch\u1ecdn \u0111\u1ed1i t\u01b0\u1ee3ng \u0111\u1ec3 chép tên c\u1ee7a \u0111\u1ed1i t\u01b0\u1ee3ng \u0111ó vào khung nh\u1eadp l\u1ec7nh
 InputObjects=\u0110\u1ed1i t\u01b0\u1ee3ng nh\u1eadp vào
 InputOnTop=Hi\u1ec3n th\u1ecb phía trên
-InsertAbove=Chèn trên
-InsertBelow=Chèn d\u01b0\u1edbi
-InsertLeft=Chèn trái
-InsertRight=Chèn ph\u1ea3i
+InsertAbove=Chèn phía trên
+InsertBelow=Chèn phía d\u01b0\u1edbi
+InsertLeft=Chèn bên trái
+InsertRight=Chèn bên ph\u1ea3i
 Intersect=Giao \u0111i\u1ec3m c\u1ee7a 2 \u0111\u1ed1i t\u01b0\u1ee3ng
 Intersect.Help=Ch\u1ecdn 2 \u0111\u1ed1i t\u01b0\u1ee3ng riêng bi\u1ec7t ho\u1eb7c ch\u1ed7 giao nhau c\u1ee7a chúng
-Isometric=\u0110\u1eb3ng c\u1ef1c
+Isometric=\u0110\u1eb3ng c\u1ef1
 Join=\u0110\u01b0\u1eddng th\u1eb3ng qua 2 \u0111i\u1ec3m
 Join.Help=Ch\u1ecdn 2 \u0111i\u1ec3m
 Labeling=Tên
@@ -153,7 +153,7 @@ ManagePerspectives=Qu\u1ea3n l
 MeasurementTools=Công c\u1ee5 \u0111o l\u01b0\u1eddng
 Metal=Kim lo\u1ea1i
 Midpoint=Trung \u0111i\u1ec3m
-Midpoint.Help=Ch\u1ecdn 2 \u0111i\u1ec3m, \u0111\u01b0\u1eddng th\u1eb3ng, \u0111\u01b0\u1eddng tròn ho\u1eb7c \u0111\u01b0\u1eddng conic
+Midpoint.Help=Ch\u1ecdn 2 \u0111i\u1ec3m, \u0111\u01b0\u1eddng th\u1eb3ng, \u0111\u01b0\u1eddng tròn ho\u1eb7c \u0111\u01b0\u1eddng côníc
 MirrorAtCircle=\u0110\u1ed1i x\u1ee9ng \u0111i\u1ec3m qua \u0111\u01b0\u1eddng tròn
 MirrorAtCircle.Help=Ch\u1ecdn \u0111i\u1ec3m \u0111\u1ed1i x\u1ee9ng, r\u1ed3i \u0111\u1ebfn \u0111\u01b0\u1eddng tròn
 MirrorAtLine=\u0110\u1ed1i x\u1ee9ng qua \u0111\u01b0\u1eddng th\u1eb3ng
@@ -164,8 +164,8 @@ Mode=C
 Motif=Giao di\u1ec7n Motif
 Move=Di chuy\u1ec3n
 Move.Help=Ch\u1ecdn và kéo \u0111\u1ec3 di chuy\u1ec3n \u0111\u1ed1i t\u01b0\u1ee3ng
-MoveRotate=Xoay \u0111\u1ed1i t\u01b0\u1ee3ng quanh 1 \u0111i\u1ec3m
-MoveRotate.Help=Ch\u1ecdn tâm xoay tr\u01b0\u1edbc, sau \u0111ó ch\u1ecdn và kéo \u0111\u1ed1i t\u01b0\u1ee3ng
+MoveRotate=Quay \u0111\u1ed1i t\u01b0\u1ee3ng quanh 1 \u0111i\u1ec3m
+MoveRotate.Help=Ch\u1ecdn tâm quay tr\u01b0\u1edbc, sau \u0111ó ch\u1ecdn và kéo \u0111\u1ed1i t\u01b0\u1ee3ng
 MovementTools=Công c\u1ee5 di chuy\u1ec3n
 NameIcon=Tên & Bi\u1ec3u t\u01b0\u1ee3ng
 New=T\u1ea1o m\u1edbi
@@ -192,7 +192,7 @@ PointMenu=\u0110i\u1ec3m
 PointStyle=Ki\u1ec3u \u0111i\u1ec3m
 PointTools=Công c\u1ee5 \u0111i\u1ec3m
 PolarDiameter=\u0110\u01b0\u1eddng \u0111\u1ed1i c\u1ef1c ho\u1eb7c \u0111\u01b0\u1eddng kính kéo dài
-PolarDiameter.Help=Ch\u1ecdn \u0111i\u1ec3m ho\u1eb7c \u0111\u01b0\u1eddng th\u1eb3ng, sau \u0111ó ch\u1ecdn hình tròn ho\u1eb7c \u0111\u01b0\u1eddng Conic
+PolarDiameter.Help=Ch\u1ecdn \u0111i\u1ec3m ho\u1eb7c \u0111\u01b0\u1eddng th\u1eb3ng, sau \u0111ó ch\u1ecdn hình tròn ho\u1eb7c \u0111\u01b0\u1eddng côníc
 Polygon=\u0110a giác
 Polygon.Help=Ch\u1ecdn các \u0111\u1ec9nh \u0111a giác sau \u0111ó ch\u1ecdn l\u1ea1i \u0111\u1ec9nh \u0111\u1ea7u tiên
 PolygonTools=Công c\u1ee5 \u0111a giác
@@ -219,8 +219,8 @@ Relation=Quan h\u1ec7 gi\u1eefa 2 \u0111\u1ed1i t\u01b0\u1ee3ng
 Relation.Help=Ch\u1ecdn 2 \u0111\u1ed1i t\u01b0\u1ee3ng
 Rename=\u0110\u1eb7t l\u1ea1i tên
 RightAngleStyle=Ki\u1ec3u góc vuông
-RotateByAngle=Xoay \u0111\u1ed1i t\u01b0\u1ee3ng quanh 1 \u0111i\u1ec3m theo 1 góc cho tr\u01b0\u1edbc
-RotateByAngle.Help=Ch\u1ecdn \u0111\u1ed1i t\u01b0\u1ee3ng c\u1ea7n xoay, sau \u0111ó ch\u1ecdn tâm xoay và nh\u1eadp góc vào
+RotateByAngle=Quay \u0111\u1ed1i t\u01b0\u1ee3ng quanh 1 \u0111i\u1ec3m theo 1 góc cho tr\u01b0\u1edbc
+RotateByAngle.Help=Ch\u1ecdn \u0111\u1ed1i t\u01b0\u1ee3ng c\u1ea7n quay, sau \u0111ó ch\u1ecdn tâm quay và nh\u1eadp góc vào
 Rounding=Làm tròn
 Save=L\u01b0u l\u1ea1i
 SaveAs=L\u01b0u l\u1ea1i v\u1edbi tên khác
@@ -249,13 +249,13 @@ ShowHideLabel.Help=Ch\u1ecdn \u0111\u1ed1i t\u01b0\u1ee3ng c\u1ea7n hi\u1ec7n /
 ShowHideObject=Hi\u1ec7n / \u1ea9n \u0111\u1ed1i t\u01b0\u1ee3ng
 ShowHideObject.Help=Ch\u1ecdn các \u0111\u1ed1i t\u01b0\u1ee3ng c\u1ea7n \u1ea9n chúng, sau \u0111ó ch\u1ecdn ki\u1ec3u c\u1ea7n thay \u0111\u1ed5i r\u1ed3i ch\u1ecdn áp d\u1ee5ng nh\u1eefng thay \u0111\u1ed5i \u0111ó
 ShowInToolBar=Hi\u1ec3n th\u1ecb trên thanh công c\u1ee5
-ShowInputField=Hi\u1ec3n th\u1ecb khung nh\u1eadp
-ShowMenuBar=
+ShowInputField=Hi\u1ec3n th\u1ecb khung nh\u1eadp l\u1ec7nh
+ShowMenuBar=Hi\u1ec3n th\u1ecb thanh th\u1ef1c \u0111\u01a1n
 ShowResetIcon=
 ShowToolBar=Hi\u1ec3n th\u1ecb thanh công c\u1ee5
-ShowToolBarHelp=Hi\u1ec3n th\u1ecb tr\u1ee3 giúp thanh công c\u1ee5
+ShowToolBarHelp=Hi\u1ec3n th\u1ecb thanh công c\u1ee5 tr\u1ee3 giúp
 ShowViewTitlebar=Hi\u1ec3n th\u1ecb thanh tiêu \u0111\u1ec1 Hi\u1ec3n Th\u1ecb
-Slider=Con tr\u01b0\u1ee3t
+Slider=Thanh tr\u01b0\u1ee3t
 Slider.Help=Ch\u1ecdn vùng làm vi\u1ec7c v\u1ecb trí ch\u1ec9 \u0111\u1ecbnh con tr\u1ecf c\u1ea7n tr\u01b0\u1ee3t t\u1edbi
 Slope=H\u1ec7 s\u1ed1 góc
 Slope.Help=\u0110\u01b0\u1eddng th\u1eb3ng
@@ -263,7 +263,7 @@ SpecialLineTools=C
 SpecialObjectTools=Công c\u1ee5 \u0111\u1ed1i t\u01b0\u1ee3ng \u0111\u1eb7c bi\u1ec7t
 SubstituteDialog=H\u1ed9p tho\u1ea1i thay th\u1ebf
 Tangent=Ti\u1ebfp tuy\u1ebfn
-Tangent.Help=Ch\u1ecdn 1 \u0111i\u1ec3m tr\u01b0\u1edbc, sau \u0111ó ch\u1ecdn \u0111\u01b0\u1eddng tròn ho\u1eb7c \u0111\u01b0\u1eddng conic
+Tangent.Help=Ch\u1ecdn 1 \u0111i\u1ec3m tr\u01b0\u1edbc, sau \u0111ó ch\u1ecdn \u0111\u01b0\u1eddng tròn ho\u1eb7c \u0111\u01b0\u1eddng côníc
 Text=Ch\u1eef
 Text.Help=Ch\u1ecdn v\u1ecb trí ch\u1ec9 \u0111\u1ecbnh c\u1ea7n vi\u1ebft ch\u1eef trên vùng làm vi\u1ec7c
 Tool=Công c\u1ee5
@@ -281,7 +281,7 @@ Tools=C
 Trace=M\u1edf / T\u1eaft d\u1ea5u v\u1ebft
 Trace.Help=Ch\u1ecdn \u0111\u1ed1i t\u01b0\u1ee3ng mu\u1ed1n hi\u1ec3n th\u1ecb / t\u1eaft d\u1ea5u v\u1ebft c\u1ee7a \u0111\u1ed1i t\u01b0\u1ee3ng \u0111ó
 TransformationTools=Công c\u1ee5 bi\u1ebfn \u0111\u1ed5i
-TranslateByVector=T\u1ecbnh ti\u1ebfn theo vécct\u01a1
+TranslateByVector=T\u1ecbnh ti\u1ebfn theo véct\u01a1
 TranslateByVector.Help=Ch\u1ecdn \u0111i\u1ec3m c\u1ea7n chuy\u1ec3n \u0111\u1ed5i, sau \u0111ó ch\u1ecdn véct\u01a1
 TranslateView=Di chuy\u1ec3n vùng làm vi\u1ec7c
 TranslateView.Help=Nh\u1ea5n chu\u1ed9t và kéo trên vùng làm vi\u1ec7c
@@ -294,8 +294,8 @@ VectorFromPoint.Help=Ch\u1ecdn \u0111i\u1ec3m c\u1ea7n t\u1ea1o v
 VectorMenu=Véct\u01a1
 View=Hi\u1ec3n th\u1ecb
 Window=C\u1eeda s\u1ed5
-Windows=C\u1eeda s\u1ed5
-Zoom=Phóng to
+Windows=Nhi\u1ec1u c\u1eeda s\u1ed5
+Zoom=Phóng to / thu nh\u1ecf
 ZoomIn=Phóng to
 ZoomIn.Help=Ch\u1ecdn v\u1ecb trí trên vùng làm vi\u1ec7c \u0111\u1ec3 phóng to
 ZoomOut=Thu nh\u1ecf
diff --git a/geogebra/properties/plain.properties b/geogebra/properties/plain.properties
index 0701a72..363ad3c 100644
--- a/geogebra/properties/plain.properties
+++ b/geogebra/properties/plain.properties
@@ -72,7 +72,7 @@ DoubleLine=Double line
 
 DoubleLineEquation=(a x + b y + c)\u00B2 = 0
 
-DrawingPad=Drawing Pad
+DrawingPad=Graphics View
 
 DynamicWorksheet=Dynamic worksheet
 
diff --git a/geogebra/properties/plain_ar.properties b/geogebra/properties/plain_ar.properties
index 0ba59a2..bad10dc 100644
--- a/geogebra/properties/plain_ar.properties
+++ b/geogebra/properties/plain_ar.properties
@@ -432,7 +432,7 @@ xmin=x \u062d\u062f\u0651 \u0623\u062f\u0646\u0649
 yAxis=Y(\u0645\u062d\u0648\u0631\u0627\u0644\u062a\u0631\u062a\u064a\u0628\u0627\u062a)
 ymax=y \u062d\u062f\u0651 \u0623\u0642\u0635\u0649
 ymin=y \u062d\u062f\u0651 \u0623\u062f\u0646\u0649
-\u200e=Algebra=\u0627\u0644\u062c\u0628\u0631
-\u200eADecimalPlaces=%0 \u0623\u062c\u0632\u0627\u0621 \u0639\u0634\u0631\u064a\u0629
-\u200eAlgebraWindow=\u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u062c\u0628\u0631
-\u200fAbsoluteScreenLocation=\u0645\u0648\u0642\u0639 \u062b\u0627\u0628\u062a \u0639\u0644\u0649 \u0627\u0644\u0634\u0627\u0634\u0629
+Algebra=\u0627\u0644\u062c\u0628\u0631
+ADecimalPlaces=%0 \u0623\u062c\u0632\u0627\u0621 \u0639\u0634\u0631\u064a\u0629
+AlgebraWindow=\u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u062c\u0628\u0631
+AbsoluteScreenLocation=\u0645\u0648\u0642\u0639 \u062b\u0627\u0628\u062a \u0639\u0644\u0649 \u0627\u0644\u0634\u0627\u0634\u0629
diff --git a/geogebra/properties/plain_ca.properties b/geogebra/properties/plain_ca.properties
index f0b731a..02ce84c 100644
--- a/geogebra/properties/plain_ca.properties
+++ b/geogebra/properties/plain_ca.properties
@@ -117,7 +117,7 @@ ChooseObject=Selecciona un objecte
 Circle=Cercle
 CircleEquation=(x - m)² + (y - n)² = r²
 CircleThroughABC=Circumferència que passa per %0, %1 i %2
-CircleThroughAwithCenterB=Circumferència de centre %0 i que passa per %1
+CircleThroughAwithCenterB=Circumferència de centre %1 i que passa per %0
 CircleWithCenterAandRadiusB=Circumferència de centre %0 i radi %1
 Color=Color
 ColorfulConstructionProtocol=Passos de la construcció en color
@@ -184,7 +184,7 @@ ExtremumOfA=Extrem de %0
 Filling=Ombrejat
 Finish=D'acord
 FirstAxisLengthOf=Longitud del primer eix de
-FirstAxisLengthOfA=Semieix Principal de %0
+FirstAxisLengthOfA=Semieix principal de %0
 FirstAxisOf=Primer eix de
 FirstAxisOfA=Eix principal de %0
 FixCheckbox=Fixa casella de verificació
@@ -226,7 +226,7 @@ InsertPictureOfConstruction=Insereix una figura o construcci
 Integral=Integral
 IntegralOfA=Integral de %0
 IntegralOfAfromBtoC=Integral de %0 des de %1 a %2
-IntersectingLines=Tallant rectes
+IntersectingLines=Rectes Secants
 IntersectionPointOf=Punt d'intersecció
 IntersectionPointOfAB=Punt d'intersecció entre %0 i %1
 IntersectionPointOfABWithInitialValueC=Punt d'intersecció entre %0 i %1 amb valor inicial %2
@@ -242,8 +242,8 @@ LengthOfA=Longitud de %0
 Lengths=Longituds
 Line=Recta
 LineBisector=Mediatriu
-LineBisectorAB=Bisectriu %0, %1
-LineBisectorOfA=Bisectriu %0
+LineBisectorAB=Mediatriu %0, %1
+LineBisectorOfA=Mediatriu %0
 LineStyle=Estil de linia
 LineThrough=Recta que passa per
 LineThroughAB=Recta que passa per %0 i %1
@@ -284,7 +284,7 @@ PGFExport.Grayscale=Escala de grisos
 Parabola=Paràbola
 ParabolaEquation=y² =  o  x² =
 ParabolaWithFocusAandDirectrixB=Paràbola de focus %0 i directriu %1
-ParallelLines=Rectes paral·leleles
+ParallelLines=Rectes paral·leles
 ParameterOf=Paràmetre de
 ParameterOfA=Paràmetre de %0
 ParametricForm=Forma paramètrica
@@ -329,7 +329,7 @@ RootOfAWithInitialValueB=Arrel de %0 amb valor inicial %1
 RootOfAonIntervalBC=Arrel de %0 a l'interval [%1, %2]
 ScaleInCentimeter=Escala en cm
 SecondAxisLengthOf=Longitud del segon eix
-SecondAxisLengthOfA=Longitud de l'eix secundari de %0
+SecondAxisLengthOfA=Semieix secundari de %0
 SecondAxisOf=Segon eix de
 SecondAxisOfA=Eix secundari de %0
 Sector=Sector
@@ -368,8 +368,8 @@ TickDistance=Dist
 Title=Títol
 TitleExportPgf=Exporta a PGF
 TitleExportPstricks=Exporta GeoGebra a PSTricks
-TraceOff=Desactiva la traçada
-TraceOn=Activa la traçada
+TraceOff=Desactiva el traç
+TraceOn=Activa el traç
 TraceToSpreadsheet=Registra al full de càlcul
 TranslationOf=Translació de
 TranslationOfAbyB=Translació de %0 segons %1
diff --git a/geogebra/properties/plain_da.properties b/geogebra/properties/plain_da.properties
index f5559b5..02cb282 100644
--- a/geogebra/properties/plain_da.properties
+++ b/geogebra/properties/plain_da.properties
@@ -89,10 +89,10 @@ Color=Farve
 ColorfulConstructionProtocol=Farverig konstruktions protokol
 Command=Kommando
 ComplexNumber=Komplekst tal
-Conic=Konisk
+Conic=Keglesnit
 ConicLinesEquation=(a x + b y + c) (d x + e y + f) = 0
-ConicThroughABCDE=Konisk gennem %0, %1, %2, %3, %4
-Conics=Koniske
+ConicThroughABCDE=Keglesnit gennem %0, %1, %2, %3, %4
+Conics=Keglesnit
 ConstructionProtocol=Konstruktionsbeskrivelse
 ConstructionProtocolButton=Knap der åbner konstruktions protokollen
 ConstructionProtocolHelp=<html><body><p><b>Brug af konstruktionsbeskrivelsen</b></p><p><br><b>Tastatur</b></p><table border="1"><tr><td>&#8593;</td><td>forrige trin i konstruktionen</td></tr><tr><td >&#8595;</td><td >næste trin i konstruktionen</td></tr><tr><td >Hjem</td><td >Før konstruktion</td></tr><tr><td>End</td><td>Sidste trin i konstruktionen</td></tr><tr><td >Del</td><td>slet konstruktionstrin</td></tr></table><p><b><br>Mus</b></p><table border="1"><tr><td>dobbelt klik på rækken</td><td >vælg konstruktionstrin</td></tr><tr><td>dobbelt klik på overskrift</td><td >Før konstruktion </td></tr><tr><td>træk &amp; slip række</td><td>flyt konstruktionstrinnet</td></tr><tr><td>højre klik række</td><td>kontekst menu</td></tr></table><body></html>
diff --git a/geogebra/properties/plain_nl.properties b/geogebra/properties/plain_nl.properties
index 3ba23d9..00a4224 100644
--- a/geogebra/properties/plain_nl.properties
+++ b/geogebra/properties/plain_nl.properties
@@ -51,7 +51,7 @@ AnimationSpeed=Animatiesnelheid
 AnimationStep=Stapgrootte
 ApplicationName=GeoGebra
 ApplicationURL=http://www.geogebra.org
-Apply=OK
+Apply=Toepassen
 Arc=Kegelsnedeboog
 AsymptoteToA=Asymptoot aan %0
 AsymptoticLine=Asymptoot
@@ -122,7 +122,7 @@ Directrix=Richtlijn
 DirectrixOf=Richtlijn van
 DirectrixOfA=Richtlijn van%0
 DisplayPointSymbol=Toon het symbool voor punten
-DistanceAB.LaTeX="\\left| " + %0 + %1 + "\\right| = " + %2
+DistanceAB.LaTeX="\\bovenlijn{" + %0 + %1 + "} \\, = \\, " + %2
 DistanceOf=Afstand tussen
 DistanceOfAandB=Afstand van %0 tot %1
 DoubleClickToOpen=Je kan het toepassingsvenster openen door te dubbelklikken op de tekening.
@@ -441,9 +441,9 @@ withStartValue=met beginwaarde
 # #
 # geen spaties toegestaan, dus niet x as
 # #
-xAxis=x-as
+xAxis=xAs
 xmax=xmax
 xmin=xmin
-yAxis=y-as
+yAxis=yAs
 ymax=ymax
 ymin=ymin
diff --git a/geogebra/properties/plain_ro.properties b/geogebra/properties/plain_ro.properties
index 0a45c67..cfc3e43 100644
--- a/geogebra/properties/plain_ro.properties
+++ b/geogebra/properties/plain_ro.properties
@@ -91,7 +91,7 @@ ConicLinesEquation=(a *x + b*y+c)*(d*x+e*y+f)=0
 ConicThroughABCDE=Conic prin%0, %1, %2, %3, %4
 Conics=Conice
 ConstructionProtocol=Protocol de construc\u0163ie
-ConstructionProtocolButton=Buton pentru a deschide protocol de construc\u0163ie\ 
+ConstructionProtocolButton=Buton pentru a deschide protocol de construc\u0163ie
 ConstructionProtocolHelp=<html> <body> <p> <b> Utilizarea protocolului de constructii </ b> </ p> <br> <b> <Tastatura / b> </ p> <table border="1"> <tr> <td> \u2191 </ td> <td> pasul anterior de construc\u0163ii </ td> </ tr> <tr> <td> \u2193 </ td> <td> Pasul urm\u0103tor constructii </ td> </ tr> <tr> <td> Prima pagina </ td> <td> Start construc\u0163iei </ td> </ tr> <tr> <td> End </ td> <td> Sfâr\u015fitul de construc\u0163ie </ td> </ tr> <tr> <td> Del </ td> <td> pas \u015eterge constructii </ td> </ tr> </ table> <p> <b> <br> mouse-ul </ b> </ p> <tabelul de frontier\u0103 = "1"> <tr> <td> dublu clic pe rândul </ td> <td> Alege pas de construc\u0163ie </ td> </ tr> <tr> <td> dublu clic pe antet </ td> <td> Start de construc\u0163ie </ td> </ tr> <tr> <td> drag & drop rândul </ td> <td> Mutare pas de construc\u0163ie </ td> </ tr> <tr> <td> dreapta rând face\u0163i clic pe </ td > <td> Context menu </ td> </ tr> </ table> <body> </ html>
 ConstructionProtocolNavigation=Bar\u0103 de naviga\u0163ie pentru trepte de construc\u0163ii
 Coordinates=Coordonatele
@@ -115,7 +115,7 @@ DisplayPointSymbol=Afi\u015feaz\u0103 simbolul pentru puncte
 # pentru instrumentele de distant\u0103
 DistanceAB.LaTeX="\\overline{" + %0 + %1 + "} \\, = \\, " + %2
 DistanceOfAandB=Distan\u0163a  %0 si %1
-DoubleClickToOpen=Face\u0163i dublu clic se deschide fereastra de aplicare\ 
+DoubleClickToOpen=Face\u0163i dublu clic se deschide fereastra de aplicare
 DoubleLine=Linie dubl\u0103
 DoubleLineEquation=(a x + b y + c)² = 0
 Down=Jos
@@ -163,7 +163,7 @@ Hyperbola=Hiberbol\u0103
 HyperbolaEquation=(x - m)² / a² - (y - n)² / b² = 1
 HyperbolaWithFociABPassingThroughC=Hiperbol\u0103 cu focare %0 , %1 care trece prin %2
 HyperbolaWithFociABandFirstAxisLengthC=Hiperbol\u0103 cu focare %0, %1 si prima axa ca lungime %2
-Image=Imagine\ 
+Image=Imagine
 ImplicitConicEquation=a x² + b xy + c y² + d x + e y = f
 ImplicitLineEquation=a x + b y = c
 Increasing=Crescând
@@ -195,7 +195,7 @@ LineStyle=Stilul liniei
 LineThroughAB=Linie prin intermediul %0, %1
 LineThroughAParallelToB=Linie prin intermediul %0 paralel cu %1
 LineThroughAPerpendicularToB=Linie prin intermediul %0 perpendicular cu %1
-LineThroughAwithDirectionB=Linie prin intermdiul %0 cu direc\u0163ie %1\ 
+LineThroughAwithDirectionB=Linie prin intermdiul %0 cu direc\u0163ie %1
 LinearEccentricityOfA=Excentricitate liniar\u0103 cu %0
 LinearInequality=Inegalitate liniar\u0103
 Lines=Linii
diff --git a/geogebra/properties/plain_sq.properties b/geogebra/properties/plain_sq.properties
index bdec45d..af6841b 100644
--- a/geogebra/properties/plain_sq.properties
+++ b/geogebra/properties/plain_sq.properties
@@ -104,7 +104,7 @@ Definition=Perkufizim
 Delete=Fshij
 DependentObjects=Objekte te Varura
 DerivativeOfA=Derivat i A
-DiameterOfAConjugateToB=I konjuguari i Diametrit te A lidhur me B\ 
+DiameterOfAConjugateToB=I konjuguari i Diametrit te A lidhur me B
 DirectionOfA=Drejtim i A
 Directrix=Direktrice
 DirectrixOfA=Direktrice e A
@@ -165,7 +165,7 @@ ImplicitLineEquation=Ekuacion Implicit i Drejtzes
 Increasing=Rrites
 Inequality=Mosbarazim
 InflectionPointofA=Pike Infleksioni e A
-InputFieldHelp=\ Fusha Input. NdihmeZona e Inputit, Ndihme
+InputFieldHelp=Fusha Input. NdihmeZona e Inputit, Ndihme
 InputLabel=Etikete Inputi(objekti qe futet)
 InputLabelToolTip=Shtyp nje Komande
 Insert=Fut
@@ -312,7 +312,7 @@ VectorPerpendicularToA=Vektor Pingul ndaj A
 Vectors=Vektore
 VertexOfA=Kulm i A
 ViewCloseExtraWindow=Dritarja Shtese ne Dritaren Kryesore e Mbyllur
-ViewOpenExtraWindow=\ Dritarja Shtese ne Dritaren Kryesore Hapur
+ViewOpenExtraWindow=Dritarja Shtese ne Dritaren Kryesore Hapur
 Width=Gjeresi
 WindowOpened=Dritare e Hapur
 XMLTagANotFound=Dokument i pavlefshem: XML  A  jo gjetur
@@ -328,7 +328,7 @@ clockwise=Orar
 counterClockwise=Kunder-Orar
 dependent=i Varur
 dilatedByFactor=Homotetizoj me Faktor
-emf=Pas-Dokument i Fuqizuar\ 
+emf=Pas-Dokument i Fuqizuar
 eps=Pas-Shenim i Permbyllur(Shkurtuar)
 equal=i Barabarte
 firstAxisLength=Gjatesi e Gjysem-Boshtit te Madh
diff --git a/geogebra/properties/plain_vi.properties b/geogebra/properties/plain_vi.properties
index 870a430..aa902e5 100644
--- a/geogebra/properties/plain_vi.properties
+++ b/geogebra/properties/plain_vi.properties
@@ -1,6 +1,6 @@
 
-2x2Matrix=ma tr\u1eadn 2x2
-3x3Matrix=ma tr\u1eadn 3x3
+2x2Matrix=Ma tr\u1eadn 2x2
+3x3Matrix=Ma tr\u1eadn 3x3
 ADecimalPlace=%0 d\u1ea5u th\u1eadp phân
 ADecimalPlaces=%0 d\u1ea5u th\u1eadp phân
 ADilatedByFactorBfromC=%0 dãn b\u1edfi y\u1ebfu t\u1ed1 %0 t\u1eeb %2
@@ -16,14 +16,14 @@ AandBareLinearlyIndependent=%0 v
 AandBareNotEqual=%0 và %1 không b\u1eb1ng nhau
 AandBareParallel=%0 và %1 song song
 AandBarePerpendicular=%0 và %1 vuông góc nhau
-AandBcannotBeCompared=không th\u1ec3 so sánh %0 và %1
+AandBcannotBeCompared=Không th\u1ec3 so sánh %0 và %1
 AbsoluteScreenLocation=V\u1ecb trí c\u1ed1 \u0111\u1ecbnh trên màn hình (\u0111\u1ed1i t\u01b0\u1ee3ng không di chuy\u1ec3n khi di chuy\u1ec3n h\u1ec7 tr\u1ee5c)
 AdoesNotLieOnB=%0 không n\u1eb1m trên %1
 AdoesNotLieOnThePerimeterOfB=%0 không n\u1eb1m trong chu vi %1
-AdoesNothaveTheSameAreaAsB=di\u1ec7n tích %0 và %1 không b\u1eb1ng nhau
-AdoesNothaveTheSameLengthAsB=\u0111\u1ed9 dài %0 và %1 không b\u1eb1ng nhau
-AhasTheSameAreaAsB=di\u1ec7n tích %0 và %1 b\u1eb1ng nhau
-AhasTheSameLengthAsB=\u0111\u1ed9 dài %0 và %1 b\u1eb1ng nhau
+AdoesNothaveTheSameAreaAsB=Di\u1ec7n tích %0 và %1 không b\u1eb1ng nhau
+AdoesNothaveTheSameLengthAsB=\u0110\u1ed9 dài %0 và %1 không b\u1eb1ng nhau
+AhasTheSameAreaAsB=Di\u1ec7n tích %0 và %1 b\u1eb1ng nhau
+AhasTheSameLengthAsB=\u0110\u1ed9 dài %0 và %1 b\u1eb1ng nhau
 AintersectsWithBOnce=%0 giao %1 1 l\u1ea7n
 AintersectsWithBTwice=%0 giao %1 2 l\u1ea7n
 AisAnAsymptoteToB=%0 ti\u1ec7m c\u1eadn %1
@@ -35,7 +35,7 @@ AlgebraWindow=Hi\u1ec3n th\u1ecb danh s
 AliesOnB=%0 n\u1eb1m trên %1
 AliesOnThePerimeterOfB=%0 n\u1eb1m trong chu vi %1
 Angle=Góc
-AngleBetween=Góc c\u1ee7a
+AngleBetween=Góc gi\u1eefa
 AngleBetweenAB=Góc gi\u1eefa %0 và %1
 AngleBetweenABC=Góc gi\u1eefa %0, %1 và %2
 AngleBetweenABCofD=Góc gi\u1eefa %0, %1, %2 và %3
@@ -54,7 +54,7 @@ Apply=
 Arc=Cung
 AsymptoteToA=Ti\u1ec7m c\u1eadn %0
 AsymptoticLine=\u0110\u01b0\u1eddng ti\u1ec7m c\u1eadn
-AthDerivativeOfB=\u0111\u1ea1o hàm b\u1eadc %0 c\u1ee7a %1
+AthDerivativeOfB=\u0110\u1ea1o hàm b\u1eadc %0 c\u1ee7a %1
 Author=Tác gi\u1ea3
 AuxiliaryObject=\u0110\u1ed1i t\u01b0\u1ee3ng ph\u1ee5
 AuxiliaryObjects=\u0110\u1ed1i t\u01b0\u1ee3ng ph\u1ee5
@@ -68,7 +68,7 @@ Back=Tr\u1edf l\u1ea1i
 BackgroundColor=Màu n\u1ec1n
 BackgroundImage=Hình n\u1ec1n
 Bold=In \u0111\u1eadm
-Boolean=Boolean
+Boolean=Bi\u1ebfn Bool
 Breakpoint=\u0110i\u1ec3m d\u1eebng
 Cancel=H\u1ee7y b\u1ecf
 Caption=Tiêu \u0111\u1ec1
@@ -90,10 +90,10 @@ Color=M
 ColorfulConstructionProtocol=Màu s\u1eafc quy \u0111\u1ecbnh s\u1eb5n cho cách d\u1ef1ng hình
 Command=Câu l\u1ec7nh
 ComplexNumber=S\u1ed1 ph\u1ee9c
-Conic=\u0110\u01b0\u1eddng Conic
+Conic=\u0110\u01b0\u1eddng côníc
 ConicLinesEquation=(a x + b y + c) (d x + e y + f) = 0
-ConicThroughABCDE=\u0110\u01b0\u1eddng cônic qua %0, %1, %2, %3, %4
-Conics=Các \u0111\u01b0\u1eddng Conic
+ConicThroughABCDE=\u0110\u01b0\u1eddng côníc qua %0, %1, %2, %3, %4
+Conics=Các \u0111\u01b0\u1eddng côníc
 ConstructionProtocol=Cách d\u1ef1ng hình
 ConstructionProtocolButton=Hi\u1ec3n th\u1ecb nút xem cách d\u1ef1ng hình
 ConstructionProtocolHelp=<html><body><p><b>H\u01b0\u1edbng d\u1eabn cách d\u1ef1ng hình</b></p><p><br><b>Bàn phím</b></p><table border="1"><tr><td >&#8593;</td><td>b\u01b0\u1edbc d\u1ef1ng hình tr\u01b0\u1edbc \u0111ó</td></tr><tr><td >&#8595;</td><td >b\u01b0\u1edbc d\u1ef1ng hình ti\u1ebfp theo</td></tr><tr><td>Home</td><td >tr\u1edf v\u1ec1 lúc b\u1eaft \u0111\u1ea7u d\u1ef1ng hình</td></tr><tr><td>End</td><td>\u0111i t\u1edbi b\u01b0\u1edbc cu\u1ed1i cùng c\u1ee7a cách d\u1ef1ng hình</td></tr><tr><td >Del</td><td >xóa b\u01b0\u1edbc d\u1ef1ng hình</td></tr></table><p><b><br>Con chu\u1ed9t</b></p><table border="1"><tr><td>Nh\u1ea5p chu\u1ed9t 2 l\u1ea7n vào hàng</td><td >b\u01b0\u1edbc d\u1ef1ng hình \u0111\u01b0\u1ee3c ch\u1ecdn \u0111\u1ec3 s\u1eed d\u1ee5ng</td></tr><tr><td>Nh\u1ea5p chu\u1ed9t 2 l\u1ea7n vào tiêu \u0111\u1ec1 c\u1ed9t</td><td >tr\u1edf v\u1ec1 lúc b\u1eaft \u0111\u1ea7u d\u1ef1ng hình</td></tr><tr><td>Kéo - th\u1ea3 hàng</td><td>di chuy\u1ec3n b\u01b0\u1edbc d\u1ef1ng hình</td></tr><tr><td>Nh\u1ea5p ph\u1ea3i chu\u1ed9t vào hàng</td><td>xu\u1ea5t hi\u1ec7n b\u1ea3ng Menu\n\
@@ -133,13 +133,13 @@ DrawingPadAsPSTricks=Hi\u1ec3n th\u1ecb \u0111\u1ed3 th\u1ecb theo PSTricks
 DrawingPadAsPicture=Hi\u1ec3n th\u1ecb \u0111\u1ed3 th\u1ecb d\u1ea1ng hình
 DrawingPagAsPGF=Hi\u1ec3n th\u1ecb \u0111\u1ed3 th\u1ecb d\u1ea1ng PGF/TikZ
 DynamicWorksheet=Vùng làm vi\u1ec7c
-DynamicWorksheetAsWebpage=Worksheet d\u1ea1ng webpage
-EccentricityOfA=\u0110\u1ed9 l\u1ec7ch tâm c\u1ee7a %0
+DynamicWorksheetAsWebpage=Vùng làm vi\u1ec7c d\u1ea1ng trang web
+EccentricityOfA=Tâm sai c\u1ee7a %0
 Edit=Ch\u1ec9nh s\u1eeda
-Ellipse=Hình E-lip
+Ellipse=Hình Elíp
 EllipseEquation=(x - m)² / a² + (y - n)² / b² = 1
-EllipseWithFociABPassingThroughC=Êlíp v\u1edbi tiêu \u0111i\u1ec3m %0, %1 \u0111i qua %2
-EllipseWithFociABandFirstAxisLengthC=Êlíp v\u1edbi tiêu \u0111i\u1ec3m %0, %1 và \u0111\u1ed9 dài tr\u1ee5c %2
+EllipseWithFociABPassingThroughC=Elíp v\u1edbi tiêu \u0111i\u1ec3m %0, %1 \u0111i qua %2
+EllipseWithFociABandFirstAxisLengthC=Elíp v\u1edbi tiêu \u0111i\u1ec3m %0, %1 và \u0111\u1ed9 dài tr\u1ee5c %2
 EmphasizeRightAngle=N\u1ed5i b\u1eadt góc vuông
 EmptySet=T\u1eadp h\u1ee3p r\u1ed7ng
 Equation=Ph\u01b0\u01a1ng trình
@@ -147,7 +147,7 @@ ExcentricityOf=\u0110\u1ed9 l\u1ec7ch t
 ExplicitConicEquation=y = a x² + b x + c
 ExplicitLineEquation=y = a x + b
 ExportAsWebpage=Xu\u1ea5t thành webpage
-ExportTextAsShapes=Xu\u1ea5t text thành hình
+ExportTextAsShapes=Xu\u1ea5t v\u0103n b\u1ea3n thành hình v\u1ebd
 Extremum=C\u1ef1c tr\u1ecb
 ExtremumOfA=C\u1ef1c tr\u1ecb c\u1ee7a %0
 Filling=Tô màu n\u1ec1n
@@ -158,7 +158,7 @@ FirstAxisOf=Tr\u1ee5c th\u1ee9 nh\u1ea5t c\u1ee7a
 FirstAxisOfA=Tr\u1ee5c \u0111\u1ea7u tiên c\u1ee7a %0
 FixCheckbox=C\u1ed1 \u0111\u1ecbnh h\u1ed9p ch\u1ecdn
 FixObject=C\u1ed1 \u0111\u1ecbnh \u0111\u1ed1i t\u01b0\u1ee3ng
-Foci=Foci
+Foci=Các tiêu \u0111i\u1ec3m
 Focus=Tiêu \u0111i\u1ec3m
 FocusOf=Tiêu \u0111i\u1ec3m c\u1ee7a
 FocusOfA=Tiêu \u0111i\u1ec3m c\u1ee7a %0
@@ -175,10 +175,10 @@ Hexagon=H
 Hide=\u1ea8n
 Home=Tr\u1edf v\u1ec1 m\u1eb7c \u0111\u1ecbnh
 HorizontalSplit=Chia thành d\u1ea1ng n\u1eb1m ngang
-Hyperbola=Hyperbol
+Hyperbola=Hypebôn
 HyperbolaEquation=(x - m)² / a² - (y - n)² / b² = 1
-HyperbolaWithFociABPassingThroughC=Hypécbôn v\u1edbi tiêu \u0111i\u1ec3m %0, %1 \u0111i qua %2
-HyperbolaWithFociABandFirstAxisLengthC=Hypécbôn v\u1edbi tiêu \u0111i\u1ec3m %0, %1 và \u0111\u1ed9 dài tr\u1ee5c \u0111\u1ea7u tiên %2
+HyperbolaWithFociABPassingThroughC=Hypebôn v\u1edbi tiêu \u0111i\u1ec3m %0, %1 \u0111i qua %2
+HyperbolaWithFociABandFirstAxisLengthC=Hypebôn v\u1edbi tiêu \u0111i\u1ec3m %0, %1 và \u0111\u1ed9 dài tr\u1ee5c \u0111\u1ea7u tiên %2
 IdeaAndDevelopment=Ý t\u01b0\u1edfng và phát tri\u1ec3n
 Image=Hình \u1ea3nh
 ImplicitConicEquation=a x² + b xy + c y² + d x + e y = f
@@ -223,23 +223,23 @@ LinearInequality=B\u1ea5t \u0111\u1eb3ng th\u1ee9c tuy\u1ebfn t
 Lines=Các \u0111\u01b0\u1eddng th\u1eb3ng
 List=Danh sách
 Locus=Qu\u1ef9 tích
-Macro=Macro
+Macro=Mácrô
 Midpoint=Trung \u0111i\u1ec3m
 MidpointOf=Trung \u0111i\u1ec3m c\u1ee7a
 MidpointOfA=Trung \u0111i\u1ec3m c\u1ee7a %0
 MidpointOfAB=Trung \u0111i\u1ec3m c\u1ee7a %0, %1
 Name=Tên
-Name.list=danh sách
-Name.locus=loc
-Name.matrix=ma tr\u1eadn
-Name.picture=hình
-Name.polygon=\u0111a giác
-Name.text=text
+Name.list=Danh sách
+Name.locus=Tên qu\u1ef9 tích
+Name.matrix=Tên ma tr\u1eadn
+Name.picture=Tên \u1ea3nh
+Name.polygon=Tên \u0111a giác
+Name.text=Tên v\u0103n b\u1ea3n
 NameAndValue=Tên & Giá tr\u1ecb
 NewName=Tên m\u1edbi
 NewNameForA=Tên m\u1edbi c\u1ee7a %0
 Next=K\u1ebf ti\u1ebfp
-No.=S\u1ed1 TT
+No.=S\u1ed1 th\u1ee9 t\u1ef1
 Numeric=S\u1ed1
 NumericObjects=Các \u0111\u1ed1i t\u01b0\u1ee3ng d\u1ea1ng s\u1ed1
 OK=OK
@@ -250,7 +250,7 @@ OrthogonalVectorOf=V
 Oscillating=Dao \u0111\u1ed9ng
 OverwriteFile=B\u1ea1n có mu\u1ed1n ghi \u0111è lên t\u1eadp tin này ?
 PGFExport.Grayscale=Grayscale
-Parabola=\u0110\u01b0\u1eddng Parabol
+Parabola=\u0110\u01b0\u1eddng Parabôn
 ParabolaEquation=y² =  ho\u1eb7c  x² =
 ParabolaWithFocusAandDirectrixB=Parabôn v\u1edbi tiêu \u0111i\u1ec3m %0 và \u0111\u01b0\u1eddng chu\u1ea9n %1
 ParallelLines=\u0110\u01b0\u1eddng th\u1eb3ng song song
@@ -313,16 +313,16 @@ ShowObject=Hi\u1ec3n th\u1ecb \u0111\u1ed1i t\u01b0\u1ee3ng
 ShowOnlyBreakpoints=Ch\u1ec9 hi\u1ec7n th\u1ecb \u0111i\u1ec3m ng\u1eaft
 ShowTrace=Hi\u1ec3n th\u1ecb d\u1ea5u v\u1ebft khi di chuy\u1ec3n
 Size=Kích th\u01b0\u1edbc
-Slider=Con tr\u01b0\u1ee3t
-SlopeOf=\u0110\u1ed9 d\u1ed1c c\u1ee7a
-SlopeOfA=\u0110\u1ed9 nghiêng c\u1ee7a %0
+Slider=Thanh tr\u01b0\u1ee3t
+SlopeOf=H\u1ec7 s\u1ed1 góc c\u1ee7a
+SlopeOfA=H\u1ec7 s\u1ed1 góc c\u1ee7a %0
 Speed=T\u1ed1c \u0111\u1ed9
 Spreadsheet=Hi\u1ec3n th\u1ecb Spreadsheet
 StandardObject=\u0110\u1ed1i t\u01b0\u1ee3ng tiêu chu\u1ea9n
 StandardView=Góc nhìn m\u1eb7c \u0111\u1ecbnh
 StartingPoint=\u0110i\u1ec3m b\u1eaft \u0111\u1ea7u
 Substitute=Thay th\u1ebf
-SubstituteSimplify=Thay th\u1ebf & rú g\u1ecdn
+SubstituteSimplify=Thay th\u1ebf & rút g\u1ecdn
 SyntaxErrorAisNotAList=L\u1ed7i cú pháp: %0 không ph\u1ea3i là danh sách
 TangentLine=Ti\u1ebfp tuy\u1ebfn
 TangentToAParallelToB=Ti\u1ebfp tuy\u1ebfn c\u1ee7a %0 song song v\u1edbi %1
@@ -346,13 +346,13 @@ Triangle=H
 TurningPoint=\u0110i\u1ec3m u\u1ed1n
 UnitOrthogonalVectorOf=Véct\u01a1 pháp tuy\u1ebfn \u0111\u01a1n v\u1ecb c\u1ee7a
 UnitVectorOf=Véct\u01a1 ch\u1ec9 ph\u01b0\u01a1ng \u0111\u01a1n v\u1ecb c\u1ee7a
-UnitVectorOfA=Véc-t\u01a1 \u0111\u01a1n v\u1ecb c\u1ee7a %0
-UnitVectorPerpendicularToA=Véc-t\u01a1 \u0111\u01a1n v\u1ecb vuông góc c\u1ee7a %0
+UnitVectorOfA=Véct\u01a1 \u0111\u01a1n v\u1ecb c\u1ee7a %0
+UnitVectorPerpendicularToA=Véct\u01a1 \u0111\u01a1n v\u1ecb vuông góc c\u1ee7a %0
 Up=Trên
 Value=Giá tr\u1ecb
-Vector=Véc-t\u01a1
-VectorPerpendicularToA=Véc-t\u01a1 vuông góc c\u1ee7a %0
-Vectors=Các véc-t\u01a1
+Vector=Véct\u01a1
+VectorPerpendicularToA=Véct\u01a1 vuông góc c\u1ee7a %0
+Vectors=Các véct\u01a1
 VertexOf=\u0110\u1ec9nh c\u1ee7a
 VertexOfA=\u0110\u1ec9nh c\u1ee7a %0
 ViewCloseExtraWindow=Hi\u1ec3n th\u1ecb trong c\u1eeda s\u1ed5 chính
@@ -366,9 +366,9 @@ ZoomIn=Ph
 ZoomOut=Thu nh\u1ecf
 allowOutlyingIntersections=L\u1ea5y giao \u0111i\u1ec3m \u1edf xa
 allowReflexAngle=Góc \u0111\u1ed1i x\u1ee9ng
-and=và
-around=t\u1eeb tâm
-as=thành d\u1ea1ng
+and=Và
+around=Vòng Quanh
+as=Thành d\u1ea1ng
 asymptoticLine=ti\u1ec7m c\u1eadn
 back=tr\u1edf l\u1ea1i
 by=theo


hooks/post-receive
-- 
GeoGebra: Dynamic mathematics software for education



More information about the pkg-java-commits mailing list