[mathgl] 01/03: Imported Upstream version 2.3.3+svn1216

Dimitrios Eftaxiopoulos eftaxiop-guest at moszumanska.debian.org
Sat Dec 5 14:39:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

eftaxiop-guest pushed a commit to branch master
in repository mathgl.

commit 2209c9e53e7d5a50c87fd503d0970b143e22fff9
Author: Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr>
Date:   Sat Dec 5 15:50:17 2015 +0200

    Imported Upstream version 2.3.3+svn1216
---
 CMakeLists.txt                       |   41 +
 ChangeLog.txt                        |   21 +
 FindMathGL2.cmake                    |    8 +-
 clean-svn                            |    3 +
 cmake-qt4.txt                        |    6 +-
 cmake-qt5.txt                        |    7 +
 examples/CMakeLists.txt              |   10 +-
 examples/full_test.cpp               |    9 +-
 include/config.h.in                  |    2 +
 include/mgl2/{fltk.h => Fl_MathGL.h} |   49 +-
 include/mgl2/abstract.h              |   11 +-
 include/mgl2/base.h                  |   11 +-
 include/mgl2/canvas.h                |   15 +-
 include/mgl2/canvas_cf.h             |    4 +
 include/mgl2/canvas_wnd.h            |    2 +-
 include/mgl2/data.h                  |   85 +-
 include/mgl2/data_cf.h               |    3 +
 include/mgl2/datac.h                 |   67 +-
 include/mgl2/datac_cf.h              |    7 +
 include/mgl2/define.h                |   10 +-
 include/mgl2/fltk.h                  |  124 +-
 include/mgl2/mgl.h                   |   32 +-
 include/mgl2/mgl_cf.h                |    2 +-
 include/mgl2/mpi.h                   |    4 +-
 include/mgl2/pde.h                   |    2 +-
 include/mgl2/plot.h                  |   10 +
 include/mgl2/prim.h                  |   19 +-
 include/mgl2/qmathgl.h               |    4 +-
 include/mgl2/qt.h                    |    2 +-
 include/mgl2/type.h                  |    2 +
 include/mgl2/wnd.h                   |    2 +-
 json/CMakeLists.txt                  |    9 +-
 mgltex/Recompilation_decision.eps    | 1851 ++++++++++++++++++++
 mgltex/Recompilation_decision.pdf    |  Bin 0 -> 77225 bytes
 mgltex/Recompilation_decision.svg    | 1560 +++++++++++++++++
 mgltex/mgltex.dtx                    | 3099 +++++++++++++++++++++-------------
 mgltex/mgltex.ins                    |   12 +-
 mgltex/mgltex.pdf                    |  Bin 244484 -> 510993 bytes
 mgltex/mgltex.sty                    | 1409 ++++++++--------
 mgltex/sample.tex                    |    6 +-
 src/CMakeLists.txt                   |   58 +-
 src/addon.cpp                        |    4 +-
 src/axis.cpp                         |    7 +-
 src/base.cpp                         |   92 +-
 src/canvas.cpp                       |   25 +-
 src/canvas_cf.cpp                    |    4 +
 src/complex.cpp                      |    3 +
 src/complex_io.cpp                   |   88 +-
 src/crust.cpp                        |   77 +-
 src/data.cpp                         |   27 +-
 src/data_ex.cpp                      |  161 ++
 src/data_io.cpp                      |   32 +-
 src/evalc.cpp                        |   25 +-
 src/evalp.cpp                        |    6 +-
 src/exec.cpp                         |  170 +-
 src/export_2d.cpp                    |    6 +-
 src/fft.cpp                          |    8 +-
 src/fit.cpp                          |   15 +-
 src/interp.hpp                       |   36 +-
 src/opengl.cpp                       |    1 -
 src/parser.cpp                       |    5 +-
 src/pixel.cpp                        |  216 +--
 src/plot.cpp                         |  159 +-
 src/prim.cpp                         |  145 +-
 src/s_hull/s_hull_pro.cpp            |   23 +-
 src/s_hull/s_hull_pro.h              |    3 +-
 src/vect.cpp                         |  135 +-
 src/volume.cpp                       |    6 +-
 todo.txt                             |   33 +-
 udav/CMakeLists.txt                  |    8 +-
 udav/prop_dlg.cpp                    |   14 +-
 udav/prop_dlg.h                      |    2 +-
 udav/qmglsyntax.cpp                  |    2 +-
 udav/text_pnl.cpp                    |   11 +-
 udav/textedit.cpp                    |  174 ++
 udav/textedit.h                      |   31 +-
 udav/udav.desktop                    |    3 +-
 udav/udav_wnd.cpp                    |   22 +-
 utils/CMakeLists.txt                 |    4 +-
 utils/make_bin.cpp                   |    6 +-
 utils/mglconv.cpp                    |    7 +-
 utils/mglview.cpp                    |    7 +-
 widgets/CMakeLists.txt               |   75 +-
 widgets/fltk.cpp                     |    8 +-
 widgets/qt.cpp                       |   30 +-
 widgets/qt4/CMakeLists.txt           |   78 +-
 widgets/qt5/CMakeLists.txt           |   80 +-
 87 files changed, 7813 insertions(+), 2839 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2aae334..e2f5e46 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,38 @@ set(MathGL_VERSION_MAJOR 2)
 set(MathGL_VERSION_MINOR 3.3)
 set(MathGL_SOVERSION 7.4.0)
 
+function(mgl_add_lib mgl_tmp_lib)
+       if(${mgl_tmp_lib} MATCHES mgl)
+               set(mgllib mgl)
+               set(mgllib2 mgl2)
+       else(${mgl_tmp_lib} MATCHES mgl)
+               set(mgllib mgl-${mgl_tmp_lib})
+               set(mgllib2 mgl2-${mgl_tmp_lib})
+       endif(${mgl_tmp_lib} MATCHES mgl)
+       set(mgl_src_lst ${ARGV})
+       list(REMOVE_AT mgl_src_lst 0)
+       add_library(${mgllib} SHARED ${mgl_src_lst})
+       add_library(${mgllib}-static STATIC ${mgl_src_lst})
+       set_target_properties(${mgllib} PROPERTIES SOVERSION ${MathGL_SOVERSION})
+       set_target_properties(${mgllib} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+       set_target_properties(${mgllib} PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
+       set_target_properties(${mgllib}-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+       target_compile_definitions(${mgllib}-static PUBLIC MGL_STATIC_DEFINE)
+
+       if(enable-mgl2)
+               set_target_properties(${mgllib} PROPERTIES OUTPUT_NAME "${mgllib2}")
+               set_target_properties(${mgllib}-static PROPERTIES OUTPUT_NAME "${mgllib2}")
+       else(enable-mgl2)
+               set_target_properties(${mgllib}-static PROPERTIES OUTPUT_NAME "${mgllib}")
+       endif(enable-mgl2)
+
+       install(
+               TARGETS ${mgllib} ${mgllib}-static
+               RUNTIME DESTINATION bin
+               ARCHIVE DESTINATION ${MGL_LIB_INSTALL_DIR}
+               LIBRARY DESTINATION ${MGL_LIB_INSTALL_DIR}
+       )
+endfunction(mgl_add_lib mgl_tmp_lib)
 
 MACRO(MGL_DEPENDENT_OPTION option doc default depends1 force1 depends2 force2)
   IF(${option}_ISSET MATCHES "^${option}_ISSET$")
@@ -72,6 +104,7 @@ option(enable-all-widgets "Enable all Widgets")
 option(enable-all-swig "Enable all SWIG based interfaces")
 option(enable-rvalue "Enable move constructor support (need C++11)" OFF)
 option(enable-pthread "Enable POSIX threads support" OFF)
+option(enable-pthr_fltk "Enable POSIX threads for widgets" ON)
 option(enable-openmp "Enable OpenMP support" ON)
 
 if(enable-pthread AND enable-openmp)
@@ -174,6 +207,7 @@ CHECK_CXX_SOURCE_COMPILES(
 #include <complex.h>
 int main(int argc, char *args[])
 {std::complex<double> c(2.0, 1.0);
+double _Complex i=1.0i;
 double _Complex *a = reinterpret_cast<double _Complex *>(&c);
 std::complex<double> b(*a);return 0;}" MGL_HAVE_C99_COMPLEX)
 if(NOT MGL_HAVE_C99_COMPLEX)
@@ -259,6 +293,13 @@ endif(enable-pthread)
 
 if(enable-gsl)
 	set(MGL_HAVE_GSL 1)
+	FIND_PACKAGE(PkgConfig)
+	pkg_check_modules(GSL2 REQUIRED gsl)
+	if(GSL2_FOUND)
+		if ( NOT ${GSL2_VERSION} LESS 2.0)
+			SET(MGL_HAVE_GSL2 1)
+		endif ( NOT ${GSL2_VERSION} LESS 2.0)
+	endif ( GSL2_FOUND )
 	find_library(GSL_LIB gsl)
 	find_library(GSL_CBLAS_LIB gslcblas)
 	find_path(GSL_INCLUDE_DIR gsl/gsl_fft_complex.h)
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 3add637..f58b86c 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,24 @@
+2.3.4 Released ?? December 2015
+
+* Add mglData::Pulse() for determining pulse parameters
+* Add Pmap() plot for Poincare map
+* Add Lamerey() plot for Lamerey diagram
+* Add Bifurcation() plot for Bifurcation diagram
+* Add mglGraph::SetPenDelta() for changing size of semi-transparent area around lines, marks, glyphs, ...
+
+* Add MGL command 'fscanf' for getting formated data from textual file
+* Add MGL command 'echo' for printing the content of data
+* Add MGL command 'print' -- like 'info' but print immediately in stdout
+* Add option to rewrite file in 'savehdf'
+
+* Force set focus for editor in UDAV
+* Add line numbers to UDAV editor. Cyan number denote current line, red numbers denote lines with errors.
+* Disable mouse wheel for zooming in UDAV by default
+
+* Update mgltex (thanks to Diego Sejas Viscarra)
+
+* Bugfixes
+
 2.3.3 Released 01 June 2015
 
 * Add SurfCA() and Surf3CA() plots
diff --git a/FindMathGL2.cmake b/FindMathGL2.cmake
index ec5ba2d..772b505 100644
--- a/FindMathGL2.cmake
+++ b/FindMathGL2.cmake
@@ -113,12 +113,12 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(MathGL2
 		REQUIRED_VARS MATHGL2_LIBRARY MATHGL2_INCLUDE_DIR
 		VERSION_VAR MATHGL2_VERSION_STRING)
 
-FOREACH(_Component ${MathGL2_FIND_COMPONENTS})
+FOREACH(_Component ${MATHGL2_FIND_COMPONENTS})
 	STRING(TOLOWER ${_Component} _component)
 	STRING(TOUPPER ${_Component} _COMPONENT)
 
-	SET(MathGL2_${_Component}_FIND_REQUIRED ${MathGL2_FIND_REQUIRED})
-	SET(MathGL2_${_Component}_FIND_QUIETLY true)
+	SET(MATHGL2_${_Component}_FIND_REQUIRED ${MATHGL2_FIND_REQUIRED})
+	SET(MATHGL2_${_Component}_FIND_QUIETLY true)
 	# TODO find qt.h for qt4 and qt5 !!!
 	FIND_PATH(MATHGL2_${_COMPONENT}_INCLUDE_DIR
 				NAMES mgl2/${_component}.h
@@ -127,7 +127,7 @@ FOREACH(_Component ${MathGL2_FIND_COMPONENTS})
 				NAMES mgl-${_component}
 				PATHS ${MATHGL2_LIBRARY_DIR} NO_DEFAULT_PATH)
 
-	FIND_PACKAGE_HANDLE_STANDARD_ARGS(MathGL2_${_Component} DEFAULT_MSG
+	FIND_PACKAGE_HANDLE_STANDARD_ARGS(MATHGL2_${_Component} DEFAULT_MSG
 										MATHGL2_${_COMPONENT}_LIBRARY
 										MATHGL2_${_COMPONENT}_INCLUDE_DIR)
 
diff --git a/clean-svn b/clean-svn
new file mode 100755
index 0000000..f0ba47a
--- /dev/null
+++ b/clean-svn
@@ -0,0 +1,3 @@
+find . -name '.svn' -print0 | xargs -0 rm -rf
+find . -name '*~' -print0 | xargs -0 rm -f
+rm ./clean-svn
diff --git a/cmake-qt4.txt b/cmake-qt4.txt
index a5d389e..4208b52 100644
--- a/cmake-qt4.txt
+++ b/cmake-qt4.txt
@@ -1,10 +1,14 @@
 set(MGL_HAVE_QT4 1)
 if(enable-json-sample)
+set(MGL_QT4_LIBS Core Gui Network WebKit OpenGL)
 FIND_PACKAGE(Qt4 4.8 REQUIRED QtCore QtGui QtNetwork QtWebKit QtOpenGL)
 else(enable-json-sample)
+set(MGL_QT4_LIBS Core Gui OpenGL)
 FIND_PACKAGE(Qt4 4.8 REQUIRED QtCore QtGui QtOpenGL)
 endif(enable-json-sample)
 if(NOT QT4_FOUND)
 	message(SEND_ERROR "Couldn't find Qt4 library.")
 endif(NOT QT4_FOUND)
-include(${QT_USE_FILE})
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/cmake-qt5.txt b/cmake-qt5.txt
index c4b5bbf..ff447f7 100644
--- a/cmake-qt5.txt
+++ b/cmake-qt5.txt
@@ -16,15 +16,22 @@ endif(NOT Qt5Gui_FOUND)
 if(NOT Qt5PrintSupport_FOUND)
 	message(SEND_ERROR "Couldn't find Qt5 PrintSupport library.")
 endif(NOT Qt5PrintSupport_FOUND)
+set(MGL_QT5_LIBS Core Gui Widgets PrintSupport OpenGL)
 if(enable-json-sample)
 find_package(Qt5Network REQUIRED)
 find_package(Qt5WebKit REQUIRED)
+find_package(Qt5WebKitWidgets REQUIRED)
 if(NOT Qt5Network_FOUND)
 	message(SEND_ERROR "Couldn't find Qt5 Network library.")
 endif(NOT Qt5Network_FOUND)
 if(NOT Qt5WebKit_FOUND)
 	message(SEND_ERROR "Couldn't find Qt5 WebKit library.")
 endif(NOT Qt5WebKit_FOUND)
+if(NOT Qt5WebKitWidgets_FOUND)
+	message(SEND_ERROR "Couldn't find Qt5 WebKitWidgets library.")
+endif(NOT Qt5WebKitWidgets_FOUND)
+set(MGL_QT5_LIBS ${MGL_QT5_LIBS} Network WebKit WebKitWidgets)
 endif(enable-json-sample)
 
+set(CMAKE_AUTOMOC ON)
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 517162d..4f71340 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -23,23 +23,21 @@ if(MGL_HAVE_WX)
 endif(MGL_HAVE_WX)
 
 if(enable-qt)
-	add_executable(mgl_qt_example wnd_samples.cpp qt_example.cpp ${MGL_MOC_EX_FILES})
+	add_executable(mgl_qt_example wnd_samples.cpp qt_example.cpp)
 	if(enable-qt5)
 		include(../cmake-qt5.txt)
 		target_link_libraries(mgl_qt_example mgl-qt5)
-		qt5_wrap_cpp(qgl_moc_src qgl_example.h )
 	else(enable-qt5)
 		include(../cmake-qt4.txt)
 		target_link_libraries(mgl_qt_example mgl-qt4)
-		qt4_wrap_cpp(qgl_moc_src qgl_example.h )
 	endif(enable-qt5)
-	add_executable(mgl_qgl_example wnd_samples.cpp qgl_example.cpp ${qgl_moc_src} ${MGL_MOC_EX_FILES})
+	add_executable(mgl_qgl_example wnd_samples.cpp qgl_example.cpp)
 	if(enable-qt5)
 		target_link_libraries(mgl_qgl_example mgl)
-		qt5_use_modules(mgl_qgl_example Core Widgets Gui OpenGL)
+		qt5_use_modules(mgl_qgl_example ${MGL_QT5_LIBS})
 	else(enable-qt5)
 		target_link_libraries(mgl_qgl_example mgl)
-		target_link_libraries(mgl_qgl_example ${QT_LIBRARIES})
+		qt4_use_modules(mgl_qgl_example ${MGL_QT4_LIBS})
 	endif(enable-qt5)
 
 endif(enable-qt)
diff --git a/examples/full_test.cpp b/examples/full_test.cpp
index d34f80a..154b4eb 100644
--- a/examples/full_test.cpp
+++ b/examples/full_test.cpp
@@ -65,14 +65,9 @@ void mgls_prepare3v(mglData *ex, mglData *ey, mglData *ez);
 void save(mglGraph *gr,const char *name,const char *suf);
 void test(mglGraph *gr)
 {
-	gr->Line(mglPoint(-1,-1),mglPoint(1,1));
-	gr->Axis();
-	gr->WriteEPS("1.eps");
-	gr->WriteTEX("1.tex");
-	gr->WriteSVG("1.svg");
-	return;
 	mglParse par;
-	par.Execute(gr,"load '/home/balakin/mathgl-code/mathgl-2x/build/examples/libmgl_module.so':baxis\n");
+	par.Execute(gr,"call 'test' -1\n func 'test' 1\nline $1 0 1 1 'b'\nreturn\n");
+//	par.Execute(gr,"load '/home/balakin/mathgl-code/mathgl-2x/build/examples/libmgl_module.so':baxis\n");
 //	par.Execute(gr,"subplot 1 1 0:#rotate 40 60\nperspective 1.22:box:axis\n");
 	return;
 }
diff --git a/include/config.h.in b/include/config.h.in
index 483e6b6..053824c 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -15,12 +15,14 @@
 #define MGL_SYS_NAN		0
 #define MGL_HAVE_TYPEOF	0
 #define MGL_HAVE_PTHREAD	0
+#define MGL_HAVE_PTHREAD_FLTK	0
 #define MGL_HAVE_ATTRIBUTE	0
 #define MGL_HAVE_C99_COMPLEX	0
 #else
 #define MGL_HAVE_TYPEOF	${MGL_HAVE_TYPEOF}
 #define MGL_SYS_NAN		${MGL_HAVE_NAN_INF}
 #define MGL_HAVE_PTHREAD	${MGL_HAVE_PTHREAD}
+#define MGL_HAVE_PTHREAD_FLTK	${MGL_HAVE_PTHR_FLTK}
 #define MGL_HAVE_ATTRIBUTE	${MGL_HAVE_ATTRIBUTE}
 #define MGL_HAVE_C99_COMPLEX	${MGL_HAVE_C99_COMPLEX}
 #endif
diff --git a/include/mgl2/fltk.h b/include/mgl2/Fl_MathGL.h
similarity index 73%
copy from include/mgl2/fltk.h
copy to include/mgl2/Fl_MathGL.h
index df70be4..6929500 100644
--- a/include/mgl2/fltk.h
+++ b/include/mgl2/Fl_MathGL.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- * window.h is part of Math Graphic Library
+ * Fl_MathGL.h is part of Math Graphic Library
  * Copyright (C) 2007-2014 Alexey Balakin <mathgl.abalakin at gmail.ru>       *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -18,47 +18,9 @@
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
 //-----------------------------------------------------------------------------
-#ifndef _MGL_FLTK_H_
-#define _MGL_FLTK_H_
+#ifndef _MGL_FL_MATHGL_H_
+#define _MGL_FL_MATHGL_H_
 
-#include <mgl2/abstract.h>
-//-----------------------------------------------------------------------------
-#ifdef __cplusplus
-extern "C" {
-#endif
-/// Creates FLTK window for plotting
-HMGL MGL_EXPORT mgl_create_graph_fltk(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p));
-uintptr_t MGL_EXPORT mgl_create_graph_fltk_(const char *title, int);
-/// Run main FLTK loop for event handling.
-int MGL_EXPORT mgl_fltk_run();
-int MGL_EXPORT mgl_fltk_run_();
-/// Run main FLTK loop for event handling in separate thread.
-int MGL_EXPORT mgl_fltk_thr();
-#ifdef __cplusplus
-}
-//-----------------------------------------------------------------------------
-#include <mgl2/wnd.h>
-//-----------------------------------------------------------------------------
-/// Wrapper class for windows displaying graphics
-class MGL_EXPORT mglFLTK : public mglWnd
-{
-	mglFLTK(const mglFLTK &t) {}	// copying is not allowed
-	const mglFLTK &operator=(const mglFLTK &t)	{	return t;	}
-public:
-	mglFLTK(const char *title="MathGL") : mglWnd()
-	{	gr = mgl_create_graph_fltk(0,title,0,0);	}
-	mglFLTK(int (*draw)(HMGL gr, void *p), const char *title="MathGL", void *par=NULL, void (*load)(void *p)=0) : mglWnd()
-	{	gr = mgl_create_graph_fltk(draw,title,par,load);	}
-	mglFLTK(int (*draw)(mglGraph *gr), const char *title="MathGL") : mglWnd()
-	{	gr = mgl_create_graph_fltk(draw?mgl_draw_graph:0,title,(void*)draw,0);	}
-	mglFLTK(mglDraw *draw, const char *title="MathGL") : mglWnd()
-	{	gr = mgl_create_graph_fltk(draw?mgl_draw_class:0,title,draw,mgl_reload_class);
-		mgl_set_click_func(gr, mgl_click_class);	}
-    virtual ~mglFLTK() {}
-	int Run()	{	return mgl_fltk_run();	}	///< Run main loop for event handling
-	int RunThr()	{	return mgl_fltk_thr();	}	///< Run main loop for event handling in separate thread
-};
-//-----------------------------------------------------------------------------
 #ifdef __MWERKS__
 # define FL_DLL
 #endif
@@ -69,6 +31,7 @@ public:
 #include <FL/Fl_Button.H>
 #include <FL/Fl_Counter.H>
 #include <FL/Fl_Menu_Bar.H>
+#include <mgl2/fltk.h>
 class mglCanvas;
 //-----------------------------------------------------------------------------
 /// Class is FLTK widget which display MathGL graphics
@@ -77,6 +40,7 @@ class MGL_EXPORT Fl_MathGL : public Fl_Widget
 public:
 	Fl_Valuator	*tet_val;	///< pointer to external tet-angle validator
 	Fl_Valuator	*phi_val;	///< pointer to external phi-angle validator
+	mglCanvas *gr;			///< Built-in mglCanvas instance (mglCanvasFLTK is used by default)
 
 	Fl_MathGL(int x, int y, int w, int h, const char *label=0);
 	virtual ~Fl_MathGL();
@@ -114,7 +78,6 @@ public:
 	void stop(bool stop=true);
 
 protected:
-	mglCanvas *gr;		///< pointer to grapher
 	void *draw_par;		///< Parameters for drawing function mglCanvasWnd::DrawFunc.
 	/// Drawing function for window procedure. It should return the number of frames.
 	int (*draw_func)(mglBase *gr, void *par);
@@ -176,8 +139,6 @@ protected:
 	void setoff(int &val, Fl_Button *b, const char *txt=NULL);
 };
 //-----------------------------------------------------------------------------
-void MGL_EXPORT mgl_ask_fltk(const wchar_t *quest, wchar_t *res);
 void MGL_EXPORT mgl_makemenu_fltk(Fl_Menu_ *m, Fl_MGLView *w);
 //-----------------------------------------------------------------------------
 #endif
-#endif
diff --git a/include/mgl2/abstract.h b/include/mgl2/abstract.h
index d6eb494..19c222e 100644
--- a/include/mgl2/abstract.h
+++ b/include/mgl2/abstract.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- * thread.h is part of Math Graphic Library
+ * abstract.h is part of Math Graphic Library
  * Copyright (C) 2007-2014 Alexey Balakin <mathgl.abalakin at gmail.ru>       *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -43,6 +43,8 @@ typedef mglFormula* HMEX;
 typedef mglFormulaC* HAEX;
 typedef const mglDataA* HCDT;
 #ifdef __cplusplus
+std::string MGL_EXPORT mgl_data_to_string(HCDT d, long ns);
+std::string MGL_EXPORT mgl_datac_to_string(HCDT d, long ns);
 extern "C" {
 #endif
 /// Set seed for random numbers
@@ -134,6 +136,10 @@ public:
 	mglDataA()	{	temp=false;	func=0;	o=0;	}
 	virtual ~mglDataA()	{	if(func)	func(o);	}
 	virtual void set_v(mreal val, long i,long j=0,long k=0)	{}
+	/// Get the interpolated value and its derivatives in given data cell without border checking
+	virtual mreal valueD(mreal x,mreal y=0,mreal z=0,mreal *dx=0,mreal *dy=0,mreal *dz=0) const =0;
+	/// Get the interpolated value in given data cell without border checking
+	virtual mreal value(mreal x,mreal y=0,mreal z=0) const =0;
 	virtual mreal v(long i,long j=0,long k=0) const = 0;
 	virtual mreal vthr(long i) const = 0;
 	virtual long GetNx() const = 0;
@@ -151,6 +157,9 @@ public:
 	/// Save whole data array (for ns=-1) or only ns-th slice to text file
 	virtual void Save(const char *fname,long ns=-1) const
 	{	mgl_data_save(this,fname,ns);	}
+	/// Get whole data array (for ns=-1) or only ns-th slice to string
+	virtual std::string Get(long ns=-1)
+	{	return mgl_data_to_string(this,ns);	}
 	/// Export data array (for ns=-1) or only ns-th slice to PNG file according color scheme
 	inline void Export(const char *fname,const char *scheme,mreal v1=0,mreal v2=0,long ns=-1) const
 	{	mgl_data_export(this,fname,scheme,v1,v2,ns);	}
diff --git a/include/mgl2/base.h b/include/mgl2/base.h
index 9526e7f..9aa0c41 100644
--- a/include/mgl2/base.h
+++ b/include/mgl2/base.h
@@ -32,6 +32,9 @@
 #else
 #define MGL_PUSH(a,v,m)	a.push_back(v);
 #endif
+#if MGL_HAVE_OMP
+#include <omp.h>
+#endif
 //-----------------------------------------------------------------------------
 inline mreal mgl_d(mreal v,mreal v1,mreal v2) { return v2!=v1?(v-v1)/(v2-v1):NAN; }
 //-----------------------------------------------------------------------------
@@ -51,12 +54,10 @@ template <class T> class mglStack
 	void *mutex;
 public:
 	mglStack(const mglStack<T> &st)
-	{
-		np=st.np;	dat = (T**)malloc(np*sizeof(T*));
+	{	np=st.np;	dat = (T**)malloc(np*sizeof(T*));
 		pb=st.pb;	m=n=0;	reserve(st.n);
 		for(size_t i=0;i<m;i++)	memcpy(dat[i],st.dat[i],(1L<<pb)*sizeof(T));
-		n=st.n;		mutex = 0;
-	}
+		n=st.n;		mutex = 0;	}
 	mglStack(size_t Pbuf=10)
 	{	np=16;	pb=Pbuf;	dat = (T**)malloc(np*sizeof(T*));
 		dat[0] = new T[1L<<pb];	n=0;	m=1;	mutex = 0;	}
@@ -432,6 +433,8 @@ public:
 	inline void SetMarkSize(mreal val)	{	MarkSize=0.02*val;	}
 	/// Set size of arrows
 	inline void SetArrowSize(mreal val)	{	ArrowSize=0.03*val;	}
+	/// Get unscaled arrow size
+	inline mreal GetArrowSize() const	{	return ArrowSize/0.03;	}
 
 	/// Set warning code ant fill Message
 	void SetWarn(int code, const char *who);
diff --git a/include/mgl2/canvas.h b/include/mgl2/canvas.h
index efcee95..924147c 100644
--- a/include/mgl2/canvas.h
+++ b/include/mgl2/canvas.h
@@ -32,9 +32,9 @@ struct MGL_EXPORT mglAxis
 	mglAxis(mglAxis &&aa) : dv(aa.dv),ds(aa.ds),d(aa.d),ns(aa.ns),	t(aa.t),fact(aa.fact),stl(aa.stl),	dir(aa.dir),a(aa.a),b(aa.b),org(aa.org), v0(aa.v0),v1(aa.v1),v2(aa.v2),o(aa.o),	f(aa.f),txt(aa.txt),	ch(aa.ch),	pos(aa.pos),sh(aa.sh),inv(aa.inv)	{}
 #endif
 	inline void AddLabel(const wchar_t *lbl, mreal v)
-	{	txt.push_back(mglText(lbl,"",v));	}
+	{	if(mgl_isfin(v))	txt.push_back(mglText(lbl,"",v));	}
 	inline void AddLabel(const std::wstring &lbl, mreal v)
-	{	txt.push_back(mglText(lbl,v));	}
+	{	if(mgl_isfin(v))	txt.push_back(mglText(lbl,v));	}
 	inline void Clear()
 	{	dv=ds=d=v0=v1=v2=sh=0;	o=NAN;	ns=f=0;	pos = 't';	inv=false;
 		fact.clear();	stl.clear();	t.clear();	txt.clear();	}
@@ -198,7 +198,7 @@ using mglBase::Light;
 	/// Set object/subplot id
 	inline void SetObjId(long id)	{	ObjId = id;	}
 	/// Get object id
-	inline int GetObjId(long xs,long ys) const	
+	inline int GetObjId(long xs,long ys) const
 	{	register long i=xs+Width*ys;	return (i>=0 && i<Width*Height)?OI[i]:-1;	}
 	/// Get subplot id
 	int GetSplId(long xs,long ys) const MGL_FUNC_PURE;
@@ -331,6 +331,8 @@ using mglBase::Light;
 	void PreparePrim(int fast);
 	inline uint32_t GetPntCol(long i) const	{	return pnt_col[i];	}
 	inline uint32_t GetPrmCol(long i, bool sort=true) const	{	return GetColor(GetPrm(i, sort));	}
+	/// Set the size of semi-transparent area around lines, marks, ...
+	inline void SetPenDelta(float d)	{	pen_delta = 1.5*fabs(d);	}
 
 protected:
 	mreal Delay;		///< Delay for animation in seconds
@@ -438,9 +440,10 @@ private:
 	std::vector<mglMatrix> stack;	///< stack for transformation matrices
 	GifFileType *gif;
 	mreal fscl,ftet;	///< last scale and rotation for glyphs
-	long forg;		///< original point (for directions)
+	long forg;			///< original point (for directions)
 	size_t grp_counter;	///< Counter for StartGroup(); EndGroup();
-	mglMatrix Bt;	///< temporary matrix for text
+	mglMatrix Bt;		///< temporary matrix for text
+	float pen_delta;	///< delta pen width (dpw) -- the size of semi-transparent region for lines, marks, ...
 
 	/// Draw generic colorbar
 	void colorbar(HCDT v, const mreal *s, int where, mreal x, mreal y, mreal w, mreal h, bool text);
@@ -481,8 +484,6 @@ private:
 	void glyph_fpix(long i,long j,const mglMatrix *M, const mglPnt &p, mreal f, const mglGlyph &g, const mglDrawReg *d);
 	void glyph_wpix(long i,long j,const mglMatrix *M, const mglPnt &p, mreal f, const mglGlyph &g, const mglDrawReg *d);
 	void glyph_lpix(long i,long j,const mglMatrix *M, const mglPnt &p, mreal f, bool solid, const mglDrawReg *d);
-
-
 };
 //-----------------------------------------------------------------------------
 struct mglThreadG
diff --git a/include/mgl2/canvas_cf.h b/include/mgl2/canvas_cf.h
index 4bbd1c8..a13c46e 100644
--- a/include/mgl2/canvas_cf.h
+++ b/include/mgl2/canvas_cf.h
@@ -50,6 +50,10 @@ void MGL_EXPORT mgl_finish_(uintptr_t *gr);
 void MGL_EXPORT mgl_rasterize(HMGL gr);
 void MGL_EXPORT mgl_rasterize_(uintptr_t *gr);
 
+/// Set the size of semi-transparent area around lines, marks, glyphs, ... Default is 1.
+void MGL_EXPORT mgl_pen_delta(HMGL gr, double d);
+void MGL_EXPORT mgl_pen_delta_(uintptr_t *gr, double *d);
+
 /// Set tick length
 void MGL_EXPORT mgl_set_tick_len(HMGL gr, double len, double stt);
 void MGL_EXPORT mgl_set_tick_len_(uintptr_t *gr, mreal *len, mreal *stt);
diff --git a/include/mgl2/canvas_wnd.h b/include/mgl2/canvas_wnd.h
index cadfba5..c98cb55 100644
--- a/include/mgl2/canvas_wnd.h
+++ b/include/mgl2/canvas_wnd.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- * window.h is part of Math Graphic Library
+ * canvas_wnd.h is part of Math Graphic Library
  * Copyright (C) 2007-2014 Alexey Balakin <mathgl.abalakin at gmail.ru>       *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
diff --git a/include/mgl2/data.h b/include/mgl2/data.h
index 6ca9f62..44f99c6 100644
--- a/include/mgl2/data.h
+++ b/include/mgl2/data.h
@@ -22,11 +22,15 @@
 
 #include "mgl2/data_cf.h"
 #include "mgl2/pde.h"
-#ifdef __cplusplus
 //-----------------------------------------------------------------------------
 #include <vector>
 #include <string>
 //-----------------------------------------------------------------------------
+mreal MGL_EXPORT mglLinear(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);
+mreal MGL_EXPORT mglSpline3(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z,mreal *dx=0, mreal *dy=0, mreal *dz=0);
+mreal MGL_EXPORT mglSpline3s(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);
+std::string MGL_EXPORT mgl_data_to_string(HCDT d, long ns);
+//-----------------------------------------------------------------------------
 /// Class for working with data array
 class MGL_EXPORT mglData : public mglDataA
 {
@@ -62,6 +66,10 @@ using mglDataA::Momentum;
 	mglData(const double *d, int rows, int cols)	{	a=0;	Set(d,cols,rows);	}
 	mglData(const float *d, int size)	{	a=0;	Set(d,size);	}
 	mglData(const float *d, int rows, int cols)	{	a=0;	Set(d,cols,rows);	}
+	/// Allocate memory and copy data from std::vector<T>
+	mglData(const std::vector<int> &d)		{	a=0;	Set(d);	}
+	mglData(const std::vector<float> &d)	{	a=0;	Set(d);	}
+	mglData(const std::vector<double> &d)	{	a=0;	Set(d);	}
 	/// Read data from file
 	mglData(const char *fname)			{	a=0;	Read(fname);	}
 	/// Allocate the memory for data array and initialize it zero
@@ -123,14 +131,12 @@ using mglDataA::Momentum;
 	inline void Set(const mglDataA &dat)	{	mgl_data_set(this, &dat);	}
 	/// Allocate memory and copy data from std::vector<T>
 	inline void Set(const std::vector<int> &d)
-	{	if(d.size()<1)	return;
-		Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
+	{	if(d.size()>0)	{	Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
+		else	Create(1);	}
 	inline void Set(const std::vector<float> &d)
-	{	if(d.size()<1)	return;
-		Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
+	{	if(d.size()>0)	Set(&(a[0]),d.size());	else	Create(1);	}
 	inline void Set(const std::vector<double> &d)
-	{	if(d.size()<1)	return;
-		Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
+	{	if(d.size()>0)	Set(&(a[0]),d.size());	else	Create(1);	}
 
 	/// Create or recreate the array with specified size and fill it by zero
 	inline void Create(long mx,long my=1,long mz=1)
@@ -247,6 +253,9 @@ using mglDataA::Momentum;
 	/// Get momentum (1D-array) of data along direction 'dir'. String looks like "x1" for median in x-direction, "x2" for width in x-dir and so on.
 	inline mglData Momentum(char dir, const char *how) const
 	{	return mglData(true,mgl_data_momentum(this,dir,how));	}
+	/// Get pulse properties: pulse maximum and its position, pulse duration near maximum and by half height, energy in first pulse.
+	inline mglData Pulse(char dir) const
+	{	return mglData(true,mgl_data_pulse(this,dir));	}
 	/// Get sub-array of the data with given fixed indexes
 	inline mglData SubData(long xx,long yy=-1,long zz=-1) const
 	{	return mglData(true,mgl_data_subdata(this,xx,yy,zz));	}
@@ -438,6 +447,12 @@ using mglDataA::Momentum;
 	/// Set the value in given cell of the data
 	void set_v(mreal val, long i,long j=0,long k=0)	{	mgl_data_set_value(this,val,i,j,k);	}
 #endif
+	/// Get the interpolated value and its derivatives in given data cell without border checking
+	mreal valueD(mreal x,mreal y=0,mreal z=0,mreal *dx=0,mreal *dy=0,mreal *dz=0) const
+	{	return mglSpline3(a,nx,ny,nz,x,y,z,dx,dy,dz);	}
+	/// Get the interpolated value in given data cell without border checking
+	mreal value(mreal x,mreal y=0,mreal z=0) const
+	{	return mglSpline3s(a,nx,ny,nz,x,y,z);	}
 	mreal vthr(long i) const {	return a[i];	}
 	// add for speeding up !!!
 	mreal dvx(long i,long j=0,long k=0) const
@@ -482,11 +497,6 @@ inline bool operator<(const mglDataA &b, const mglDataA &d)
 inline bool operator>(const mglDataA &b, const mglDataA &d)
 {	return b.Minimal()>d.Minimal();	}
 //-----------------------------------------------------------------------------
-mreal MGL_EXPORT mglLinear(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);
-mreal MGL_EXPORT mglSpline3(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z,mreal *dx=0, mreal *dy=0, mreal *dz=0);
-mreal MGL_EXPORT mglSpline3s(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);
-#endif
-//-----------------------------------------------------------------------------
 /// Integral data transformation (like Fourier 'f' or 'i', Hankel 'h' or None 'n') for amplitude and phase
 inline mglData mglTransformA(const mglDataA &am, const mglDataA &ph, const char *tr)
 {	return mglData(true,mgl_transform_a(&am,&ph,tr));	}
@@ -626,15 +636,15 @@ public:
 		di=d.di;	dj=d.dj;	dk=d.dk;	return d;	}
 	inline mreal operator=(mreal val)
 	{	di=dj=dk=0;	a0=val;	return val;	}
-	/// Get the value in given cell of the data without border checking
-	mreal value(mreal x,mreal y,mreal z,mreal *dx=0,mreal *dy=0,mreal *dz=0) const
+	/// Get the interpolated value and its derivatives in given data cell without border checking
+	mreal valueD(mreal x,mreal y=0,mreal z=0,mreal *dx=0,mreal *dy=0,mreal *dz=0) const
 	{	if(dx)	*dx=di;	if(dy)	*dy=dj;	if(dz)	*dz=dk;
 		return a0+di*x+dj*y+dk*z;	}
-	mreal v(long i,long j=0,long k=0) const
-	{	return a0+di*i+dj*j+dk*k;	}
+	/// Get the interpolated value in given data cell without border checking
+	mreal value(mreal x,mreal y=0,mreal z=0) const	{	return a0+di*x+dj*y+dk*z;	}
+	mreal v(long i,long j=0,long k=0) const		{	return a0+di*i+dj*j+dk*k;	}
 	mreal vthr(long ii) const
-	{	register long i=ii%nx, j=(ii/nx)%ny, k=ii/(nx*ny);
-		return a0+di*i+dj*j+dk*k;	}
+	{	register long i=ii%nx, j=(ii/nx)%ny, k=ii/(nx*ny);	return a0+di*i+dj*j+dk*k;	}
 	// add for speeding up !!!
 	mreal dvx(long ,long =0,long =0) const	{	return di;	}
 	mreal dvy(long ,long =0,long =0) const	{	return dj;	}
@@ -685,10 +695,13 @@ public:
 	/// Copy data from other mglDataV variable
 	inline const mglDataW &operator=(const mglDataW &d)
 	{	nx=d.nx;	ny=d.ny;	nz=d.nz;	di=d.di;	dj=d.dj;	dk=d.dk;	return d;	}
-	/// Get the value in given cell of the data without border checking
-	mreal value(mreal x,mreal y,mreal z,mreal *dx=0,mreal *dy=0,mreal *dz=0) const
+	/// Get the interpolated value and its derivatives in given data cell without border checking
+	mreal valueD(mreal x,mreal y=0,mreal z=0,mreal *dx=0,mreal *dy=0,mreal *dz=0) const
 	{	if(dx)	*dx=di;	if(dy)	*dy=dj;	if(dz)	*dz=dk;
 		return di*(x<nx/2?x:nx-x)+dj*(y<ny/2?y:ny-y)+dk*(z<nz/2?z:nz-z);	}
+	/// Get the interpolated value in given data cell without border checking
+	mreal value(mreal x,mreal y=0,mreal z=0) const
+	{	return di*(x<nx/2?x:nx-x)+dj*(y<ny/2?y:ny-y)+dk*(z<nz/2?z:nz-z);	}
 	mreal v(long i,long j=0,long k=0) const
 	{	return di*(i<nx/2?i:nx-i)+dj*(j<ny/2?j:ny-j)+dk*(k<nz/2?k:nz-k);	}
 	mreal vthr(long ii) const
@@ -745,11 +758,12 @@ public:
 		if(eq && *eq)	{	ex = mgl_create_expr(eq);	str=eq;	}
 		else	{	ex=0;	str="";	}
 	}
-	/// Set dfunction and coordinates range [r1,r2]
+	/// Set function and coordinates range [r1,r2]
 	inline void SetFunc(mreal (*f)(mreal,mreal,mreal,void*), void *p=NULL)
 	{	mgl_delete_expr(ex);	ex=0;	dfunc=f;	par=p;	}
 
-	mreal value(mreal i,mreal j=0,mreal k=0, mreal *di=0,mreal *dj=0,mreal *dk=0) const
+	/// Get the interpolated value and its derivatives in given data cell without border checking
+	mreal valueD(mreal i,mreal j=0,mreal k=0, mreal *di=0,mreal *dj=0,mreal *dk=0) const
 	{
 		mreal res=0, x=v1.x+dx*i, y=v1.y+dy*j, z=v1.z+dz*k;
 		if(di)	*di = 0;	if(dj)	*dj = 0;	if(dk)	*dk = 0;
@@ -769,6 +783,14 @@ public:
 		}
 		return res;
 	}
+	/// Get the interpolated value in given data cell without border checking
+	mreal value(mreal i,mreal j=0,mreal k=0) const
+	{
+		mreal res=0, x=v1.x+dx*i, y=v1.y+dy*j, z=v1.z+dz*k;
+		if(dfunc)	res = dfunc(x,y,z, par);
+		else if(ex)	res = mgl_expr_eval(ex,x,y,z);
+		return res;
+	}
 	/// Copy data from other mglDataV variable
 	inline const mglDataF &operator=(const mglDataF &d)
 	{	nx=d.nx;	ny=d.ny;	nz=d.nz;	v1=d.v1;	v2=d.v2;	setD();
@@ -840,6 +862,12 @@ public:
 	inline void SetInd(long i, wchar_t name)
 	{	ind = i;	s = name;	}
 
+	/// Get the interpolated value and its derivatives in given data cell without border checking
+	mreal valueD(mreal x,mreal y=0,mreal z=0,mreal *dx=0,mreal *dy=0,mreal *dz=0) const
+	{	if(dz)	*dz=0;	return dat.valueD(ind,x,y,0,dx,dy);	}
+	/// Get the interpolated value in given data cell without border checking
+	mreal value(mreal x,mreal y=0,mreal z=0) const
+	{	return dat.value(ind,x,y);	}
 	/// Get the value in given cell of the data without border checking
 	mreal v(long i,long j=0,long =0) const
 	{	return dat.v(ind,i,j);	}
@@ -881,6 +909,12 @@ public:
 	inline void SetInd(long i, wchar_t name)
 	{	ind = i;	s = name;	}
 
+	/// Get the interpolated value and its derivatives in given data cell without border checking
+	mreal valueD(mreal x,mreal y=0,mreal z=0,mreal *dx=0,mreal *dy=0,mreal *dz=0) const
+	{	if(dy)	*dy=0;	if(dz)	*dz=0;	return dat.valueD(x,ind,0,dx);	}
+	/// Get the interpolated value in given data cell without border checking
+	mreal value(mreal x,mreal y=0,mreal z=0) const
+	{	return dat.value(x,ind,0);	}
 	/// Get the value in given cell of the data without border checking
 	mreal v(long i,long =0,long =0) const
 	{	return dat.v(i,ind,0);	}
@@ -913,6 +947,13 @@ public:
 	const mglDataS &operator=(const mglDataS &st)	{	dat = st.dat;	return st;	}
 	const std::vector<mreal> &operator=(const std::vector<mreal> &st)	{	dat = st;	return st;	}
 
+	/// Get the interpolated value and its derivatives in given data cell without border checking
+	mreal valueD(mreal x,mreal y=0,mreal z=0,mreal *dx=0,mreal *dy=0,mreal *dz=0) const
+	{	return mglSpline3(dat.data(),dat.size(),1,1,x,0,0,dx,dy,dz);	}
+	/// Get the interpolated value in given data cell without border checking
+	mreal value(mreal x,mreal y=0,mreal z=0) const
+	{	return mglSpline3s(dat.data(),dat.size(),1,1,x,0,0);	}
+
 	mreal v(long i,long j=0,long k=0) const		{	return dat[i];	}
 	mreal vthr(long i) const	{	return dat[i];	};
 	long GetNx() const	{	return dat.size();	}
diff --git a/include/mgl2/data_cf.h b/include/mgl2/data_cf.h
index 913017c..44cbfeb 100644
--- a/include/mgl2/data_cf.h
+++ b/include/mgl2/data_cf.h
@@ -346,6 +346,9 @@ uintptr_t MGL_EXPORT mgl_data_hist_w_(uintptr_t *dat, uintptr_t *weight, int *n,
 /// Get momentum (1D-array) of data along direction 'dir'. String looks like "x1" for median in x-direction, "x2" for width in x-dir and so on.
 HMDT MGL_EXPORT mgl_data_momentum(HCDT dat, char dir, const char *how);
 uintptr_t MGL_EXPORT mgl_data_momentum_(uintptr_t *dat, char *dir, const char *how, int,int);
+/// Get pulse properties: pulse maximum and its position, pulse duration near maximum and by half height.
+HMDT MGL_EXPORT mgl_data_pulse(HCDT dat, char dir);
+uintptr_t MGL_EXPORT mgl_data_pulse_(uintptr_t *dat, char *dir,int);
 /// Get array which values is result of interpolation this for coordinates from other arrays
 HMDT MGL_EXPORT mgl_data_evaluate(HCDT dat, HCDT idat, HCDT jdat, HCDT kdat, int norm);
 uintptr_t MGL_EXPORT mgl_data_evaluate_(uintptr_t *dat, uintptr_t *idat, uintptr_t *jdat, uintptr_t *kdat, int *norm);
diff --git a/include/mgl2/datac.h b/include/mgl2/datac.h
index 70d71d8..4cf7dcd 100644
--- a/include/mgl2/datac.h
+++ b/include/mgl2/datac.h
@@ -22,13 +22,14 @@
 
 #include "mgl2/data.h"
 #include "mgl2/datac_cf.h"
-#ifdef __cplusplus
 //-----------------------------------------------------------------------------
 #include <vector>
 #include <string>
-#define mgl2 	mreal(2)
-#define mgl3 	mreal(3)
-#define mgl4 	mreal(4)
+//-----------------------------------------------------------------------------
+#ifndef SWIG
+dual MGL_EXPORT mglLinearC(const dual *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);
+dual MGL_EXPORT mglSpline3C(const dual *a, long nx, long ny, long nz, mreal x, mreal y, mreal z,dual *dx=0, dual *dy=0, dual *dz=0);
+dual MGL_EXPORT mglSpline3Cs(const dual *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);
 //-----------------------------------------------------------------------------
 /// Class for working with complex data array
 class MGL_EXPORT mglDataC : public mglDataA
@@ -71,6 +72,12 @@ using mglDataA::Momentum;
 	mglDataC(const double *d, int rows, int cols)	{	a=0;	Set(d,cols,rows);	}
 	mglDataC(const float *d, int size)	{	a=0;	Set(d,size);	}
 	mglDataC(const float *d, int rows, int cols)	{	a=0;	Set(d,cols,rows);	}
+	/// Allocate memory and copy data from std::vector<T>
+	mglDataC(const std::vector<int> &d)		{	a=0;	Set(d);	}
+	mglDataC(const std::vector<float> &d)	{	a=0;	Set(d);	}
+	mglDataC(const std::vector<double> &d)	{	a=0;	Set(d);	}
+	mglDataC(const std::vector<std::complex<double> > &d)	{	a=0;	Set(d);	}
+	mglDataC(const std::vector<std::complex<float> > &d)	{	a=0;	Set(d);	}
 	/// Read data from file
 	mglDataC(const char *fname)			{	a=0;	Read(fname);	}
 	/// Allocate the memory for data array and initialize it zero
@@ -127,17 +134,18 @@ using mglDataA::Momentum;
 	{	mgl_datac_set_ap(this, &ampl, &phase);	}
 	/// Allocate memory and copy data from std::vector<T>
 	inline void Set(const std::vector<int> &d)
-	{	if(d.size()<1)	return;
-		Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
+	{	if(d.size()>0)	{	Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
+		else	Create(1);	}
 	inline void Set(const std::vector<float> &d)
-	{	if(d.size()<1)	return;
-		Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
+	{	if(d.size()>0)	Set(&(a[0]),d.size());	else	Create(1);	}
 	inline void Set(const std::vector<double> &d)
-	{	if(d.size()<1)	return;
-		Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
-	inline void Set(const std::vector<dual> &d)
-	{	if(d.size()<1)	return;
-		Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
+	{	if(d.size()>0)	Set(&(a[0]),d.size());	else	Create(1);	}
+	inline void Set(const std::vector<std::complex<double> > &d)
+	{	if(d.size()>0)	{	Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
+		else	Create(1);	}
+	inline void Set(const std::vector<std::complex<float> > &d)
+	{	if(d.size()>0)	{	Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
+		else	Create(1);	}
 
 	/// Create or recreate the array with specified size and fill it by zero
 	inline void Create(long mx,long my=1,long mz=1)
@@ -186,7 +194,7 @@ using mglDataA::Momentum;
 	/// Equidistantly fill the data to range [x1,x2] in direction dir
 	inline void Fill(dual x1,dual x2=mglNaN,char dir='x')
 	{	mgl_datac_fill(this,x1,x2,dir);	}
-	
+
 		/// Fill the data by interpolated values of vdat parametrically depended on xdat,ydat,zdat for x,y,z in range [p1,p2] using global spline
 	inline void RefillGS(const mglDataA &xdat, const mglDataA &vdat, mreal x1, mreal x2,long sl=-1)
 	{	mgl_datac_refill_gs(this,&xdat,&vdat,x1,x2,sl);	}
@@ -230,6 +238,10 @@ using mglDataA::Momentum;
 	/// Save whole data array (for ns=-1) or only ns-th slice to text file
 	void Save(const char *fname,long ns=-1) const
 	{	mgl_datac_save(this,fname,ns);	}
+	/// Get whole data array (for ns=-1) or only ns-th slice to string
+	std::string Get(long ns=-1) const
+	{	return mgl_datac_to_string(this,ns);	}
+
 	/// Read data from tab-separated text files with auto determining size which filenames are result of sprintf(fname,templ,t) where t=from:step:to
 	inline bool ReadRange(const char *templ, double from, double to, double step=1, bool as_slice=false)
 	{	return mgl_datac_read_range(this,templ,from,to,step,as_slice);	}
@@ -253,9 +265,12 @@ using mglDataA::Momentum;
 	/// Get imaginary part of data values
 	inline mglData Imag() const
 	{	return mglData(true,mgl_datac_imag(this));	}
-	/// Get absolute value of data values
+	/// Get absolute value of data values, i.e. |u|
 	inline mglData Abs() const
 	{	return mglData(true,mgl_datac_abs(this));	}
+	/// Get square of absolute value of data values, i.e. |u|^2
+	inline mglData Norm() const
+	{	return mglData(true,mgl_datac_norm(this));	}
 	/// Get argument of data values
 	inline mglData Arg() const
 	{	return mglData(true,mgl_datac_arg(this));	}
@@ -430,25 +445,29 @@ using mglDataA::Momentum;
 	/// Set the value in given cell of the data
 	void set_v(mreal val, long i,long j=0,long k=0)	{	mgl_datac_set_value(this,val,i,j,k);	}
 #endif
+	/// Get the interpolated value and its derivatives in given data cell without border checking
+	mreal valueD(mreal x,mreal y=0,mreal z=0,mreal *dx=0,mreal *dy=0,mreal *dz=0) const
+	{	dual aa,ax,ay,az;	mreal res;
+		aa = mglSpline3C(a,nx,ny,nz,x,y,z,&ax,&ay,&az);	res = abs(aa);
+		if(dx)	*dx = res?(real(aa)*real(ax)+imag(aa)*imag(ax))/res:0;
+		if(dy)	*dy = res?(real(aa)*real(ay)+imag(aa)*imag(ay))/res:0;
+		if(dz)	*dz = res?(real(aa)*real(az)+imag(aa)*imag(az))/res:0;	return res;	}
+	/// Get the interpolated value in given data cell without border checking
+	mreal value(mreal x,mreal y=0,mreal z=0) const
+	{	return abs(mglSpline3Cs(a,nx,ny,nz,x,y,z));	}
 	mreal vthr(long i) const {	return abs(a[i]);	}
 	// add for speeding up !!!
 	mreal dvx(long i,long j=0,long k=0) const
 	{   register long i0=i+nx*(j+ny*k);
-		return i>0? abs(i<nx-1? (a[i0+1]-a[i0-1])/mgl2:a[i0]-a[i0-1]) : abs(a[i0+1]-a[i0]);	}
+		return i>0? abs(i<nx-1? (a[i0+1]-a[i0-1])/mreal(2):a[i0]-a[i0-1]) : abs(a[i0+1]-a[i0]);	}
 	mreal dvy(long i,long j=0,long k=0) const
 	{   register long i0=i+nx*(j+ny*k);
-		return j>0? abs(j<ny-1? (a[i0+nx]-a[i0-nx])/mgl2:a[i0]-a[i0-nx]) : abs(a[i0+nx]-a[i0]);}
+		return j>0? abs(j<ny-1? (a[i0+nx]-a[i0-nx])/mreal(2):a[i0]-a[i0-nx]) : abs(a[i0+nx]-a[i0]);}
 	mreal dvz(long i,long j=0,long k=0) const
 	{   register long i0=i+nx*(j+ny*k), n=nx*ny;
-		return k>0? abs(k<nz-1? (a[i0+n]-a[i0-n])/mgl2:a[i0]-a[i0-n]) : abs(a[i0+n]-a[i0]);	}
+		return k>0? abs(k<nz-1? (a[i0+n]-a[i0-n])/mreal(2):a[i0]-a[i0-n]) : abs(a[i0+n]-a[i0]);	}
 };
 //-----------------------------------------------------------------------------
-#ifndef SWIG
-dual MGL_EXPORT mglLinearC(const dual *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);
-dual MGL_EXPORT mglSpline3C(const dual *a, long nx, long ny, long nz, mreal x, mreal y, mreal z,dual *dx=0, dual *dy=0, dual *dz=0);
-dual MGL_EXPORT mglSpline3Cs(const dual *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);
-#endif
-//-----------------------------------------------------------------------------
 /// Saves result of PDE solving (|u|^2) for "Hamiltonian" ham with initial conditions ini
 inline mglDataC mglPDEc(mglBase *gr, const char *ham, const mglDataA &ini_re, const mglDataA &ini_im, mreal dz=0.1, mreal k0=100,const char *opt="")
 {	return mglDataC(true, mgl_pde_solve_c(gr,ham, &ini_re, &ini_im, dz, k0,opt));	}
diff --git a/include/mgl2/datac_cf.h b/include/mgl2/datac_cf.h
index 9f4e21e..1383e84 100644
--- a/include/mgl2/datac_cf.h
+++ b/include/mgl2/datac_cf.h
@@ -291,14 +291,21 @@ uintptr_t MGL_EXPORT mgl_datac_correl_(uintptr_t *dat1, uintptr_t *dat2, const c
 void MGL_EXPORT mgl_datac_diffr(HADT dat, const char *how, mreal q);
 void MGL_EXPORT mgl_datac_diffr_(uintptr_t *d, const char *how, double q,int l);
 
+/// Get real part of data values
 HMDT MGL_EXPORT mgl_datac_real(HCDT dat);
 uintptr_t MGL_EXPORT mgl_datac_real_(uintptr_t *dat);
+/// Get imaginary part of data values
 HMDT MGL_EXPORT mgl_datac_imag(HCDT dat);
 uintptr_t MGL_EXPORT mgl_datac_imag_(uintptr_t *dat);
+/// Get absolute value of data values, i.e. |u|
 HMDT MGL_EXPORT mgl_datac_abs(HCDT dat);
 uintptr_t MGL_EXPORT mgl_datac_abs_(uintptr_t *dat);
+/// Get argument of data values
 HMDT MGL_EXPORT mgl_datac_arg(HCDT dat);
 uintptr_t MGL_EXPORT mgl_datac_arg_(uintptr_t *dat);
+/// Get square of absolute value of data values, i.e. |u|^2
+HMDT MGL_EXPORT mgl_datac_norm(HCDT dat);
+uintptr_t MGL_EXPORT mgl_datac_norm_(uintptr_t *dat);
 
 /// Interpolate by linear function the data to given point x=[0...nx-1], y=[0...ny-1], z=[0...nz-1]
 mdual MGL_EXPORT mgl_datac_linear(HCDT d, mreal x,mreal y,mreal z);
diff --git a/include/mgl2/define.h b/include/mgl2/define.h
index a87d414..edf2837 100644
--- a/include/mgl2/define.h
+++ b/include/mgl2/define.h
@@ -42,10 +42,6 @@
 #endif
 #endif
 
-#if MGL_HAVE_OMP
-#include <omp.h>
-#endif
-
 #endif
 //-----------------------------------------------------------------------------
 #ifdef WIN32 //_MSC_VER needs this before math.h
@@ -146,9 +142,11 @@ const unsigned long long mgl_inf[2] = {0x7ff0000000000000, 0x7f800000};
 #if MGL_USE_DOUBLE
 typedef double mreal;
 #define MGL_EPSILON	(1.+1e-10)
+#define MGL_MIN_VAL 1e-307
 #else
 typedef float mreal;
 #define MGL_EPSILON	(1.+1e-5)
+#define MGL_MIN_VAL 1e-37
 #endif
 #define MGL_FEPSILON	(1.+1e-5)
 //-----------------------------------------------------------------------------
@@ -161,6 +159,7 @@ typedef float mreal;
 #endif
 //-----------------------------------------------------------------------------
 #if MGL_HAVE_TYPEOF
+#define mgl_isrange(a,b)	({typeof (a) _a = (a); typeof (b) _b = (b); fabs(_a-_b)>MGL_MIN_VAL && _a-_a==mreal(0.) && _b-_b==mreal(0.);})
 #define mgl_isbad(a)	({typeof (a) _a = (a); _a-_a!=mreal(0.);})
 #define mgl_isfin(a)	({typeof (a) _a = (a); _a-_a==mreal(0.);})
 #define mgl_isnum(a)	({typeof (a) _a = (a); _a==_a;})
@@ -170,6 +169,7 @@ typedef float mreal;
 #define mgl_sign(a)		({typeof (a) _a = (a); _a<0 ? -1:1;})
 #define mgl_int(a)		({typeof (a) _a = (a); long(_a+(_a>=0 ? 0.5:-0.5));})
 #else
+#define mgl_isrange(a,b)	(fabs((a)-(b))>MGL_EPSILON && (a)-(a)==mreal(0.) && (b)-(b)==mreal(0.))
 #define mgl_min(a,b)	(((a)>(b)) ? (b) : (a))
 #define mgl_max(a,b)	(((a)>(b)) ? (a) : (b))
 #define mgl_isnan(a)	((a)!=(a))
@@ -208,7 +208,7 @@ enum{	// types of predefined curvelinear coordinate systems
 enum{	// Codes for warnings/messages
 	mglWarnNone = 0,// Everything OK
 	mglWarnDim,		// Data dimension(s) is incompatible
-	mglWarnLow, 		// Data dimension(s) is too small
+	mglWarnLow,		// Data dimension(s) is too small
 	mglWarnNeg,	 	// Minimal data value is negative
 	mglWarnFile, 	// No file or wrong data dimensions
 	mglWarnMem,		// Not enough memory
diff --git a/include/mgl2/fltk.h b/include/mgl2/fltk.h
index df70be4..343059b 100644
--- a/include/mgl2/fltk.h
+++ b/include/mgl2/fltk.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- * window.h is part of Math Graphic Library
+ * fltk.h is part of Math Graphic Library
  * Copyright (C) 2007-2014 Alexey Balakin <mathgl.abalakin at gmail.ru>       *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -34,6 +34,8 @@ int MGL_EXPORT mgl_fltk_run();
 int MGL_EXPORT mgl_fltk_run_();
 /// Run main FLTK loop for event handling in separate thread.
 int MGL_EXPORT mgl_fltk_thr();
+/// Callback function for asking user.
+void MGL_EXPORT mgl_ask_fltk(const wchar_t *quest, wchar_t *res);
 #ifdef __cplusplus
 }
 //-----------------------------------------------------------------------------
@@ -59,125 +61,5 @@ public:
 	int RunThr()	{	return mgl_fltk_thr();	}	///< Run main loop for event handling in separate thread
 };
 //-----------------------------------------------------------------------------
-#ifdef __MWERKS__
-# define FL_DLL
-#endif
-
-#include <FL/Fl.H>
-#include <FL/Fl_Window.H>
-#include <FL/Fl_Scroll.H>
-#include <FL/Fl_Button.H>
-#include <FL/Fl_Counter.H>
-#include <FL/Fl_Menu_Bar.H>
-class mglCanvas;
-//-----------------------------------------------------------------------------
-/// Class is FLTK widget which display MathGL graphics
-class MGL_EXPORT Fl_MathGL : public Fl_Widget
-{
-public:
-	Fl_Valuator	*tet_val;	///< pointer to external tet-angle validator
-	Fl_Valuator	*phi_val;	///< pointer to external phi-angle validator
-
-	Fl_MathGL(int x, int y, int w, int h, const char *label=0);
-	virtual ~Fl_MathGL();
-
-	/// Update (redraw) plot
-	virtual void update();
-	/// Set angles for additional plot rotation
-	inline void set_angle(mreal t, mreal p){	tet = t;	phi = p;	}
-	/// Set bitwise flags for general state (1-Alpha, 2-Light)
-	inline void set_flag(int f)	{	flag = f;	}
-	/// Set flags for handling mouse
-	void set_graph(HMGL gr);	///< Set grapher object
-	inline void set_graph(mglGraph *Gr)
-	{	set_graph(Gr->Self());	}
-	/// Get pointer to grapher
-	inline HMGL get_graph()	{	return (HMGL)gr;	}
-	/// Set drawing functions and its parameter
-	inline void set_draw(int (*func)(mglBase *gr, void *par), void *par)
-	{	if(draw_cl)	delete draw_cl;	draw_cl=0;	draw_func=func;	draw_par=par;	}
-	inline void set_draw(mglDraw *dr)	{	if(draw_cl)	delete draw_cl;	draw_cl=dr;	draw_func=0;	}
-	inline void set_draw(int (*dr)(mglGraph *gr))
-	{	set_draw(dr?mgl_draw_graph:0,(void*)dr);	}
-	void set_state(bool z, bool r)	{	zoom = z;	rotate = r;	}
-	/// Set zoom in/out region
-	inline void set_zoom(mreal X1, mreal Y1, mreal X2, mreal Y2)
-	{	x1 = X1;	x2 = X2;	y1 = Y1;	y2 = Y2;	update();	}
-	/// Get zoom region
-	inline void get_zoom(mreal *X1, mreal *Y1, mreal *X2, mreal *Y2)
-	{	*X1 = x1;	*X2 = x2;	*Y1 = y1;	*Y2 = y2;	}
-	/// Set popup menu pointer
-	inline void set_popup(const Fl_Menu_Item *pmenu, Fl_Widget *wdg, void *v)
-	{	popup = pmenu;	wpar = wdg;	vpar = v;	}
-	inline void zoom_region(mreal xx1,mreal xx2,mreal yy1, mreal yy2)
-	{	x1=xx1;	y1=yy1;	x2=xx2;	y2=yy2;	}
-	void stop(bool stop=true);
-
-protected:
-	mglCanvas *gr;		///< pointer to grapher
-	void *draw_par;		///< Parameters for drawing function mglCanvasWnd::DrawFunc.
-	/// Drawing function for window procedure. It should return the number of frames.
-	int (*draw_func)(mglBase *gr, void *par);
-	mglDraw *draw_cl;
-
-	const Fl_Menu_Item *popup;	///< pointer to popup menu items
-	Fl_Widget *wpar;			///< widget for popup menu
-	void *vpar;					///< parameter for popup menu
-	mreal tet,phi;				///< rotation angles
-	bool rotate;				///< flag for handle mouse
-	bool zoom;					///< flag for zoom by mouse
-	bool wire;
-	mreal x1,x2,y1,y2;			///< zoom region
-	int flag;					///< bitwise flag for general state (1-Alpha, 2-Light)
-	int x0,y0,xe,ye;			///< mouse position
-	char pos[128];
-
-	virtual void draw();		///< quick drawing function
-	int handle(int code);		///< handle mouse events
-	void resize(int x, int y, int w, int h);	///< resize control
-};
-//-----------------------------------------------------------------------------
-class MGL_EXPORT Fl_MGLView : public Fl_Window
-{
-public:
-	Fl_MathGL *FMGL;		///< Control which draw graphics
-	Fl_Scroll *scroll;
-	Fl_Menu_Bar	*menu;
-
-	void *par;				///< Parameter for handling animation
-	void (*next)(void*);	///< Callback function for next frame
-	void (*prev)(void*);	///< Callback function for prev frame
-	mreal (*delay)(void*);	///< Callback function for delay
-	void (*reload)(void*);	///< Callback function for reloading
-
-	void toggle_alpha()	{	toggle(alpha, alpha_bt, "Graphics/Alpha");	}
-	void toggle_light()	{	toggle(light, light_bt, "Graphics/Light");	}
-	void toggle_sshow()	{	toggle(sshow, anim_bt, "Graphics/Slideshow");	}
-	void toggle_grid()	{	toggle(grid, grid_bt, "Graphics/Grid");	}
-	void toggle_zoom()	{	toggle(zoom, zoom_bt);	}
-	void toggle_rotate(){	toggle(rotate, rotate_bt);	}
-	void setoff_zoom()	{	setoff(zoom, zoom_bt);	}
-	void setoff_rotate(){	setoff(rotate, rotate_bt);	}
-	bool is_sshow()		{	return sshow;	}
-	void adjust()
-	{	mgl_set_size(FMGL->get_graph(),scroll->w(),scroll->h());	FMGL->size(scroll->w(),scroll->h());	update();	}
-
-	Fl_MGLView(int x, int y, int w, int h, const char *label=0);
-	virtual ~Fl_MGLView();
-	void update();			///< Update picture by calling user drawing function
-protected:
-	Fl_Button *alpha_bt, *light_bt, *rotate_bt, *anim_bt, *zoom_bt, *grid_bt;
-//	Fl_Counter *tet, *phi;
-
-	int grid, alpha, light;	///< Current states of wire, alpha, light switches (toggle buttons)
-	int sshow, rotate, zoom;///< Current states of slideshow, rotate, zoom switches (toggle buttons)
-
-	void toggle(int &val, Fl_Button *b, const char *txt=NULL);
-	void setoff(int &val, Fl_Button *b, const char *txt=NULL);
-};
-//-----------------------------------------------------------------------------
-void MGL_EXPORT mgl_ask_fltk(const wchar_t *quest, wchar_t *res);
-void MGL_EXPORT mgl_makemenu_fltk(Fl_Menu_ *m, Fl_MGLView *w);
-//-----------------------------------------------------------------------------
 #endif
 #endif
diff --git a/include/mgl2/mgl.h b/include/mgl2/mgl.h
index 286a3bb..7fdfb54 100644
--- a/include/mgl2/mgl.h
+++ b/include/mgl2/mgl.h
@@ -73,6 +73,8 @@ public:
 	inline void SetAlphaDef(double alpha)	{	mgl_set_alpha_default(gr, alpha);	}
 	/// Set the transparency type (0 - usual, 1 - glass, 2 - lamp)
 	inline void SetTranspType(int type)		{	mgl_set_transp_type(gr, type);	}
+	/// Set the size of semi-transparent area around lines, marks, glyphs, ... Default is 1.
+	inline void SetPenDelta(double d)	{	mgl_pen_delta(gr,d);	}
 
 	/// Set the using of light on/off.
 	inline void Light(bool enable)			{	mgl_set_light(gr, enable);	}
@@ -114,11 +116,11 @@ public:
 	inline void CutOff(const char *EqC)		{	mgl_set_cutoff(gr, EqC);	}
 
 	/// Set default font size
-	inline void SetFontSize(double size)		{	mgl_set_font_size(gr, size);	}
+	inline void SetFontSize(double size)	{	mgl_set_font_size(gr, size);}
 	/// Set default font style and color
-	inline void SetFontDef(const char *fnt)		{	mgl_set_font_def(gr, fnt);	}
+	inline void SetFontDef(const char *fnt)	{	mgl_set_font_def(gr, fnt);	}
 	/// Set FontSize by size in pt and picture DPI (default is 16 pt for dpi=72)
-	virtual void SetFontSizePT(double pt, int dpi=72){	SetFontSize(pt*27.f/dpi);	}
+	virtual void SetFontSizePT(double pt, int dpi=72)	{	SetFontSize(pt*27.f/dpi);	}
 	/// Set FontSize by size in centimeters and picture DPI (default is 0.56 cm = 16 pt)
 	inline void SetFontSizeCM(double cm, int dpi=72)	{	SetFontSizePT(cm*28.45f,dpi);	}
 	/// Set FontSize by size in inch and picture DPI (default is 0.22 in = 16 pt)
@@ -570,6 +572,20 @@ public:
 	inline void Error(mglPoint p, mglPoint e, const char *pen="k")
 	{	mgl_error_box(gr, p.x, p.y, p.z, e.x, e.y, e.z, pen);	}
 
+	/// Draws Lamerey diagram for mapping x_new = f(x_old)
+	/** String \a stl may contain: ‘v’ for drawing arrows; ‘~’ for disable 1st segment.
+	 *	Option value set the number of iterations (default is 20).*/
+	inline void Lamerey(double x0, const mglDataA &f, const char *stl="", const char *opt="")
+	{	mgl_lamerey_dat(gr,x0,&f,stl,opt);	}
+	inline void Lamerey(double x0, const char *func, const char *stl="", const char *opt="")
+	{	mgl_lamerey_str(gr,x0,func,stl,opt);	}
+	/// Draws Bifurcation diagram for mapping x_new = f(x_old) in x-axis range
+	/** Option value set the number of stationary points (default is 1024).*/
+	inline void Bifurcation(double dx, const mglDataA &f, const char *stl="", const char *opt="")
+	{	mgl_bifurcation_dat(gr,dx,&f,stl,opt);	}
+	inline void Bifurcation(double dx, const char *func, const char *stl="", const char *opt="")
+	{	mgl_bifurcation_str(gr,dx,func,stl,opt);	}
+
 	/// Draws the face between points with color stl (include interpolation up to 4 colors).
 	inline void Face(mglPoint p1, mglPoint p2, mglPoint p3, mglPoint p4, const char *stl="r")
 	{	mgl_face(gr, p1.x, p1.y, p1.z, p2.x, p2.y, p2.z, p3.x, p3.y, p3.z, p4.x, p4.y, p4.z, stl);	}
@@ -1029,6 +1045,16 @@ public:
 	inline void Mark(const mglDataA &y, const mglDataA &r, const char *pen, const char *opt="")
 	{	mgl_mark_y(gr, &y, &r, pen, opt);	}
 
+	/// Draw Poincare map at condition r==0 for curve {x,y,z}
+	inline void Pmap(const mglDataA &x, const mglDataA &y, const mglDataA &z, const mglDataA &r, const char *pen, const char *opt="")
+	{	mgl_pmap_xyz(gr, &x, &y, &z, &r, pen, opt);	}
+	/// Draw Poincare map at condition r==0 for curve {x,y}
+	inline void Pmap(const mglDataA &x, const mglDataA &y, const mglDataA &r, const char *pen, const char *opt="")
+	{	mgl_pmap_xy(gr, &x, &y, &r, pen, opt);	}
+	/// Draw Poincare map at condition r==0 for curve {x,y} with x in x-axis range
+	inline void Pmap(const mglDataA &y, const mglDataA &r, const char *pen, const char *opt="")
+	{	mgl_pmap(gr, &y, &r, pen, opt);	}
+
 	/// Draw textual marks with size r at points {x,y,z}
 	inline void TextMark(const mglDataA &x, const mglDataA &y, const mglDataA &z, const mglDataA &r, const char *text, const char *fnt="", const char *opt="")
 	{	mgl_textmark_xyzr(gr, &x, &y, &z, &r, text, fnt, opt);	}
diff --git a/include/mgl2/mgl_cf.h b/include/mgl2/mgl_cf.h
index bc1096e..a0d0080 100644
--- a/include/mgl2/mgl_cf.h
+++ b/include/mgl2/mgl_cf.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- * MGL_EXPORT mgl_cf.cpp is part of Math Graphic Library
+ * mgl_cf.cpp is part of Math Graphic Library
  * Copyright (C) 2007-2014 Alexey Balakin <mathgl.abalakin at gmail.ru>       *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
diff --git a/include/mgl2/mpi.h b/include/mgl2/mpi.h
index aab7a4d..79aacb0 100644
--- a/include/mgl2/mpi.h
+++ b/include/mgl2/mpi.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- * mgl.h is part of Math Graphic Library
+ * mpi.h is part of Math Graphic Library
  * Copyright (C) 2007-2014 Alexey Balakin <mathgl.abalakin at gmail.ru>       *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -50,7 +50,7 @@ public:
 	inline void MPI_Send(int id)	{	mgl_mpi_send(gr,id);	}
 	/// Receive graphical information from node id using MPI
 	inline void MPI_Recv(int id)	{	mgl_mpi_recv(gr,id);	}
-	
+
 };
 #endif
 //-----------------------------------------------------------------------------
diff --git a/include/mgl2/pde.h b/include/mgl2/pde.h
index c756886..3bee32d 100644
--- a/include/mgl2/pde.h
+++ b/include/mgl2/pde.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- * data_cf.h is part of Math Graphic Library
+ * pde.h is part of Math Graphic Library
  * Copyright (C) 2007-2014 Alexey Balakin <mathgl.abalakin at gmail.ru>       *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
diff --git a/include/mgl2/plot.h b/include/mgl2/plot.h
index cd7d708..e1ed4f0 100644
--- a/include/mgl2/plot.h
+++ b/include/mgl2/plot.h
@@ -208,6 +208,16 @@ void MGL_EXPORT mgl_mark_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintp
 void MGL_EXPORT mgl_mark_y(HMGL graph, HCDT y, HCDT r, const char *pen, const char *opt);
 void MGL_EXPORT mgl_mark_y_(uintptr_t *graph, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int,int);
 
+/// Draw Poincare map at condition r==0 for curve {x,y,z}
+void MGL_EXPORT mgl_pmap_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, const char *opt);
+void MGL_EXPORT mgl_pmap_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *pen, const char *opt,int,int);
+/// Draw Poincare map at condition r==0 for curve {x,y}
+void MGL_EXPORT mgl_pmap_xy(HMGL graph, HCDT x, HCDT y, HCDT r, const char *pen, const char *opt);
+void MGL_EXPORT mgl_pmap_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int,int);
+/// Draw Poincare map at condition r==0 for curve {x,y} with x in x-axis range
+void MGL_EXPORT mgl_pmap(HMGL graph, HCDT y, HCDT r, const char *pen, const char *opt);
+void MGL_EXPORT mgl_pmap_(uintptr_t *graph, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int,int);
+
 /// Draw tube with variable radius r around curve {x,y,z}
 void MGL_EXPORT mgl_tube_xyzr(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, const char *opt);
 void MGL_EXPORT mgl_tube_xyzr_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *pen, const char *opt,int,int);
diff --git a/include/mgl2/prim.h b/include/mgl2/prim.h
index 18f7e55..b27c3c0 100644
--- a/include/mgl2/prim.h
+++ b/include/mgl2/prim.h
@@ -202,7 +202,7 @@ void MGL_EXPORT mgl_label_y_(uintptr_t *graph, uintptr_t *y, const char *text, c
 /// Draw table for values val along given direction with row labels text at position {x,y}
 /** String \a fnt may contain:
  *	 ‘#’ for drawing cell borders;
- *	 ‘|’ for limiting table widh by subplot one (equal to option ‘value 1’);
+ *	 ‘|’ for limiting table width by subplot one (equal to option ‘value 1’);
  *	 ‘=’ for equal width of all cells;
  *	 ‘f’ for fixed format of printed numbers;
  *	 ‘E’ for using ‘E’ instead of ‘e’;
@@ -220,6 +220,23 @@ void MGL_EXPORT mgl_logo(HMGL gr, long w, long h, const unsigned char *rgba, int
 void MGL_EXPORT mgl_logo_file(HMGL gr, const char *fname, int smooth, const char *opt);
 void MGL_EXPORT mgl_logo_file_(uintptr_t *gr, const char *fname, int *smooth, const char *opt,int l,int n);
 
+/// Draws Lamerey diagram for mapping x_new = f(x_old)
+/** String \a stl may contain: ‘v’ for drawing arrows; ‘~’ for disable 1st segment.
+ *	Option value set the number of iterations (default is 20).*/
+void MGL_EXPORT mgl_lamerey(HMGL gr, double x0, double (*f)(double,void *), void *par, const char *stl, const char *opt);
+void MGL_EXPORT mgl_lamerey_dat(HMGL gr, double x0, HCDT f, const char *stl, const char *opt);
+void MGL_EXPORT mgl_lamerey_str(HMGL gr, double x0, const char *f, const char *stl, const char *opt);
+void MGL_EXPORT mgl_lamerey_dat_(uintptr_t *gr, double *x0, uintptr_t *f, const char *stl, const char *opt, int,int);
+void MGL_EXPORT mgl_lamerey_str_(uintptr_t *gr, double *x0, const char *f, const char *stl, const char *opt, int,int,int);
+
+/// Draws Bifurcation diagram for mapping x_new = f(x_old) in x-axis range
+/** Option value set the number of stationary points (default is 1024).*/
+void MGL_EXPORT mgl_bifurcation(HMGL gr, double dx, double (*f)(double,double,void *), void *par, const char *stl, const char *opt);
+void MGL_EXPORT mgl_bifurcation_dat(HMGL gr, double dx, HCDT f, const char *stl, const char *opt);
+void MGL_EXPORT mgl_bifurcation_str(HMGL gr, double dx, const char *f, const char *stl, const char *opt);
+void MGL_EXPORT mgl_bifurcation_dat_(uintptr_t *gr, double *dx, uintptr_t *f, const char *stl, const char *opt, int,int);
+void MGL_EXPORT mgl_bifurcation_str_(uintptr_t *gr, double *dx, const char *f, const char *stl, const char *opt, int,int,int);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/mgl2/qmathgl.h b/include/mgl2/qmathgl.h
index 0e6334c..504875f 100644
--- a/include/mgl2/qmathgl.h
+++ b/include/mgl2/qmathgl.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- * window.h is part of Math Graphic Library
+ * qmathgl.h is part of Math Graphic Library
  * Copyright (C) 2007-2014 Alexey Balakin <mathgl.abalakin at gmail.ru>       *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -44,6 +44,7 @@ public:
 	bool enableMouse;	///< Enable mouse handlers
 	bool enableWheel;	///< Enable mouse wheel handlers
 	QString primitives;	///< Manual primitives, defined by user
+	mglCanvas *gr;		///< Built-in mglCanvas instance (mglCanvasQT is used by default)
 
 	QMathGL(QWidget *parent = 0, Qt::WindowFlags f = 0);
 	virtual ~QMathGL();
@@ -176,7 +177,6 @@ protected:
 	void wheelEvent(QWheelEvent *);
 	void mouseDoubleClickEvent(QMouseEvent *);
 
-	mglCanvas *gr;		///< Built-in mglCanvasQT-er instance (used by default)
 	void *draw_par;		///< Parameters for drawing function mglCanvasWnd::DrawFunc.
 	/// Drawing function for window procedure. It should return the number of frames.
 	int (*draw_func)(mglBase *gr, void *par);
diff --git a/include/mgl2/qt.h b/include/mgl2/qt.h
index ab877bd..58ef70d 100644
--- a/include/mgl2/qt.h
+++ b/include/mgl2/qt.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- * window.h is part of Math Graphic Library
+ * qt.h is part of Math Graphic Library
  * Copyright (C) 2007-2014 Alexey Balakin <mathgl.abalakin at gmail.ru>       *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
diff --git a/include/mgl2/type.h b/include/mgl2/type.h
index 8450f76..d441ec1 100644
--- a/include/mgl2/type.h
+++ b/include/mgl2/type.h
@@ -93,6 +93,8 @@ inline bool operator>(const mglPoint &a, const mglPoint &b)
 {	return a.x>=b.x && a.y>=b.y && a.z>=b.z;	}
 inline mreal mgl_norm(const mglPoint &p)
 {	return sqrt(p.x*p.x+p.y*p.y+p.z*p.z);	}
+inline mreal mgl_anorm(const mglPoint &p)
+{	return fabs(p.x)+fabs(p.y)+fabs(p.z);	}
 #endif
 //-----------------------------------------------------------------------------
 /// Class for RGBA color
diff --git a/include/mgl2/wnd.h b/include/mgl2/wnd.h
index a1aa0c3..885e5a8 100644
--- a/include/mgl2/wnd.h
+++ b/include/mgl2/wnd.h
@@ -58,7 +58,7 @@ class MGL_EXPORT mglWnd : public mglGraph
 	const mglWnd &operator=(const mglWnd &t)	{	return t;	}
 public:
 	mglWnd() : mglGraph(-1)	{}
-	virtual ~mglWnd() {}
+	virtual ~mglWnd() {	mgl_use_graph(gr,-255);	}
 	virtual int Run()=0;		///< Run main loop for event handling
 
 	inline void ToggleAlpha()	///< Switch on/off transparency (do not overwrite user settings)
diff --git a/json/CMakeLists.txt b/json/CMakeLists.txt
index 1c860d7..5979d6c 100644
--- a/json/CMakeLists.txt
+++ b/json/CMakeLists.txt
@@ -7,19 +7,18 @@ include_directories(${MathGL_BINARY_DIR}/json)
 if(enable-qt5)
 	include(../cmake-qt5.txt)
 	qt5_wrap_ui(json_ui_src MainWindow.ui)
-	qt5_wrap_cpp(json_moc_src ${json_moc_hdr} )
 else(enable-qt5)
 	include(../cmake-qt4.txt)
 	qt4_wrap_ui(json_ui_src MainWindow.ui)
-	qt4_wrap_cpp(json_moc_src ${json_moc_hdr} )
 endif(enable-qt5)
-add_executable(MglForJsTestBench ${json_src} ${json_moc_src} ${json_ui_src})
+add_executable(MglForJsTestBench ${json_src} ${json_moc_hdr} ${json_ui_src})
 if(enable-qt5)
 	target_compile_definitions(MglForJsTestBench PUBLIC MGL_USE_QT5)
 	target_link_libraries(MglForJsTestBench mgl-qt5)
-	qt5_use_modules(MglForJsTestBench Core Widgets Gui Network WebKit WebKitWidgets PrintSupport)
+	qt5_use_modules(MglForJsTestBench ${MGL_QT5_LIBS})
 else(enable-qt5)
-	target_link_libraries(MglForJsTestBench mgl-qt ${QT_LIBRARIES})
+	target_link_libraries(MglForJsTestBench mgl-qt)
+	qt4_use_modules(MglForJsTestBench ${MGL_QT4_LIBS})
 endif(enable-qt5)
 
 endif(enable-json-sample)
diff --git a/mgltex/Recompilation_decision.eps b/mgltex/Recompilation_decision.eps
new file mode 100644
index 0000000..b087058
--- /dev/null
+++ b/mgltex/Recompilation_decision.eps
@@ -0,0 +1,1851 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: cairo 1.13.1 (http://cairographics.org)
+%%CreationDate: Sat Nov  7 08:28:35 2015
+%%Pages: 1
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 3
+%%BoundingBox: 0 -1 631 791
+%%EndComments
+%%BeginProlog
+save
+50 dict begin
+/q { gsave } bind def
+/Q { grestore } bind def
+/cm { 6 array astore concat } bind def
+/w { setlinewidth } bind def
+/J { setlinecap } bind def
+/j { setlinejoin } bind def
+/M { setmiterlimit } bind def
+/d { setdash } bind def
+/m { moveto } bind def
+/l { lineto } bind def
+/c { curveto } bind def
+/h { closepath } bind def
+/re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto
+      0 exch rlineto 0 rlineto closepath } bind def
+/S { stroke } bind def
+/f { fill } bind def
+/f* { eofill } bind def
+/n { newpath } bind def
+/W { clip } bind def
+/W* { eoclip } bind def
+/BT { } bind def
+/ET { } bind def
+/pdfmark where { pop globaldict /?pdfmark /exec load put }
+    { globaldict begin /?pdfmark /pop load def /pdfmark
+    /cleartomark load def end } ifelse
+/BDC { mark 3 1 roll /BDC pdfmark } bind def
+/EMC { mark /EMC pdfmark } bind def
+/cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def
+/Tj { show currentpoint cairo_store_point } bind def
+/TJ {
+  {
+    dup
+    type /stringtype eq
+    { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse
+  } forall
+  currentpoint cairo_store_point
+} bind def
+/cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore
+    cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def
+/Tf { pop /cairo_font exch def /cairo_font_matrix where
+      { pop cairo_selectfont } if } bind def
+/Td { matrix translate cairo_font_matrix matrix concatmatrix dup
+      /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point
+      /cairo_font where { pop cairo_selectfont } if } bind def
+/Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def
+      cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def
+/g { setgray } bind def
+/rg { setrgbcolor } bind def
+/d1 { setcachedevice } bind def
+%%EndProlog
+%%BeginSetup
+%%BeginResource: font DejaVuSans
+11 dict begin
+/FontType 42 def
+/FontName /DejaVuSans def
+/PaintType 0 def
+/FontMatrix [ 1 0 0 1 0 0 ] def
+/FontBBox [ 0 0 0 0 ] def
+/Encoding 256 array def
+0 1 255 { Encoding exch /.notdef put } for
+Encoding 32 /space put
+Encoding 46 /period put
+Encoding 47 /slash put
+Encoding 60 /less put
+Encoding 62 /greater put
+Encoding 63 /question put
+Encoding 64 /at put
+Encoding 65 /A put
+Encoding 67 /C put
+Encoding 68 /D put
+Encoding 69 /E put
+Encoding 70 /F put
+Encoding 71 /G put
+Encoding 73 /I put
+Encoding 76 /L put
+Encoding 77 /M put
+Encoding 78 /N put
+Encoding 82 /R put
+Encoding 83 /S put
+Encoding 85 /U put
+Encoding 89 /Y put
+Encoding 92 /backslash put
+Encoding 97 /a put
+Encoding 99 /c put
+Encoding 100 /d put
+Encoding 101 /e put
+Encoding 104 /h put
+Encoding 105 /i put
+Encoding 108 /l put
+Encoding 109 /m put
+Encoding 110 /n put
+Encoding 111 /o put
+Encoding 112 /p put
+Encoding 113 /q put
+Encoding 114 /r put
+Encoding 115 /s put
+Encoding 116 /t put
+Encoding 117 /u put
+Encoding 118 /v put
+Encoding 119 /w put
+Encoding 121 /y put
+/CharStrings 42 dict dup begin
+/.notdef 0 def
+/S 1 def
+/t 2 def
+/a 3 def
+/r 4 def
+/F 5 def
+/i 6 def
+/n 7 def
+/d 8 def
+/backslash 9 def
+/M 10 def
+/G 11 def
+/L 12 def
+/at 13 def
+/less 14 def
+/s 15 def
+/c 16 def
+/p 17 def
+/greater 18 def
+/I 19 def
+/space 20 def
+/e 21 def
+/question 22 def
+/C 23 def
+/o 24 def
+/m 25 def
+/v 26 def
+/period 27 def
+/R 28 def
+/w 29 def
+/slash 30 def
+/l 31 def
+/U 32 def
+/D 33 def
+/E 34 def
+/A 35 def
+/h 36 def
+/y 37 def
+/q 38 def
+/u 39 def
+/Y 40 def
+/N 41 def
+end readonly def
+/sfnts [
+<0001000000090080000300106376742000691d3900001d14000001fe6670676d7134766a0000
+1f14000000ab676c796600c0787b0000009c00001c7868656164026638f700001fc000000036
+686865610cb8067b00001ff800000024686d7478cb7f16780000201c000000a86c6f63610002
+4608000020c4000000ac6d617870049706710000217000000020707265703b07f10000002190
+0000056800020066fe96046605a400030007001a400c04fb0006fb0108057f0204002fc4d4ec
+310010d4ecd4ec301311211125211121660400fc73031bfce5fe96070ef8f272062900010087
+ffe304a205f00027007e403c0d0c020e0b021e1f1e080902070a021f1f1e420a0b1e1f041501
+0015a11494189511049500942591118c281e0a0b1f1b0700221b190e2d071914222810dcc4ec
+fcece4111239393939310010e4f4e4ec10eef6ee10c6111739304b535807100eed1117390710
+0eed1117395922b20f2901015db61f292f294f29035d01152e012322061514161f011e011514
+0421222627351e013332363534262f012e01353424333216044873cc5fa5b377a67ae2d7fedd
+fee76aef807bec72adbc879a7be2ca0117f569da05a4c53736807663651f192bd9b6d9e0302f
+d04546887e6e7c1f182dc0abc6e4260000010037000002f2059e0013003840190e05080f03a9
+001101bc08870a0b08090204000810120e461410fc3cc4fc3cc432393931002fecf43cc4ec32
+11393930b2af1501015d01112115211114163b01152322263511233533110177017bfe854b73
+bdbdd5a28787059efec28ffda0894e9a9fd202608f013e0000000002007bffe3042d047b000a
+002500bc4027191f0b17090e00a91706b90e1120861fba1cb923b8118c170c001703180d0908
+0b1f030814452610fcecccd4ec323211393931002fc4e4f4fcf4ec10c6ee10ee113911391239
+30406e301d301e301f3020302130223f27401d401e401f402040214022501d501e501f502050
+21502250277027851d871e871f8720872185229027a027f0271e301e301f30203021401e401f
+40204021501e501f50205021601e601f60206021701e701f70207021801e801f80208021185d
+015d0122061514163332363d01371123350e01232226353436332135342623220607353e0133
+321602bedfac816f99b9b8b83fbc88accbfdfb0102a79760b65465be5af3f00233667b6273d9
+b4294cfd81aa6661c1a2bdc0127f8b2e2eaa2727fc00000100ba0000034a047b001100304014
+060b0700110b03870eb809bc070a06080008461210fcc4ec3231002fe4f4ecc4d4cc11123930
+b450139f1302015d012e012322061511231133153e0133321617034a1f492c9ca7b9b93aba85
+132e1c03b41211cbbefdb20460ae666305050000000100c90000042305d50009002940120695
+040295008104ad08050107031c00040a10fcec32d4c431002fecf4ec10ee30b20f0b01015d13
+211521112115211123c9035afd700250fdb0ca05d5aafe48aafd3700000200c1000001790614
+00030007002b400e06be04b100bc020501080400460810fc3cec3231002fe4fcec30400b1009
+400950096009700905015d1333112311331523c1b8b8b8b80460fba00614e900000100ba0000
+0464047b001300364019030900030e0106870e11b80cbc0a010208004e0d09080b461410fcec
+32f4ec31002f3ce4f4c4ec1112173930b46015cf1502015d0111231134262322061511231133
+153e013332160464b87c7c95acb9b942b375c1c602a4fd5c029e9f9ebea4fd870460ae6564ef
+00020071ffe3045a06140010001c003840191ab9000e14b905088c0eb8019703170400080247
+11120b451d10fcecf4ec323231002fece4f4c4ec10c4ee30b6601e801ea01e03015d01113311
+23350e0123220211100033321601141633323635342623220603a2b8b83ab17ccbff00ffcb7c
+b1fdc7a79292a8a89292a703b6025ef9eca86461014401080108014461fe15cbe7e7cbcbe7e7
+00010000ff4202b205d50003002d4014021a010100001a03030242019f008104020001032fc4
+3939310010f4ec304b5358071005ed071005ed592213012301aa0208aafdf805d5f96d069300
+000100c90000061f05d5000c00bf403403110708070211010208080702110302090a0901110a
+0a09420a070203080300af080b050908030201050a061c043e0a1c00040d10fcecfcec111739
+31002f3cc4ec32111739304b5358071005ed071008ed071008ed071005ed5922b2700e01015d
+405603070f080f09020a15021407130a260226072007260a200a3407350a69027c027b07790a
+80028207820a90021604010b0313011b0323012c032708280934013c035608590965086a0976
+08790981018d0395019b03145d005d13210901211123110123011123c9012d017d017f012dc5
+fe7fcbfe7fc405d5fc0803f8fa2b051ffc000400fae1000000010073ffe3058b05f0001d0039
+402000051b0195031b950812a111ae15950e91088c1e02001c1134043318190b101e10fcecfc
+e4fcc4310010e4f4ecf4ec10fed4ee1139393025112135211106042320001110002132041715
+2e0123200011100021323604c3feb6021275fee6a0fea2fe75018b015e9201076f70fc8bfeee
+feed011301126ba8d50191a6fd7f53550199016d016e01994846d75f60fecefed1fed2fece25
+0000000100c90000046a05d500050025400c0295008104011c033a00040610fcecec31002fe4
+ec304009300750078003800404015d133311211521c9ca02d7fc5f05d5fad5aa00020087fe9c
+077105a2000b004c00954032180c0309a919151b03a94c0f34330fac30a93715ac24a937434d
+33341e1a00281206180c281a2b1e2849122b2a28492c3d4d10dcecfcec10fefdfe3cc610ee11
+123939310010d4c4fcec10feedd4c610c5ee3210c4ee11393930004bb009544bb00c545b4bb0
+10545b4bb013545b4bb014545b58bd004dffc00001004d004d0040381137385940090f4e1f4e
+2f4e3f4e04015d011416333236353426232206010e01232226353436333216173533113e0135
+3426272624232206070602151412171604333236371706042322242726023534123736243332
+04171e011510000502fa8e7c7b8d907a798f02213c9b67acd7d8ab679c3b8f92a53f4068fed5
+b07be2609db1736d6901149d81f9685a7dfed998b9feb8808086887e810152bdd4016b7b4b4f
+fec2fee802198fa3a48e8ca5a4fe484d49f9c8c8fa4b4c83fd2016dfb16bbc50838b414066fe
+b5c19ffeea6a686d57516f6167837d7d0149bdb6014a7d7f87aea062e67bfef9fed006000001
+00d9005e05db04a60006004d402a029c030403019c0001040403019c0201050605009c060542
+05040201000503a806a7070102002404230710fcec3239310010f4ec1739304b53580704ed07
+1008ed071008ed071004ed592209021501350105dbfbf80408fafe050203f0fe91fe93b601d1
+a601d1000001006fffe303c7047b002700e7403c0d0c020e0b531f1e080902070a531f1f1e42
+0a0b1e1f041500860189041486158918b91104b925b8118c281e0a0b1f1b0700521b080e0708
+1422452810fcc4ecd4ece4111239393939310010e4f4ec10fef5ee10f5ee121739304b535807
+100eed111739070eed1117395922b2002701015d406d1c0a1c0b1c0c2e092c0a2c0b2c0c3b09
+3b0a3b0b3b0c0b200020012402280a280b2a132f142f152a16281e281f292029212427860a86
+0b860c860d12000000010202060a060b030c030d030e030f03100319031a031b031c041d0927
+2f293f295f297f2980299029a029f029185d005d7101152e012322061514161f011e01151406
+23222627351e013332363534262f012e01353436333216038b4ea85a898962943fc4a5f7d85a
+c36c66c661828c65ab40ab98e0ce66b4043fae282854544049210e2a99899cb62323be353559
+514b50250f2495829eac1e00000000010071ffe303e7047b0019003f401b00860188040e860d
+880ab91104b917b8118c1a07120d004814451a10fce432ec310010e4f4ec10fef4ee10f5ee30
+400b0f1b101b801b901ba01b05015d01152e0123220615141633323637150e01232200111000
+21321603e74e9d50b3c6c6b3509d4e4da55dfdfed6012d010655a20435ac2b2be3cdcde32b2b
+aa2424013e010e0112013a230000000200bafe5604a4047b0010001c003e401b1ab9000e14b9
+0508b80e8c01bd03bc1d11120b471704000802461d10fcec3232f4ec310010e4e4e4f4c4ec10
+c4ee304009601e801ea01ee01e04015d2511231133153e013332001110022322260134262322
+061514163332360173b9b93ab17bcc00ffffcc7bb10238a79292a7a79292a7a8fdae060aaa64
+61febcfef8fef8febc6101ebcbe7e7cbcbe7e7000000000100d9005e05db04a60006004f402b
+069c0006030403059c040403009c010201069c05060202014206050302000504a801a7070602
+240400230710fc3cec39310010f4ec1739304b5358071008ed071004ed071004ed071008ed59
+2213350115013501d90502fafe040603f0b6fe2fa6fe2fb6016d0000000100c90000019305d5
+0003002eb700af02011c00040410fc4bb0105458b9000000403859ec31002fec3001400d3005
+4005500560058f059f05065d13331123c9caca05d5fa2b0000020071ffe3047f047b0014001b
+00704024001501098608880515a90105b90c01bb18b912b80c8c1c1b1502081508004b02120f
+451c10fcecf4ecc4111239310010e4f4ece410ee10ee10f4ee1112393040293f1d701da01dd0
+1df01d053f003f013f023f153f1b052c072f082f092c0a6f006f016f026f156f1b095d71015d
+0115211e0133323637150e01232000111000333200072e0123220607047ffcb20ccdb76ac762
+63d06bfef4fec70129fce20107b802a5889ab90e025e5abec73434ae2a2c0138010a01130143
+feddc497b4ae9e0000020093000003b005f0000300240065402b241e0906040a1d1304001486
+1388109517910083021d1a0d0905040a1e010d1c1a041c05010300261a132510dc4bb00c5458
+b90013ffc03859c4fcecd4ec10ee11393911123911123931002feef6fef4ee10cd1139391739
+3001b679097a0a7a20035d2533152313233534363f013e0135342623220607353e0133321615
+14060f010e01070e01150187cbcbc5bf385a5a3933836c4fb3615ec167b8df485a582f270806
+06fefe01919a65825659355e31596e4643bc3938c29f4c8956562f3519153c34000000010073
+ffe3052705f000190036401a0da10eae0a951101a100ae04951791118c1a07190d003014101a
+10fcec32ec310010e4f4ecf4ec10eef6ee30b40f1b1f1b02015d01152e012320001110002132
+3637150e01232000111000213216052766e782ff00fef00110010082e7666aed84feadfe7a01
+86015386ed0562d55f5efec7fed8fed9fec75e5fd34848019f01670168019f47000000020071
+ffe30475047b000b0017004a401306b91200b90cb8128c1809120f51031215451810fcecf4ec
+310010e4f4ec10ee3040233f197b007b067f077f087f097f0a7f0b7b0c7f0d7f0e7f0f7f107f
+117b12a019f01911015d012206151416333236353426273200111000232200111000027394ac
+ab9593acac93f00112feeef0f1feef011103dfe7c9c9e7e8c8c7e99cfec8feecfeedfec70139
+0113011401380000000100ba0000071d047b0022005a4026061209180f00061d07150c871d20
+03b81bbc19100700110f0808065011080f501c18081a462310fcec32fcfcfcec11123931002f
+3c3ce4f43cc4ec32111217393040133024502470249024a024a024bf24df24ff2409015d013e
+013332161511231134262322061511231134262322061511231133153e01333216042945c082
+afbeb972758fa6b972778da6b9b93fb0797aab03897c76f5e2fd5c029ea19cbea4fd87029ea2
+9bbfa3fd870460ae67627c0000000001003d0000047f0460000600fb40270311040504021101
+0205050402110302060006011100000642020300bf0506050302010504000710d44bb00a5458
+b90000004038594bb014544bb015545b58b90000ffc03859c4173931002fec3239304b535807
+1005ed071008ed071008ed071005ed592201408e48026a027b027f02860280029102a4020806
+00060109030904150015011a031a0426002601290329042008350035013a033a043008460046
+0149034904460548064008560056015903590450086600660169036904670568066008750074
+017b037b0475057a068500850189038904890586069600960197029a03980498059706a805a7
+06b008c008df08ff083e5d005d133309013301233dc3015e015ec3fe5cfa0460fc5403acfba0
+0000000100db000001ae00fe00030011b7008302011900180410fcec31002fec3037331523db
+d3d3fefe000200c90000055405d50013001c00b14035090807030a0611030403051104040342
+06040015030415950914950d810b040506031109001c160e050a191904113f140a1c0c041d10
+fcec32fcc4ec1117391139393931002f3cf4ecd4ec123912391239304b5358071005ed071005
+ed1117395922b2401e01015d40427a1301050005010502060307041500150114021603170425
+002501250226032706260726082609201e360136024601460268057504750577138806880798
+0698071f5d005d011e01171323032e012b01112311212016151406011133323635342623038d
+417b3ecdd9bf4a8b78dcca01c80100fc83fd89fe9295959202bc16907efe68017f9662fd8905
+d5d6d88dba024ffdee878383850000010056000006350460000c01eb404905550605090a0904
+550a0903550a0b0a025501020b0b0a061107080705110405080807021103020c000c01110000
+0c420a050203060300bf0b080c0b0a09080605040302010b07000d10d44bb00a544bb011545b
+4bb012545b4bb013545b4bb00b545b58b9000000403859014bb00c544bb00d545b4bb010545b
+58b90000ffc03859cc173931002f3cec32321739304b5358071005ed071008ed071008ed0710
+05ed071008ed071005ed0705ed071008ed59220140ff050216021605220a350a49024905460a
+400a5b025b05550a500a6e026e05660a79027f0279057f05870299029805940abc02bc05ce02
+c703cf051d0502090306040b050a080b09040b050c1502190316041a051b081b09140b150c25
+00250123022703210425052206220725082709240a210b230c390336043608390c300e460248
+034604400442054006400740084409440a440b400e400e560056015602500451055206520750
+085309540a550b6300640165026a0365046a056a066a076e09610b670c6f0e7500750179027d
+0378047d057a067f067a077f07780879097f097b0a760b7d0c870288058f0e97009701940293
+039c049b05980698079908402f960c9f0ea600a601a402a403ab04ab05a906a907ab08a40caf
+0eb502b103bd04bb05b809bf0ec402c303cc04ca05795d005d13331b01331b013301230b0123
+56b8e6e5d9e6e5b8fedbd9f1f2d90460fc96036afc96036afba00396fc6a00010000ff4202b2
+05d50003002d4014001a010201021a03000342029f008104020001032fc43939310010f4ec30
+4b5358071005ed071005ed5922013301230208aafdf8aa05d5f96d000000000100c100000179
+061400030022b7009702010800460410fcec31002fec30400d10054005500560057005f00506
+015d13331123c1b8b80614f9ec00000100b2ffe3052905d50011004040160802110b0005950e
+8c09008112081c0a38011c00411210fc4bb0105458b90000ffc03859ecfcec310010e432f4ec
+11393939393001b61f138f139f13035d133311141633323635113311100021200011b2cbaec3
+c2aecbfedffee6fee5fedf05d5fc75f0d3d3f0038bfc5cfedcfed6012a012400000200c90000
+05b005d500080011002e4015009509810195100802100a0005190d32001c09041210fcecf4ec
+113939393931002fecf4ec30b2601301015d0111332000111000212521200011100029010193
+f40135011ffee1fecbfe42019f01b20196fe68fe50fe61052ffb770118012e012c0117a6fe97
+fe80fe7efe960000000100c90000048b05d5000b002e401506950402950081089504ad0a0501
+0907031c00040c10fcec32d4c4c431002fececf4ec10ee30b21f0d01015d1321152111211521
+11211521c903b0fd1a02c7fd3902f8fc3e05d5aafe46aafde3aa0000000200100000056805d5
+0002000a00c2404100110100040504021105050401110a030a0011020003030a071105040611
+0505040911030a08110a030a4200030795010381090509080706040302010009050a0b10d4c4
+173931002f3ce4d4ec1239304b5358071005ed0705ed071005ed0705ed071008ed071005ed07
+1005ed071008ed5922b2200c01015d40420f010f020f070f080f005800760070008c00090701
+0802060309041601190256015802500c67016802780176027c0372047707780887018802800c
+980299039604175d005d090121013301230321032302bcfeee0225fe7be50239d288fd5f88d5
+050efd1903aefa2b017ffe810000000100ba000004640614001300344019030900030e010687
+0e11b80c970a010208004e0d09080b461410fcec32f4ec31002f3cecf4c4ec1112173930b260
+1501015d0111231134262322061511231133113e013332160464b87c7c95acb9b942b375c1c6
+02a4fd5c029e9f9ebea4fd870614fd9e6564ef000001003dfe56047f0460000f018b40430708
+020911000f0a110b0a00000f0e110f000f0d110c0d00000f0d110e0d0a0b0a0c110b0b0a420d
+0b0910000b058703bd0e0bbc100e0d0c0a09060300080f040f0b1010d44bb00a544bb008545b
+58b9000b004038594bb0145458b9000bffc03859c4c4111739310010e432f4ec113911391239
+304b5358071005ed071008ed071008ed071005ed071008ed0705ed173259220140f006000508
+0609030d160a170d100d230d350d490a4f0a4e0d5a095a0a6a0a870d800d930d120a000a0906
+0b050c0b0e0b0f1701150210041005170a140b140c1a0e1a0f27002401240220042005290828
+09250a240b240c270d2a0e2a0f201137003501350230043005380a360b360c380d390e390f30
+114100400140024003400440054006400740084209450a470d490e490f401154005101510255
+03500450055606550756085709570a550b550c590e590f501166016602680a690e690f60117b
+08780e780f89008a09850b850c890d890e890f9909950b950c9a0e9a0fa40ba40cab0eab0fb0
+11cf11df11ff11655d005d050e012b01353332363f01013309013302934e947c936c4c543321
+fe3bc3015e015ec368c87a9a488654044efc94036c00000000020071fe56045a047b000b001c
+003e401b03b90c0f09b91815b80f8c1bbd19bc1d180c06081a47001212451d10fcecf4ec3232
+310010e4e4e4f4c4ec10c6ee304009601e801ea01ee01e04015d011416333236353426232206
+010e012322021110003332161735331123012fa79292a8a89292a702733ab17ccbff00ffcb7c
+b13ab8b8022fcbe7e7cbcbe7e7fdae646101440108010801446164aaf9f60000000200aeffe3
+0458047b00130014003b401c030900030e0106870e118c0a01bc14b80c0d0908140b4e020800
+461510fcecf439ec3231002fe4e432f4c4ec1112173930b46f15c01502015d13113311141633
+32363511331123350e0123222601aeb87c7c95adb8b843b175c1c801cf01ba02a6fd619f9fbe
+a4027bfba0ac6663f003a8000001fffc000004e705d500080094402803110405040211010205
+050402110302080008011100000842020300af0602070440051c0040070910d4e4fce4123931
+002fec3239304b5358071005ed071008ed071008ed071005ed5922b2000a01015d403c050214
+02350230023005300846024002400540085102510551086502840293021016011a031f0a2601
+290337013803400a670168037803700a9f0a0d5d005d03330901330111231104d9019e019bd9
+fdf0cb05d5fd9a0266fcf2fd3902c7000000000100c90000053305d500090079401e07110102
+0102110607064207020300af0805060107021c0436071c00040a10fcecfcec11393931002f3c
+ec323939304b5358071004ed071004ed5922b21f0b01015d4030360238074802470769026607
+8002070601090615011a06460149065701580665016906790685018a0695019a069f0b105d00
+5d13210111331121011123c901100296c4fef0fd6ac405d5fb1f04e1fa2b04e1fb1f013500b8
+00cb00cb00c100aa009c01a600b800660000007100cb00a002b20085007500b800c301cb0189
+022d00cb00a600f000d300aa008700cb03aa0400014a003300cb000000d9050200f4015400b4
+009c01390114013907060400044e04b4045204b804e704cd0037047304cd04600473013303a2
+055605a60556053903c5021200c9001f00b801df007300ba03e9033303bc0444040e00df03cd
+03aa00e503aa0404000000cb008f00a4007b00b80014016f007f027b0252008f00c705cd009a
+009a006f00cb00cd019e01d300f000ba018300d5009803040248009e01d500c100cb00f60083
+0354027f00000333026600d300c700a400cd008f009a0073040005d5010a00fe022b00a400b4
+009c00000062009c0000001d032d05d505d505d505f0007f007b005400a406b80614072301d3
+00b800cb00a601c301ec069300a000d3035c037103db0185042304a80448008f013901140139
+0360008f05d5019a0614072306660179046004600460047b009c00000277046001aa00e90460
+0762007b00c5007f027b000000b4025205cd006600bc00660077061000cd013b01850389008f
+007b0000001d00cd074a042f009c009c0000077d006f0000006f0335006a006f007b00ae00b2
+002d0396008f027b00f600830354063705f6008f009c04e10266008f018d02f600cd03440029
+006604ee00730000140000960000b707060504030201002c2010b002254964b040515820c859
+212d2cb002254964b040515820c859212d2c20100720b00050b00d7920b8ffff5058041b0559
+b0051cb0032508b0042523e120b00050b00d7920b8ffff5058041b0559b0051cb0032508e12d
+2c4b505820b0fd454459212d2cb002254560442d2c4b5358b00225b0022545445921212d2c45
+442d2cb00225b0022549b00525b005254960b0206368208a108a233a8a10653a2d0000010000
+0002570ae39778045f0f3cf5001f080000000000cef5cb7600000000cef5cb76f7d6fcae0d72
+095500000008000000010000000000010000076dfe1d00000de2f7d6fa510d72000100000000
+00000000000000000000002a04cd0066051400870323003704e7007b034a00ba049a00c90239
+00c1051200ba0514007102b2000006e700c906330073047500c90800008706b400d9042b006f
+04660071051400ba06b400d9025c00c9028b000004ec0071043f00930596007304e5007107cb
+00ba04bc003d028b00db058f00c9068b005602b20000023900c105db00b2062900c9050e00c9
+05790010051200ba04bc003d05140071051200ae04e3fffc05fc00c900000000000000440000
+013c000001b8000002e400000354000003a8000003f800000470000005080000055400000650
+000006f80000073c000008bc0000093400000a9400000b2c00000bcc00000c4400000c8c0000
+0c8c00000d6000000e3800000ed000000f74000010380000115c0000118400001298000014bc
+0000150800001544000015c800001648000016a8000017a40000181c000019e800001a880000
+1b0c00001bd000001c7800010000002a0354002b0068000c0002001000990008000004150216
+00080004b8028040fffbfe03fa1403f92503f83203f79603f60e03f5fe03f4fe03f32503f20e
+03f19603f02503ef8a4105effe03ee9603ed9603ecfa03ebfa03eafe03e93a03e84203e7fe03
+e63203e5e45305e59603e48a4105e45303e3e22f05e3fa03e22f03e1fe03e0fe03df3203de14
+03dd9603dcfe03db1203da7d03d9bb03d8fe03d68a4105d67d03d5d44705d57d03d44703d3d2
+1b05d3fe03d21b03d1fe03d0fe03cffe03cefe03cd9603cccb1e05ccfe03cb1e03ca3203c9fe
+03c6851105c61c03c51603c4fe03c3fe03c2fe03c1fe03c0fe03bffe03befe03bdfe03bcfe03
+bbfe03ba1103b9862505b9fe03b8b7bb05b8fe03b7b65d05b7bb03b78004b6b52505b65d40ff
+03b64004b52503b4fe03b39603b2fe03b1fe03b0fe03affe03ae6403ad0e03acab2505ac6403
+abaa1205ab2503aa1203a98a4105a9fa03a8fe03a7fe03a6fe03a51203a4fe03a3a20e05a332
+03a20e03a16403a08a4105a096039ffe039e9d0c059efe039d0c039c9b19059c64039b9a1005
+9b19039a1003990a0398fe0397960d0597fe03960d03958a410595960394930e05942803930e
+0392fa039190bb0591fe03908f5d0590bb039080048f8e25058f5d038f40048e25038dfe038c
+8b2e058cfe038b2e038a8625058a410389880b05891403880b03878625058764038685110586
+250385110384fe038382110583fe0382110381fe0380fe037ffe0340ff7e7d7d057efe037d7d
+037c64037b5415057b25037afe0379fe03780e03770c03760a0375fe0374fa0373fa0372fa03
+71fa0370fe036ffe036efe036c21036bfe036a1142056a530369fe03687d036711420566fe03
+65fe0364fe0363fe0362fe03613a0360fa035e0c035dfe035bfe035afe0359580a0559fa0358
+0a035716190557320356fe035554150555420354150353011005531803521403514a130551fe
+03500b034ffe034e4d10054efe034d10034cfe034b4a13054bfe034a4910054a1303491d0d05
+491003480d0347fe0346960345960344fe0343022d0543fa0342bb03414b0340fe033ffe033e
+3d12053e14033d3c0f053d12033c3b0d053c40ff0f033b0d033afe0339fe033837140538fa03
+3736100537140336350b05361003350b03341e03330d0332310b0532fe03310b03302f0b0530
+0d032f0b032e2d09052e10032d09032c32032b2a25052b64032a2912052a2503291203282725
+0528410327250326250b05260f03250b0324fe0323fe03220f03210110052112032064031ffa
+031e1d0d051e64031d0d031c1142051cfe031bfa031a42031911420519fe0318640317161905
+17fe031601100516190315fe0314fe0313fe031211420512fe0311022d05114203107d030f64
+030efe030d0c16050dfe030c0110050c16030bfe030a100309fe0308022d0508fe0307140306
+64030401100504fe03401503022d0503fe0302011005022d0301100300fe0301b80164858d01
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b002b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b1d00>
+] def
+/f-0-0 currentdict end definefont pop
+%%EndResource
+%%BeginResource: font DejaVuSans
+11 dict begin
+/FontType 42 def
+/FontName /DejaVuSans def
+/PaintType 0 def
+/FontMatrix [ 1 0 0 1 0 0 ] def
+/FontBBox [ 0 0 0 0 ] def
+/Encoding 256 array def
+0 1 255 { Encoding exch /.notdef put } for
+Encoding 1 /uniFB01 put
+/CharStrings 2 dict dup begin
+/.notdef 0 def
+/uniFB01 1 def
+end readonly def
+/sfnts [
+<0001000000090080000300106376742000691d3900000184000001fe6670676d7134766a0000
+0384000000ab676c7966aa72abf90000009c000000e868656164026638f70000043000000036
+686865610cb806530000046800000024686d747809d700950000048c000000086c6f63610000
+012c000004940000000c6d617870046f0671000004a000000020707265703b07f100000004c0
+0000056800020066fe96046605a400030007001a400c04fb0006fb0108057f0204002fc4d4ec
+310010d4ecd4ec301311211125211121660400fc73031bfce5fe96070ef8f27206290002002f
+0000044a061400150019005240111b46001708160f1404080803160a064c1a10fc3cc432c4fc
+3cc410fe3cec310040120803a90010870e18be16b10e970900bc05012f3ce632eefeee10ee10
+ee3230400bff1ba01b901b801b101b05015d01112311211123112335333534363b0115232206
+1d0101331523044ab9fe07b9b0b0adb3b9b0634d01f9b9b90460fba003d1fc2f03d18f4eb7af
+9950686301b2e900013500b800cb00cb00c100aa009c01a600b800660000007100cb00a002b2
+0085007500b800c301cb0189022d00cb00a600f000d300aa008700cb03aa0400014a003300cb
+000000d9050200f4015400b4009c01390114013907060400044e04b4045204b804e704cd0037
+047304cd04600473013303a2055605a60556053903c5021200c9001f00b801df007300ba03e9
+033303bc0444040e00df03cd03aa00e503aa0404000000cb008f00a4007b00b80014016f007f
+027b0252008f00c705cd009a009a006f00cb00cd019e01d300f000ba018300d5009803040248
+009e01d500c100cb00f600830354027f00000333026600d300c700a400cd008f009a00730400
+05d5010a00fe022b00a400b4009c00000062009c0000001d032d05d505d505d505f0007f007b
+005400a406b80614072301d300b800cb00a601c301ec069300a000d3035c037103db01850423
+04a80448008f0139011401390360008f05d5019a0614072306660179046004600460047b009c
+00000277046001aa00e904600762007b00c5007f027b000000b4025205cd006600bc00660077
+061000cd013b01850389008f007b0000001d00cd074a042f009c009c0000077d006f0000006f
+0335006a006f007b00ae00b2002d0396008f027b00f600830354063705f6008f009c04e10266
+008f018d02f600cd03440029006604ee00730000140000960000b707060504030201002c2010
+b002254964b040515820c859212d2cb002254964b040515820c859212d2c20100720b00050b0
+0d7920b8ffff5058041b0559b0051cb0032508b0042523e120b00050b00d7920b8ffff505804
+1b0559b0051cb0032508e12d2c4b505820b0fd454459212d2cb002254560442d2c4b5358b002
+25b0022545445921212d2c45442d2cb00225b0022549b00525b005254960b0206368208a108a
+233a8a10653a2d00000100000002570a13d8c3465f0f3cf5001f080000000000cef5cb760000
+0000cef5cb76f7d6fcae0d72095500000008000000010000000000010000076dfe1d00000de2
+f7d6fa510d7200010000000000000000000000000000000204cd0066050a002f000000000000
+0044000000e80001000000020354002b0068000c000200100099000800000415021600080004
+b8028040fffbfe03fa1403f92503f83203f79603f60e03f5fe03f4fe03f32503f20e03f19603
+f02503ef8a4105effe03ee9603ed9603ecfa03ebfa03eafe03e93a03e84203e7fe03e63203e5
+e45305e59603e48a4105e45303e3e22f05e3fa03e22f03e1fe03e0fe03df3203de1403dd9603
+dcfe03db1203da7d03d9bb03d8fe03d68a4105d67d03d5d44705d57d03d44703d3d21b05d3fe
+03d21b03d1fe03d0fe03cffe03cefe03cd9603cccb1e05ccfe03cb1e03ca3203c9fe03c68511
+05c61c03c51603c4fe03c3fe03c2fe03c1fe03c0fe03bffe03befe03bdfe03bcfe03bbfe03ba
+1103b9862505b9fe03b8b7bb05b8fe03b7b65d05b7bb03b78004b6b52505b65d40ff03b64004
+b52503b4fe03b39603b2fe03b1fe03b0fe03affe03ae6403ad0e03acab2505ac6403abaa1205
+ab2503aa1203a98a4105a9fa03a8fe03a7fe03a6fe03a51203a4fe03a3a20e05a33203a20e03
+a16403a08a4105a096039ffe039e9d0c059efe039d0c039c9b19059c64039b9a10059b19039a
+1003990a0398fe0397960d0597fe03960d03958a410595960394930e05942803930e0392fa03
+9190bb0591fe03908f5d0590bb039080048f8e25058f5d038f40048e25038dfe038c8b2e058c
+fe038b2e038a8625058a410389880b05891403880b0387862505876403868511058625038511
+0384fe038382110583fe0382110381fe0380fe037ffe0340ff7e7d7d057efe037d7d037c6403
+7b5415057b25037afe0379fe03780e03770c03760a0375fe0374fa0373fa0372fa0371fa0370
+fe036ffe036efe036c21036bfe036a1142056a530369fe03687d036711420566fe0365fe0364
+fe0363fe0362fe03613a0360fa035e0c035dfe035bfe035afe0359580a0559fa03580a035716
+190557320356fe035554150555420354150353011005531803521403514a130551fe03500b03
+4ffe034e4d10054efe034d10034cfe034b4a13054bfe034a4910054a1303491d0d0549100348
+0d0347fe0346960345960344fe0343022d0543fa0342bb03414b0340fe033ffe033e3d12053e
+14033d3c0f053d12033c3b0d053c40ff0f033b0d033afe0339fe033837140538fa0337361005
+37140336350b05361003350b03341e03330d0332310b0532fe03310b03302f0b05300d032f0b
+032e2d09052e10032d09032c32032b2a25052b64032a2912052a250329120328272505284103
+27250326250b05260f03250b0324fe0323fe03220f03210110052112032064031ffa031e1d0d
+051e64031d0d031c1142051cfe031bfa031a42031911420519fe031864031716190517fe0316
+01100516190315fe0314fe0313fe031211420512fe0311022d05114203107d030f64030efe03
+0d0c16050dfe030c0110050c16030bfe030a100309fe0308022d0508fe030714030664030401
+100504fe03401503022d0503fe0302011005022d0301100300fe0301b80164858d012b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b002b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
+2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b1d00>
+] def
+/f-0-1 currentdict end definefont pop
+%%EndResource
+%%EndSetup
+%%Page: 1 1
+%%BeginPageSetup
+%%PageBoundingBox: 0 -1 631 791
+%%EndPageSetup
+q 0 -1 631 792 rectclip q
+Q q
+268.801 790.4 96 -38.398 re W n
+q
+268 790.4 97 -39 re W n
+[ 0.793388 0 0 0.8 268.8 752.000008 ] concat
+/DeviceRGB setcolorspace
+8 dict dup begin
+  /ImageType 1 def
+  /Width 121 def
+  /Height 48 def
+  /Interpolate true def
+  /BitsPerComponent 8 def
+  /Decode [ 0 1 0 1 0 1 ] def
+  /DataS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p:XM$(<TW[u<
+ tHF(cU#S84fF/9"9N8f2ke7Y3E0VfTG]9r:!.gYF3C$H3,X6\a9KKJ@=;*_X:8YT,2$9>^h
+ e&[It<eBlE+RL);G'F4iH+<6:1Du;mR^)Z#5^D]'XEP0RF/(B7UipMYm5/AocgR=k5FQ8N#
+ &!\,5:UV-ioI+9c6_I^&$.4Ee-`L"3 at gQ7niB"`1S7=$YRlT/jP)ue>Y])-8+WuYj]6<-QU
+ jbT']DTmC;A+ApX-YK7Bl%,0:lq.2X-B;OOhg3.-n.,1;,plgBM+km#ES#`0ujG)P=5Bk01
+ fQOQnYE)c8P9uUS.^MYq0F?fdC;Ii?h)]`ko!.KRbJtf8]cOmW\U/-Qm8R>MM0`SiG-N[UD
+ qUoX*7B._4&kD_81O[UU6/>F at P+REKkV?4OF#@QQ6JS[Z;7MQlUdf_X=V:%7Wq=Iso;QbXN
+ g<Y6l6_3m_E-3?hMNjUTMD'B_I@'Nfh(67K$"@Ve>5>e3trs,o^6`^~>
+Q
+0 g
+BT
+22 0 0 22 289.473926 763.771396 Tm
+/f-0-0 1 Tf
+[(Start)]TJ
+ET
+Q q
+177.602 708.002 278.457 -71.371 re W n
+q
+177 708.4 280 -72 re W n
+[ 0.797873 0 0 0.793023 177.6 636.627923 ] concat
+/DeviceRGB setcolorspace
+8 dict dup begin
+  /ImageType 1 def
+  /Width 349 def
+  /Height 90 def
+  /Interpolate true def
+  /BitsPerComponent 8 def
+  /Decode [ 0 1 0 1 0 1 ] def
+  /DataSource currentfile /ASCII85Decode filter /FlateDecode filter def
+  /ImageMatrix [ 1 0 0 -1 0 90 ] def
+end
+image
+Gb"0TGuU"%T#^@ckDgbuA(X,(+bY at PCBuXGEfl$'$R(2-(',"9X!e_WPtT(*[>Lo]["*M2;l
+ Q^gUM.J!?5G);)6K664<Ai!3_mk at 4J'i:^*10rleG7_ at X_,2qjc914bnfahrgQnM%DENf8k
+ R9^qdbGa,bRoHb6l#g=tB.1cKp\l/@7")aJ9-Ng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&"Y$J\ZTr"U]eB-$@:4D&Ar&@%,2hEIr#M%62j+8
+ W](`LU-7V@$k?rRe5Qg(ZG=&?#MJH<8\-lBV`g`O0MgqVaugPZVhCCfk5FMY%d>VIlLg<58
+ )iGHI3!mChlir~>
+Q
+0 g
+BT
+22 0 0 22 295.43584 676.569568 Tm
+/f-0-0 1 Tf
+[(F)71(ind)]TJ
+-3.973633 -1 Td
+[(\\MGL@@@<sc)-3(ript>)]TJ
+ET
+Q q
+243.199 600.798 147.57 -135.715 re W n
+q
+243 601.4 148 -137 re W n
+[ 0.797682 0 0 0.798319 243.2 465.085823 ] concat
+/DeviceRGB setcolorspace
+8 dict dup begin
+  /ImageType 1 def
+  /Width 185 def
+  /Height 170 def
+  /Interpolate true def
+  /BitsPerComponent 8 def
+  /Decode [ 0 1 0 1 0 1 ] def
+  /DataSource currentfile /ASCII85Decode filter /FlateDecode filter def
+  /ImageMatrix [ 1 0 0 -1 0 170 ] def
+end
+image
+Gb"0WLK>0kqZlWji0Qio%`6*"0"W[J08kVl.%mdYks\F+'EJSB:de8,9sMWo22N6`,1V8K:b
+ 3HIBVJA>p_l5/<:p1Xm+i[oqhcmT0[H/NPES at SGb*0-kIKJsmgK2,O[U$gA<B:r=_*X`eki
+ DCT0<_VY<\E=egFdPq!d8 at qtE6:4n,ZEmlu:!#lgK\6P_08!==&Ai^J'8pT'W6+$Y5Pr;#q
+ cY?o&[^4#nPh7IkBbWu2sA.<Lo&Ha5&oB&b;8&tT*p[A+SfB#YlIVj!fGNMTj`JaKYhLuak
+ "Mqkq6R0oBs2nj]5f)snNYl&mS\P."l_Ot*[Vsj+Dt!+"gG^ck0R$H,jn;D5XC#1Xp.XMSX
+ )5WOqC<P&hRn;3C)Ma0Sc&6>J+rBeD/6b(lGW3]\[,nF-7)&M\2dYenoAr^@tb-`-:WbdT,
+ Le=ATROlUTG=crqknVpT%Bahn:8B%%fj]rjm0_q*NQE+*XQX,R!pgqi5f=?rCjc$uO2skQV
+ q^6Obib;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M>"MPNr";XXbgYYmNrjT`p+%gd#"'D/No%$m>#RNg\L;3ea[#bqcK?_>#TfNqVDW$D
+ n:[aRJI%BFYB3[3)arqdnqaI;3$l<G,%R];Dd12Bjn^sA/ID893_kk>=*_W\1f at J]&":$_0
+ D7HLSi=n_?!'LaUl(S.3i\"O0frk_K*#PNKKO=NEP\njK0 at N81-d=7*^Y=<Zdg#RDbZSiFm
+ +>:XulnX_qpMiFo$$B;fEP0[`RCKSAj'(-:?Xo[RbPFiW,i(Z]++D-Y[p=&"FS_kDm+mZ$O
+ Lol\g>[VUa+iVKc!bk3hf[7ATN^,+C<c:$u&;lt!%>2NF!l+!sr4rh22MrsE\](u'%>EAc/
+ 83.V8Ks\L<oB+`4V`/O#5MpSF^e];5PGZ<P"T")s_kQAK1+?gi>)q0GA"9V`fljp41Fc!tm
+ +]/Dm[`*.*^B(Aor=pfLNG:F$;I8P^3pCXqqXL*>eSp=k"J.apI3%O$5UmU'f(&$H:gNLbg
+ [NPnXJ.64`oWFRStU%huET<P:(<'5u%X\IfW^N=%E_3oao?*(GG4Up#hsVJ%sBSq;At/CJG
+ kMg:VFONboT$c8M4Th::'Ko]]<L1Cslh[g)\Q-`b#J'<`O/GOOBS0[H>"p%\(;5O[BQq!d7
+ ;7uo\P4F$\mATr>W3R],Z'`nIl5SDEPPQUehfZ_,c#Bht8#>:@RTna"^BZpL/_.TEj40lpO
+ M_)0T,)\"Xa<HNnZMM!.+/n.L,Q~>
+Q
+0 g
+BT
+22 0 0 22 297.143848 542.838269 Tm
+/f-0-0 1 Tf
+(Is it)Tj
+-1.246094 -1 Td
+(de)Tj
+/f-0-1 1 Tf
+<01>Tj
+/f-0-0 1 Tf
+[(ned?)]TJ
+ET
+Q q
+36 428.798 206.23 -67.715 re W n
+q
+36 429.4 207 -69 re W n
+[ 0.799336 0 0 0.796639 36 361.085705 ] concat
+/DeviceRGB setcolorspace
+8 dict dup begin
+  /ImageType 1 def
+  /Width 258 def
+  /Height 85 def
+  /Interp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426.4 252 -63 re W n
+[ 0.798306 0 0 0.796111 365.6 364.303344 ] concat
+/DeviceRGB setcolorspace
+8 dict dup begin
+  /ImageType 1 def
+  /Width 314 def
+  /Height 78 def
+  /Interpolate true def
+  /BitsPerComponent 8 def
+  /Decode [ 0 1 0 1 0 1 ] def
+  /DataSource currentfile /ASCII85Decode filter /FlateDecode filter def
+  /ImageMatrix [ 1 0 0 -1 0 78 ] def
+end
+image
+Gb"0Tq,>adrkS&RTSjQ+_%f9B8IR<i7nA/LT/hE5_PK'j`e[fL>/6%r.4S4-Bgkl/.hiMoBL
+ P3T7B,kNWoDF.eT(C?:)A#Oj#C>"]%tuP$#=2Jqq]rVD9XH#jSbLepldN0351u0^#'4us8D
+ QLO$A*nrV,2tpYG&sk`nf-%X3$%2K#^)^UBrVCgN3-0JD`46i&kK^!Vor:S27GWq>Re,X\?
+ DIWKgX')('Y-2qNpWoT\WPWXR>=cdJSjlI6m^/M\GY\N"Z`k!c!g\21b]Qio%]dHUI]Qiu+
+ ji`u=R9pQ]Y=`qPC?k?La'[Z6FnkI"RLO%*MAIqfb:>Fd<gFN'.5c#n0DV8MC%]W3D,mVkb
+ V!a9rE`W(^*uR]e<mWt>GI%=`@Ae]JT$@#UP`*@$KfmhDX'E+kk<*=`5Dd^D1pD"P:G:d.+
+ NtI>0>$TRI]oL^UI`pAOXN!F_t?`3uU$Ghc\FY<84gep2JL3m\]@gB"tcLchX0drCo._nit
+ f6?"#VqbiK1[kjdX&pI^blgt.F8S_:5J%MjI4g?HqU5JQscf-o1DUASJAiPm`*G19L!eo*R
+ Q]5E="Dph*.8<P4 at ZP/X;,V7A3/@IUG>%sHAWPYpl at S.-:AHbZ!$WFnM<2%uB!LZdcH&7F&
+ 3-gNF3^tIeU,^7 at 6?MQVIcSkh5Q'L)e#-51&'ra_cG4)=p9.d!I^E"eZ*Ih?h8YcJeOFCtO
+ Zp<me&oLeO,#pTH0N]DCS*J6H)18u;%0dDB[/8TmJ3KOER4LCmq&Q,$=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q
+352 154.4 278.457 -71.371 re W n
+q
+352 154.4 279 -72 re W n
+[ 0.797873 0 0 0.793023 352 83.027923 ] concat
+/DeviceRGB setcolorspace
+8 dict dup begin
+  /ImageType 1 def
+  /Width 349 def
+  /Height 90 def
+  /Interpolate true def
+  /BitsPerComponent 8 def
+  /Decode [ 0 1 0 1 0 1 ] def
+  /DataSource currentfile /ASCII85Decode filter /FlateDecode filter def
+  /ImageMatrix [ 1 0 0 -1 0 90 ] def
+end
+image
+Gb"0WHVi1(^;ob.cYf(B'(-or,_Q.(KFgJ+J:Jnu,_U+KJKc9^+H)RYFg1OF[8[k$+sJL='Y
+ Js at B9`fP?E1.#Lg,r#0Qo"&AJhMXD67q$Nq5D08D!C5FUq[G(Wc>00E6,&'0gE--TD4D>Bl
+ `&HhR*rdmoH?rU@]8[r1$5HM)#S=4b9SQJK1=lftoqhHXAa;-$h&=[RXTgpjJfN'^`-DFE!
+ S/M0Dd='\j->?st#;cQh(=]np,Zald'r^^g?GB`ehCY*I]^4#bDh8bQu%hB27)8;(f^RaP5
+ '*\[H^]!l\[\H at 7r'+KW;;qF;(X/;4SsD2j0fE at 9d41Ed)Pon<To5H=12URc4/Ri?ZO#M5n
+ (Kl')IpWO-EsGjPG4t.`^EPK.]:5NU1:T.BrQpm\_6:M0E8\fY5Q:qRl>9B\T>fmb4'6.+\
+ h1dlT9=Y*!sKFq1$]89V7Z8]m*l"W[/ag>Pd=Tjbl(!/1N!t'Wj%faJ9LnoPZl79CY('G0#
+ J?0:nMq at Yb<`(NMNVZ"RmbDV^2H/UR4u\T27pBS_nhZq%-s@*A[t0r,-:ekf7BS3&fR6!hj
+ b`?1DI>.1tPD124mT3%=8<GcF)ZE\CBadt(1qmMbHeJ,bjj-EK]_X?]3 at q"!O[:>o(C<]lU
+ ]^h8kYd7g3=K!l[2&>I8XW1\kPc^l:/ui3lSBQbILeMMq`Hj;?ih]'U_1>9A\jGDCQSWEtN
+ ihC):<j8DSii]/$`5aDGjsYN`J_^ST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/A1Lf,=.Ba9s5(#aGUMfM"3 at g7;ZsEN
+ nHV^F+!/,(qKd?R)!mMh)Fc*AfMniQ.&#TX^"?A6`YS?ET<!DV814- at C7+'"&f>r_"##hl/
+ GtTrG#"mIH=9V^=n`j<S2DJX_^UP8DtNki!`ZE"T>qrHKq#U";Vc6fpa*7&E?V7:o!.V,GC
+ `OqYsmaQU_;"pP9*s'<G\Z2cPBiVrfQ]tM,8SXiIa%2C2./!^ppS!u3\7XEYXeCi;L1T)NC
+ K\dO`O`<uLd`JT3\B)V^2)LE*OjT<UOTCogp#3m1<!Lh7%-6'ff at SX'drYNTfoD)Vm3dp:S
+ 2f)Cpb5%uG9Ts@%]\P7)&G:VOJ.fIOjTTb%VF5odpm](UfX?qNupS509m61>]p<@T##u/rk
+ :RLcl3oDq"5f:,3'j\,=?g,89ha at pg::LqLA~>
+Q
+0 g
+BT
+22 0 0 22 442.893213 123.332434 Tm
+/f-0-0 1 Tf
+[(Unde)]TJ
+/f-0-1 1 Tf
+[<01>]TJ
+/f-0-0 1 Tf
+[(n)-3(e)]TJ
+-2.75 -1 Td
+[(\\MGL@@@<sc)-3(ript>)]TJ
+ET
+Q q
+0 154.4 278.457 -71.371 re W n
+q
+0 154.4 279 -72 re W n
+[ 0.797873 0 0 0.793023 0 83.027923 ] concat
+/DeviceRGB setcolorspace
+8 dict dup begin
+  /ImageType 1 def
+  /Width 349 def
+  /Height 90 def
+  /Interpolate true def
+  /BitsPerComponent 8 def
+  /Decode [ 0 1 0 1 0 1 ] def
+  /DataSource currentfile /ASCII85Decode filter /FlateDecode filter def
+  /ImageMatrix [ 1 0 0 -1 0 90 ] def
+end
+image
+Gb"0VHVfoM^;ob.c^l11+iFAk&OHbb&?[/Z&-NV:84!B6J06BE,(fR#U/gNf=qlm8&J,YA'j
+ S]ce4R-+Gf*1NX]g&ka.phO/E=!XeRQ34O39N?rIqVLmV\qs7A#A)IHL4;NtX`rJ%snI0F#
+ k0B@!/5IJVcDhgP+ at 2n*\\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>Tj
+/f-0-0 1 Tf
+[(ne)]TJ
+-3.366211 -1 Td
+[(\\MGL@@@<sc)-3(ript>)]TJ
+ET
+Q q
+268.801 38.4 96 -38.398 re W n
+q
+268 38.4 97 -39 re W n
+[ 0.793388 0 0 0.799999 268.8 0.0000473848 ] concat
+/DeviceRGB setcolorspace
+8 dict dup begin
+  /ImageType 1 def
+  /Width 121 def
+  /Height 48 def
+  /Interpolate true def
+  /BitsPerComponent 8 def
+  /Decode [ 0 1 0 1 0 1 ] def
+  /DataSource currentfile /ASCII85Decode filter /FlateDecode filter def
+  /ImageMatrix [ 1 0 0 -1 0 48 ] def
+end
+image
+Gb"/kM-!XM[`AE!(7?q5&2KH&O?b/45_(O<&-7nbN5-)pMMN$9d8E5\MJ*a0%`fb]'GOE&W!
+ M,BeQU#I3k[^aT@`7F45F4)gpVFAI<%$<MTT[P?a6'-(Q68T8bW.RID1'sht\8mT(;aBVk:
+ ^'rqin6rqc'=]B at J0g"kJlZ>sYFIeK:71J3PqX-P;=?*eWID0]SmJ3bL2\[-BEL/u7bEH__
+ PEXad*UOjHQbn!bC,LiGi5?XMkI"L!]+*Wp8!$*<?$heNI&A.-PCc&8EmOb7!V&Z76*bOo%
+ O#6WWb9T2NCq+K$r4-%$efGhmoZ?dlp[6kLJ,__'GoFP>]kj3Wgpln2dA(OtS'&m2EmrJR(
+ ?O)4Q`R<kBPj]M/";k:Wh&.QN:l_2*hpi81X8dg]IY_<IUUOUnq+<=ZHe29SSOPYCL0$J^1
+ RDrqVPcW+oa/^QWiZHhd4"'UV=BPH"kP$=f!q7M_jA`&jiK7<7*c$E0WE,>9'XY-(4[0,=@
+ E9V3j^A;@$n^,h1=Cm+o)0_O33hDVZLNs$kolkHDVrlIrX]!sA"nXK7qUSPbW<[:8[C`nH<
+ YF`kl#k9^CKV?Uh9?C?)3A_iKWF[nN_:3LP<[sQ<o^?1?%/XP=.ql%7Mm;d^Rec,7m#I[>T
+ ]4uJIoFP:sLXBs\*^d_.3bfJW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:7"W[go*(uV9\b-OsXI,Pjd at LIQ$JJmNk\,k7
+ h)*7D'ZomP$#`jGdG[GaKGs;S&7H[u%L.W\@=T1A#)a]q+L/,i*r?DrB+^-EB9G'rL:;*Y*
+ rgjHO/%[VKbk$;&W/fupaT>m294CjeS,/rS=\k3cdB&gikg"=@H:IYG]-">lD&S5;7nb5hO
+ :ALD^N>$F;Wh'k:m)J"N/'K0JnHA%2],6j64H/VJg[5*MUp'KSTfj+JQK_Q8:W7mJHYHhn"
+ (H0+AVi>YBCI7cr!i8gsD#hOY"CM_1b=2XmCaB.O]pjR`R$4]tA3Pg%X_/QubPQCUC3IKH"
+ h_^qk+kVbJ_+^cE0%L.W\@=VOA,?@&?CGNM#lk';n5TkjdiK0RZircjQ/eP`QYY&AMI<Akf
+ 3BRFW:Rq'rF@&d-V=`b.C>9g$>^Kh\,G'4GZ;@T1]/!jD$#^>Z,sB9[0G"WtK>Pu7ed2L'j
+ 4oWFA,$<1;=*T5_E(4O5keJBgLudCJff7%i^IZ%)ckPNVPbA\]MPKpHZ;G?8\p:@WhONR_R
+ c`. at B8XcjUb2`\2id.*4/uJ$#Vf)X6;7r[]>&#`C\6q<jIS87)jNj"-cVP+Cj=H5!hLKf[n
+ dtSbkAFrrf-W+,faQM;dF&Rl;s*Z7mLXhI!&I&?nPRHS3328=P:q?-.*;$L$RNWR18#3]EM
+ !9D at O&-]%T.0cjse32!`!+[bG4d-tbfg(De/5dfXWlpPXpKoh;1@`TBGL5ulW`V:NP,[^QV
+ R><1P~>
+Q
+0 g
+BT
+22 0 0 22 295.822559 11.771399 Tm
+/f-0-0 1 Tf
+[(End)]TJ
+ET
+Q q
+243.199 325.599 147.57 -135.715 re W n
+q
+243 326.4 148 -137 re W n
+[ 0.797682 0 0 0.798319 243.2 189.885823 ] concat
+/DeviceRGB setcolorspace
+8 dict dup begin
+  /ImageType 1 def
+  /Width 185 def
+  /Height 170 def
+  /Interpolate true def
+  /BitsPerComponent 8 def
+  /Decode [ 0 1 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G4a1W8'delLVF'<_>]\#Is.iH]0;nl!PEdR%d@;k,PC]ndp"bLG'A-pIf/uWrVNd*^OH(R/
+ N)"N$7cMn_uN at o1JghB:JYnI0-#&i^OK%%YZ-Gnp2Jt,2Wb"ri$7Q[N[h'-U5CG#W1o/!Wi
+ 2YLWaW%0#A*92"o~>
+Q
+0 g
+BT
+22 0 0 22 298.411426 279.754358 Tm
+/f-0-0 1 Tf
+[(Ar)21(e)]TJ
+-0.272461 -1 Td
+[(they)]TJ
+-0.536133 -1 Td
+[(equal?)]TJ
+ET
+Q q
+0 g
+2.4 w
+0 J
+0 j
+[] 0.0 d
+4 M q 1 0 0 -1 0 790.399963 cm
+316.762 33.48 m 316.762 86.008 l S Q
+q 1 0 0 -1 0 790.399963 cm
+316.762 147.812 m 316.762 199.551 l S Q
+q 1 0 0 -1 0 790.399963 cm
+256.559 257.719 m 139.379 257.719 l 139.379 365.215 l S Q
+q 1 0 0 -1 0 790.399963 cm
+378.305 257.715 m 495.484 257.715 l 495.484 365.211 l S Q
+q 1 0 0 -1 0 790.399963 cm
+225.398 398.059 m 316.828 397.484 l 316.828 474.172 l S Q
+q 1 0 0 -1 0 790.399963 cm
+377.992 533.152 m 495.168 533.152 l 495.168 640.648 l S Q
+q 1 0 0 -1 0 790.399963 cm
+255.668 532.582 m 138.488 532.582 l 138.488 640.078 l S Q
+q 1 0 0 -1 0 790.399963 cm
+255.688 674.629 m 373.973 674.629 l S Q
+q 1 0 0 -1 0 790.399963 cm
+316.828 674.629 m 316.828 752.344 l S Q
+q 1 0 0 -1 0 790.399963 cm
+495.113 422.059 m 495.113 451.77 l 332.828 451.199 l 332.828 451.199 317.516
+ 429.449 301.457 451.18 c 138.828 451.484 l 138.543 532.629 l S Q
+1 0.890196 0.815686 rg
+187.742 549.427 m 212.887 549.427 l 221.75 549.427 228.887 542.291 228.887
+ 533.427 c 228.887 524.564 221.75 517.427 212.887 517.427 c 187.742 517.427
+ l 178.879 517.427 171.742 524.564 171.742 533.427 c 171.742 542.291 178.879
+ 549.427 187.742 549.427 c h
+187.742 549.427 m f
+0 g
+BT
+22 0 0 22 182.028894 526.571399 Tm
+/f-0-0 1 Tf
+(Y)Tj
+ET
+0.8 w
+q 1 0 0 -1 0 790.399963 cm
+181.98 247.797 m 184.309 247.797 l 188.762 254.391 l 193.184 247.797 l 
+195.512 247.797 l 189.84 256.188 l 189.84 263.828 l 187.652 263.828 l 187.652
+ 256.188 l h
+181.98 247.797 m S Q
+BT
+22 0 0 22 192.556238 526.571399 Tm
+/f-0-0 1 Tf
+(e)Tj
+ET
+q 1 0 0 -1 0 790.399963 cm
+204.914 257.312 m 204.914 258.281 l 195.836 258.281 l 195.918 259.648 196.324
+ 260.691 197.055 261.406 c 197.793 262.117 198.82 262.469 200.133 262.469
+ c 200.891 262.469 201.625 262.375 202.336 262.188 c 203.043 262.004 203.75
+ 261.719 204.461 261.344 c 204.461 263.219 l 203.75 263.523 203.02 263.754
+ 202.273 263.906 c 201.531 264.059 200.777 264.141 200.008 264.141 c 198.09
+ 264.141 196.566 263.586 195.445 262.469 c 194.328 261.348 193.773 259.836
+ 193.773 257.938 c 193.773 255.961 194.305 254.391 195.367 253.234 c 196.426
+ 252.082 197.859 251.5 199.664 251.5 c 201.285 251.5 202.57 252.023 203.508
+ 253.062 c 204.441 254.105 204.914 255.523 204.914 257.312 c h
+202.945 256.734 m 202.922 255.652 202.613 254.793 202.023 254.156 c 201.438
+ 253.512 200.66 253.188 199.695 253.188 c 198.59 253.188 197.703 253.504
+ 197.039 254.125 c 196.371 254.742 195.988 255.617 195.898 256.75 c h
+202.945 256.734 m S Q
+BT
+22 0 0 22 206.091394 526.571399 Tm
+/f-0-0 1 Tf
+(s)Tj
+ET
+q 1 0 0 -1 0 790.399963 cm
+215.84 252.156 m 215.84 254.016 l 215.277 253.738 214.691 253.523 214.09
+ 253.375 c 213.484 253.23 212.863 253.156 212.23 253.156 c 211.238 253.156
+ 210.5 253.309 210.012 253.609 c 209.52 253.914 209.277 254.367 209.277 
+254.969 c 209.277 255.43 209.453 255.789 209.809 256.047 c 210.16 256.309
+ 210.863 256.559 211.918 256.797 c 212.605 256.938 l 214 257.242 214.996
+ 257.668 215.59 258.219 c 216.18 258.762 216.48 259.527 216.48 260.516 c
+ 216.48 261.633 216.035 262.52 215.152 263.172 c 214.266 263.82 213.051 
+264.141 211.512 264.141 c 210.863 264.141 210.191 264.074 209.496 263.953
+ c 208.797 263.828 208.055 263.641 207.277 263.391 c 207.277 261.344 l 208.004
+ 261.73 208.723 262.02 209.434 262.203 c 210.148 262.391 210.855 262.484
+ 211.543 262.484 c 212.477 262.484 213.199 262.328 213.699 262.016 c 214.195
+ 261.695 214.449 261.242 214.449 260.656 c 214.449 260.129 214.266 259.719
+ 213.902 259.438 c 213.535 259.148 212.742 258.867 211.527 258.594 c 210.84
+ 258.438 l 209.609 258.18 208.723 257.781 208.184 257.25 c 207.641 256.723
+ 207.371 255.984 207.371 255.047 c 207.371 253.926 207.77 253.055 208.574
+ 252.438 c 209.375 251.816 210.512 251.5 211.98 251.5 c 212.719 251.5 213.406
+ 251.559 214.043 251.672 c 214.688 251.777 215.285 251.941 215.84 252.156
+ c h
+215.84 252.156 m S Q
+1 0.890196 0.815686 rg
+186.602 274.685 m 211.742 274.685 l 220.605 274.685 227.742 267.548 227.742
+ 258.685 c 227.742 249.822 220.605 242.685 211.742 242.685 c 186.602 242.685
+ l 177.734 242.685 170.602 249.822 170.602 258.685 c 170.602 267.548 177.734
+ 274.685 186.602 274.685 c h
+186.602 274.685 m f
+0 g
+BT
+22 0 0 22 180.886035 251.828577 Tm
+/f-0-0 1 Tf
+(Y)Tj
+ET
+q 1 0 0 -1 0 790.399963 cm
+180.84 522.539 m 183.168 522.539 l 187.621 529.133 l 192.043 522.539 l 
+194.371 522.539 l 188.699 530.93 l 188.699 538.57 l 186.512 538.57 l 186.512
+ 530.93 l h
+180.84 522.539 m S Q
+BT
+22 0 0 22 191.413379 251.828577 Tm
+/f-0-0 1 Tf
+(e)Tj
+ET
+q 1 0 0 -1 0 790.399963 cm
+203.773 532.055 m 203.773 533.023 l 194.695 533.023 l 194.777 534.391 195.184
+ 535.434 195.914 536.148 c 196.652 536.859 197.68 537.211 198.992 537.211
+ c 199.75 537.211 200.484 537.117 201.195 536.93 c 201.902 536.746 202.609
+ 536.461 203.32 536.086 c 203.32 537.961 l 202.609 538.266 201.879 538.496
+ 201.133 538.648 c 200.391 538.801 199.637 538.883 198.867 538.883 c 196.949
+ 538.883 195.426 538.328 194.305 537.211 c 193.188 536.09 192.633 534.578
+ 192.633 532.68 c 192.633 530.703 193.164 529.133 194.227 527.977 c 195.285
+ 526.824 196.719 526.242 198.523 526.242 c 200.145 526.242 201.43 526.766
+ 202.367 527.805 c 203.301 528.848 203.773 530.266 203.773 532.055 c h
+201.805 531.477 m 201.781 530.395 201.473 529.535 200.883 528.898 c 200.297
+ 528.254 199.52 527.93 198.555 527.93 c 197.449 527.93 196.562 528.246 195.898
+ 528.867 c 195.23 529.484 194.848 530.359 194.758 531.492 c h
+201.805 531.477 m S Q
+BT
+22 0 0 22 204.948535 251.828577 Tm
+/f-0-0 1 Tf
+(s)Tj
+ET
+q 1 0 0 -1 0 790.399963 cm
+214.699 526.898 m 214.699 528.758 l 214.137 528.48 213.551 528.266 212.949
+ 528.117 c 212.344 527.973 211.723 527.898 211.09 527.898 c 210.098 527.898
+ 209.359 528.051 208.871 528.352 c 208.379 528.656 208.137 529.109 208.137
+ 529.711 c 208.137 530.172 208.312 530.531 208.668 530.789 c 209.02 531.051
+ 209.723 531.301 210.777 531.539 c 211.465 531.68 l 212.859 531.984 213.855
+ 532.41 214.449 532.961 c 215.039 533.504 215.34 534.27 215.34 535.258 c
+ 215.34 536.375 214.895 537.262 214.012 537.914 c 213.125 538.562 211.91
+ 538.883 210.371 538.883 c 209.723 538.883 209.051 538.816 208.355 538.695
+ c 207.656 538.57 206.914 538.383 206.137 538.133 c 206.137 536.086 l 206.863
+ 536.473 207.582 536.762 208.293 536.945 c 209.008 537.133 209.715 537.227
+ 210.402 537.227 c 211.336 537.227 212.059 537.07 212.559 536.758 c 213.055
+ 536.438 213.309 535.984 213.309 535.398 c 213.309 534.871 213.125 534.461
+ 212.762 534.18 c 212.395 533.891 211.602 533.609 210.387 533.336 c 209.699
+ 533.18 l 208.469 532.922 207.582 532.523 207.043 531.992 c 206.5 531.465
+ 206.23 530.727 206.23 529.789 c 206.23 528.668 206.629 527.797 207.434 
+527.18 c 208.234 526.559 209.371 526.242 210.84 526.242 c 211.578 526.242
+ 212.266 526.301 212.902 526.414 c 213.547 526.52 214.145 526.684 214.699
+ 526.898 c h
+214.699 526.898 m S Q
+1 0.890196 0.815686 rg
+422.027 275.142 m 447.172 275.142 l 456.035 275.142 463.172 268.005 463.172
+ 259.142 c 463.172 250.279 456.035 243.142 447.172 243.142 c 422.027 243.142
+ l 413.164 243.142 406.027 250.279 406.027 259.142 c 406.027 268.005 413.164
+ 275.142 422.027 275.142 c h
+422.027 275.142 m f
+0 g
+BT
+22 0 0 22 419.743164 251.142834 Tm
+/f-0-0 1 Tf
+(N)Tj
+ET
+q 1 0 0 -1 0 790.399963 cm
+421.898 523.227 m 424.82 523.227 l 431.93 536.633 l 431.93 523.227 l 434.039
+ 523.227 l 434.039 539.258 l 431.117 539.258 l 424.008 525.836 l 424.008
+ 539.258 l 421.898 539.258 l h
+421.898 523.227 m S Q
+BT
+22 0 0 22 436.200195 251.142834 Tm
+/f-0-0 1 Tf
+(o)Tj
+ET
+q 1 0 0 -1 0 790.399963 cm
+442.934 528.617 m 441.871 528.617 441.031 529.031 440.418 529.852 c 439.801
+ 530.676 439.496 531.812 439.496 533.258 c 439.496 534.695 439.801 535.832
+ 440.418 536.664 c 441.031 537.488 441.871 537.898 442.934 537.898 c 443.984
+ 537.898 444.816 537.484 445.434 536.648 c 446.047 535.816 446.355 534.688
+ 446.355 533.258 c 446.355 531.832 446.047 530.703 445.434 529.867 c 444.816
+ 529.035 443.984 528.617 442.934 528.617 c h
+442.934 526.93 m 444.648 526.93 446 527.496 446.98 528.617 c 447.957 529.734
+ 448.449 531.281 448.449 533.258 c 448.449 535.227 447.957 536.777 446.98
+ 537.898 c 446 539.016 444.648 539.57 442.934 539.57 c 441.203 539.57 439.848
+ 539.016 438.871 537.898 c 437.902 536.777 437.418 535.227 437.418 533.258
+ c 437.418 531.281 437.902 529.734 438.871 528.617 c 439.848 527.496 441.203
+ 526.93 442.934 526.93 c h
+442.934 526.93 m S Q
+1 0.890196 0.815686 rg
+420.887 549.427 m 446.027 549.427 l 454.895 549.427 462.027 542.294 462.027
+ 533.427 c 462.027 524.564 454.895 517.427 446.027 517.427 c 420.887 517.427
+ l 412.023 517.427 404.887 524.564 404.887 533.427 c 404.887 542.294 412.023
+ 549.427 420.887 549.427 c h
+420.887 549.427 m f
+0 g
+BT
+22 0 0 22 418.600293 525.428577 Tm
+/f-0-0 1 Tf
+(N)Tj
+ET
+q 1 0 0 -1 0 790.399963 cm
+420.758 248.941 m 423.68 248.941 l 430.789 262.348 l 430.789 248.941 l 
+432.898 248.941 l 432.898 264.973 l 429.977 264.973 l 422.867 251.551 l 
+422.867 264.973 l 420.758 264.973 l h
+420.758 248.941 m S Q
+BT
+22 0 0 22 435.057324 525.428577 Tm
+/f-0-0 1 Tf
+(o)Tj
+ET
+q 1 0 0 -1 0 790.399963 cm
+441.793 254.332 m 440.73 254.332 439.891 254.746 439.277 255.566 c 438.66
+ 256.391 438.355 257.527 438.355 258.973 c 438.355 260.41 438.66 261.547
+ 439.277 262.379 c 439.891 263.203 440.73 263.613 441.793 263.613 c 442.844
+ 263.613 443.676 263.199 444.293 262.363 c 444.906 261.531 445.215 260.402
+ 445.215 258.973 c 445.215 257.547 444.906 256.418 444.293 255.582 c 443.676
+ 254.75 442.844 254.332 441.793 254.332 c h
+441.793 252.645 m 443.508 252.645 444.859 253.211 445.84 254.332 c 446.816
+ 255.449 447.309 256.996 447.309 258.973 c 447.309 260.941 446.816 262.492
+ 445.84 263.613 c 444.859 264.73 443.508 265.285 441.793 265.285 c 440.062
+ 265.285 438.707 264.73 437.73 263.613 c 436.762 262.492 436.277 260.941
+ 436.277 258.973 c 436.277 256.996 436.762 255.449 437.73 254.332 c 438.707
+ 253.211 440.062 252.645 441.793 252.645 c h
+441.793 252.645 m S Q
+Q Q
+showpage
+%%Trailer
+end restore
+%%EOF
diff --git a/mgltex/Recompilation_decision.pdf b/mgltex/Recompilation_decision.pdf
new file mode 100644
index 0000000..cff8a13
Binary files /dev/null and b/mgltex/Recompilation_decision.pdf differ
diff --git a/mgltex/Recompilation_decision.svg b/mgltex/Recompilation_decision.svg
new file mode 100644
index 0000000..deabd7d
--- /dev/null
+++ b/mgltex/Recompilation_decision.svg
@@ -0,0 +1,1560 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:version="0.91 r"
+   version="1.1"
+   id="svg2"
+   viewBox="0 0 788.07224 987.99994"
+   height="278.83554mm"
+   width="222.4115mm"
+   sodipodi:docname="Recompilation_decision.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="marker5662"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5664"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6,-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <inkscape:path-effect
+       effect="bend_path"
+       id="path-effect4543"
+       is_visible="true"
+       bendpath="m 118.00024,456.39849 222,0"
+       prop_scale="1"
+       scale_y_rel="false"
+       vertical="false" />
+    <inkscape:path-effect
+       effect="sketch"
+       id="path-effect4541"
+       is_visible="true"
+       nbiter_approxstrokes="5"
+       strokelength="100"
+       strokelength_rdm="0.3;1"
+       strokeoverlap="0.3"
+       strokeoverlap_rdm="0.3;1"
+       ends_tolerance="0.1;1"
+       parallel_offset="5;1"
+       tremble_size="5;1"
+       tremble_frequency="1"
+       nbtangents="5"
+       tgt_places_rdmness="1;1"
+       tgtscale="10"
+       tgtlength="100"
+       tgtlength_rdm="0.3;1" />
+    <inkscape:path-effect
+       effect="envelope"
+       id="path-effect4539"
+       is_visible="true"
+       yy="true"
+       xx="true"
+       bendpath1="m 225.41095,441.11923 114.58929,0"
+       bendpath2="m 340.00024,441.11923 0,101.24298"
+       bendpath3="m 225.41095,542.36221 114.58929,0"
+       bendpath4="m 225.41095,441.11923 0,101.24298" />
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="-6.0542683 : 531.67714 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="718.04023 : 477.85825 : 1"
+       inkscape:persp3d-origin="345.99297 : 302.46455 : 1"
+       id="perspective8810" />
+    <marker
+       inkscape:stockid="TriangleOutS"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="TriangleOutS"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path4367"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="scale(0.2,0.2)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="StopS"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="StopS"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path4394"
+         d="M 0,5.65 0,-5.65"
+         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="scale(0.2,0.2)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="marker7593"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path7595"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.8,0,0,0.8,10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="marker7373"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path7375"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.8,0,0,0.8,10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="marker7159"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path7161"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.8,0,0,0.8,10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="marker6951"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path6953"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.8,0,0,0.8,10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="marker6743"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path6745"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.8,0,0,0.8,10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="marker6541"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path6543"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.8,0,0,0.8,10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="marker6167"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path6169"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.8,0,0,0.8,10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:isstock="true"
+       style="overflow:visible"
+       id="marker6007"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="Arrow2Mend">
+      <path
+         transform="scale(-0.6,-0.6)"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         id="path6009"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lstart"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path4219"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.8,0,0,0.8,10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:isstock="true"
+       style="overflow:visible"
+       id="marker5593"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="Arrow2Mend">
+      <path
+         transform="scale(-0.6,-0.6)"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         id="path5595"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:isstock="true"
+       style="overflow:visible"
+       id="marker5451"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="Arrow2Mend">
+      <path
+         transform="scale(-0.6,-0.6)"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         id="path5453"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:isstock="true"
+       style="overflow:visible"
+       id="marker5315"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="Arrow2Mend">
+      <path
+         transform="scale(-0.6,-0.6)"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         id="path5317"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:isstock="true"
+       style="overflow:visible"
+       id="marker5197"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="Arrow2Mend">
+      <path
+         transform="scale(-0.6,-0.6)"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         id="path5199"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Sstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Sstart"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path4249"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="matrix(0.3,0,0,0.3,-0.69,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Send"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Send"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path4252"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="matrix(-0.3,0,0,-0.3,0.69,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="marker4979"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path4981"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6,-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="TriangleOutL"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="TriangleOutL"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path4361"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="scale(0.8,0.8)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Lend"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path4240"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Lstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Lstart"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path4237"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="matrix(1.1,0,0,1.1,1.1,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path4222"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mend"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path13789"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(-0.4,0,0,-0.4,-4,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <symbol
+       id="Terminal">
+      <title
+         id="title7859">Terminal/Interrupt</title>
+      <desc
+         id="desc7861">A terminal point in a flowchart: start, stop, halt, etc.</desc>
+      <path
+         d="m 35,95 a 20,20 0 0 1 0,-40 l 80,0 a 20,20 0 0 1 0,40 z"
+         style="stroke-width:2"
+         id="path7863"
+         inkscape:connector-curvature="0" />
+    </symbol>
+    <symbol
+       id="AuxillaryOp">
+      <title
+         id="title7838">Auxiliary Operation</title>
+      <desc
+         id="desc7840">Offline operation.</desc>
+      <rect
+         x="35"
+         y="35"
+         width="80"
+         height="80"
+         style="stroke-width:2"
+         id="rect7842" />
+    </symbol>
+    <symbol
+       id="Decision">
+      <title
+         id="title7815">Decision</title>
+      <desc
+         id="desc7817">A decision or switching type operation.</desc>
+      <path
+         d="M 15,75 75,35 135,75 75,115 Z"
+         style="stroke-width:2"
+         id="path7819"
+         inkscape:connector-curvature="0" />
+    </symbol>
+    <symbol
+       id="InputOutput">
+      <title
+         id="title7780">Input/Output</title>
+      <desc
+         id="desc7782">General input/output functions.</desc>
+      <path
+         d="m 35,35 100,0 -20,80 -100,0 z"
+         style="stroke-width:2"
+         id="path7784"
+         inkscape:connector-curvature="0" />
+    </symbol>
+    <symbol
+       id="Buffer_Small">
+      <title
+         id="title7212">Buffer Small</title>
+      <path
+         d="m 37.711573,40 25,10 -25,10 z"
+         id="path7214"
+         inkscape:connector-curvature="0" />
+    </symbol>
+    <filter
+       inkscape:menu-tooltip="Pressed metal with a rolled edge"
+       inkscape:menu="Bevels"
+       inkscape:label="Pressed Steel"
+       style="color-interpolation-filters:sRGB"
+       id="filter5206">
+      <feGaussianBlur
+         result="result1"
+         stdDeviation="3"
+         id="feGaussianBlur5208" />
+      <feBlend
+         in2="result1"
+         result="result5"
+         mode="multiply"
+         in="result1"
+         id="feBlend5210" />
+      <feGaussianBlur
+         in="result5"
+         result="result6"
+         stdDeviation="1"
+         id="feGaussianBlur5212" />
+      <feComposite
+         result="result8"
+         in2="result5"
+         in="result6"
+         operator="xor"
+         id="feComposite5214" />
+      <feComposite
+         in="result6"
+         result="fbSourceGraphic"
+         operator="xor"
+         in2="result8"
+         id="feComposite5216" />
+      <feSpecularLighting
+         in="fbSourceGraphic"
+         result="result1"
+         lighting-color="#ffffff"
+         surfaceScale="2"
+         specularConstant="2.20000005"
+         specularExponent="55"
+         id="feSpecularLighting5218">
+        <fePointLight
+           x="-5000"
+           y="-10000"
+           z="20000"
+           id="fePointLight5220" />
+      </feSpecularLighting>
+      <feComposite
+         in2="fbSourceGraphic"
+         in="result1"
+         result="result2"
+         operator="in"
+         id="feComposite5222" />
+      <feComposite
+         in="fbSourceGraphic"
+         result="result4"
+         operator="arithmetic"
+         k2="2"
+         k3="1"
+         in2="result2"
+         id="feComposite5224"
+         k1="0"
+         k4="0" />
+      <feComposite
+         in2="result4"
+         in="result4"
+         operator="in"
+         result="result91"
+         id="feComposite5226" />
+      <feBlend
+         mode="darken"
+         in2="result91"
+         id="feBlend5228" />
+    </filter>
+    <filter
+       inkscape:menu-tooltip="Pressed metal with a rolled edge"
+       inkscape:menu="Bevels"
+       inkscape:label="Pressed Steel"
+       style="color-interpolation-filters:sRGB"
+       id="filter5230">
+      <feGaussianBlur
+         result="result1"
+         stdDeviation="3"
+         id="feGaussianBlur5232" />
+      <feBlend
+         in2="result1"
+         result="result5"
+         mode="multiply"
+         in="result1"
+         id="feBlend5234" />
+      <feGaussianBlur
+         in="result5"
+         result="result6"
+         stdDeviation="1"
+         id="feGaussianBlur5236" />
+      <feComposite
+         result="result8"
+         in2="result5"
+         in="result6"
+         operator="xor"
+         id="feComposite5238" />
+      <feComposite
+         in="result6"
+         result="fbSourceGraphic"
+         operator="xor"
+         in2="result8"
+         id="feComposite5240" />
+      <feSpecularLighting
+         in="fbSourceGraphic"
+         result="result1"
+         lighting-color="#ffffff"
+         surfaceScale="2"
+         specularConstant="2.20000005"
+         specularExponent="55"
+         id="feSpecularLighting5242">
+        <fePointLight
+           x="-5000"
+           y="-10000"
+           z="20000"
+           id="fePointLight5244" />
+      </feSpecularLighting>
+      <feComposite
+         in2="fbSourceGraphic"
+         in="result1"
+         result="result2"
+         operator="in"
+         id="feComposite5246" />
+      <feComposite
+         in="fbSourceGraphic"
+         result="result4"
+         operator="arithmetic"
+         k2="2"
+         k3="1"
+         in2="result2"
+         id="feComposite5248"
+         k1="0"
+         k4="0" />
+      <feComposite
+         in2="result4"
+         in="result4"
+         operator="in"
+         result="result91"
+         id="feComposite5250" />
+      <feBlend
+         mode="darken"
+         in2="result91"
+         id="feBlend5252" />
+    </filter>
+    <filter
+       inkscape:menu-tooltip="Pressed metal with a rolled edge"
+       inkscape:menu="Bevels"
+       inkscape:label="Pressed Steel"
+       style="color-interpolation-filters:sRGB"
+       id="filter5254">
+      <feGaussianBlur
+         result="result1"
+         stdDeviation="3"
+         id="feGaussianBlur5256" />
+      <feBlend
+         in2="result1"
+         result="result5"
+         mode="multiply"
+         in="result1"
+         id="feBlend5258" />
+      <feGaussianBlur
+         in="result5"
+         result="result6"
+         stdDeviation="1"
+         id="feGaussianBlur5260" />
+      <feComposite
+         result="result8"
+         in2="result5"
+         in="result6"
+         operator="xor"
+         id="feComposite5262" />
+      <feComposite
+         in="result6"
+         result="fbSourceGraphic"
+         operator="xor"
+         in2="result8"
+         id="feComposite5264" />
+      <feSpecularLighting
+         in="fbSourceGraphic"
+         result="result1"
+         lighting-color="#ffffff"
+         surfaceScale="2"
+         specularConstant="2.20000005"
+         specularExponent="55"
+         id="feSpecularLighting5266">
+        <fePointLight
+           x="-5000"
+           y="-10000"
+           z="20000"
+           id="fePointLight5268" />
+      </feSpecularLighting>
+      <feComposite
+         in2="fbSourceGraphic"
+         in="result1"
+         result="result2"
+         operator="in"
+         id="feComposite5270" />
+      <feComposite
+         in="fbSourceGraphic"
+         result="result4"
+         operator="arithmetic"
+         k2="2"
+         k3="1"
+         in2="result2"
+         id="feComposite5272"
+         k1="0"
+         k4="0" />
+      <feComposite
+         in2="result4"
+         in="result4"
+         operator="in"
+         result="result91"
+         id="feComposite5274" />
+      <feBlend
+         mode="darken"
+         in2="result91"
+         id="feBlend5276" />
+    </filter>
+    <filter
+       inkscape:menu-tooltip="Pressed metal with a rolled edge"
+       inkscape:menu="Bevels"
+       inkscape:label="Pressed Steel"
+       style="color-interpolation-filters:sRGB"
+       id="filter5278">
+      <feGaussianBlur
+         result="result1"
+         stdDeviation="3"
+         id="feGaussianBlur5280" />
+      <feBlend
+         in2="result1"
+         result="result5"
+         mode="multiply"
+         in="result1"
+         id="feBlend5282" />
+      <feGaussianBlur
+         in="result5"
+         result="result6"
+         stdDeviation="1"
+         id="feGaussianBlur5284" />
+      <feComposite
+         result="result8"
+         in2="result5"
+         in="result6"
+         operator="xor"
+         id="feComposite5286" />
+      <feComposite
+         in="result6"
+         result="fbSourceGraphic"
+         operator="xor"
+         in2="result8"
+         id="feComposite5288" />
+      <feSpecularLighting
+         in="fbSourceGraphic"
+         result="result1"
+         lighting-color="#ffffff"
+         surfaceScale="2"
+         specularConstant="2.20000005"
+         specularExponent="55"
+         id="feSpecularLighting5290">
+        <fePointLight
+           x="-5000"
+           y="-10000"
+           z="20000"
+           id="fePointLight5292" />
+      </feSpecularLighting>
+      <feComposite
+         in2="fbSourceGraphic"
+         in="result1"
+         result="result2"
+         operator="in"
+         id="feComposite5294" />
+      <feComposite
+         in="fbSourceGraphic"
+         result="result4"
+         operator="arithmetic"
+         k2="2"
+         k3="1"
+         in2="result2"
+         id="feComposite5296"
+         k1="0"
+         k4="0" />
+      <feComposite
+         in2="result4"
+         in="result4"
+         operator="in"
+         result="result91"
+         id="feComposite5298" />
+      <feBlend
+         mode="darken"
+         in2="result91"
+         id="feBlend5300" />
+    </filter>
+    <filter
+       inkscape:menu-tooltip="Pressed metal with a rolled edge"
+       inkscape:menu="Bevels"
+       inkscape:label="Pressed Steel"
+       style="color-interpolation-filters:sRGB"
+       id="filter5302">
+      <feGaussianBlur
+         result="result1"
+         stdDeviation="3"
+         id="feGaussianBlur5304" />
+      <feBlend
+         in2="result1"
+         result="result5"
+         mode="multiply"
+         in="result1"
+         id="feBlend5306" />
+      <feGaussianBlur
+         in="result5"
+         result="result6"
+         stdDeviation="1"
+         id="feGaussianBlur5308" />
+      <feComposite
+         result="result8"
+         in2="result5"
+         in="result6"
+         operator="xor"
+         id="feComposite5310" />
+      <feComposite
+         in="result6"
+         result="fbSourceGraphic"
+         operator="xor"
+         in2="result8"
+         id="feComposite5312" />
+      <feSpecularLighting
+         in="fbSourceGraphic"
+         result="result1"
+         lighting-color="#ffffff"
+         surfaceScale="2"
+         specularConstant="2.20000005"
+         specularExponent="55"
+         id="feSpecularLighting5314">
+        <fePointLight
+           x="-5000"
+           y="-10000"
+           z="20000"
+           id="fePointLight5316" />
+      </feSpecularLighting>
+      <feComposite
+         in2="fbSourceGraphic"
+         in="result1"
+         result="result2"
+         operator="in"
+         id="feComposite5318" />
+      <feComposite
+         in="fbSourceGraphic"
+         result="result4"
+         operator="arithmetic"
+         k2="2"
+         k3="1"
+         in2="result2"
+         id="feComposite5320"
+         k1="0"
+         k4="0" />
+      <feComposite
+         in2="result4"
+         in="result4"
+         operator="in"
+         result="result91"
+         id="feComposite5322" />
+      <feBlend
+         mode="darken"
+         in2="result91"
+         id="feBlend5324" />
+    </filter>
+    <filter
+       inkscape:menu-tooltip="Pressed metal with a rolled edge"
+       inkscape:menu="Bevels"
+       inkscape:label="Pressed Steel"
+       style="color-interpolation-filters:sRGB"
+       id="filter5326">
+      <feGaussianBlur
+         result="result1"
+         stdDeviation="3"
+         id="feGaussianBlur5328" />
+      <feBlend
+         in2="result1"
+         result="result5"
+         mode="multiply"
+         in="result1"
+         id="feBlend5330" />
+      <feGaussianBlur
+         in="result5"
+         result="result6"
+         stdDeviation="1"
+         id="feGaussianBlur5332" />
+      <feComposite
+         result="result8"
+         in2="result5"
+         in="result6"
+         operator="xor"
+         id="feComposite5334" />
+      <feComposite
+         in="result6"
+         result="fbSourceGraphic"
+         operator="xor"
+         in2="result8"
+         id="feComposite5336" />
+      <feSpecularLighting
+         in="fbSourceGraphic"
+         result="result1"
+         lighting-color="#ffffff"
+         surfaceScale="2"
+         specularConstant="2.20000005"
+         specularExponent="55"
+         id="feSpecularLighting5338">
+        <fePointLight
+           x="-5000"
+           y="-10000"
+           z="20000"
+           id="fePointLight5340" />
+      </feSpecularLighting>
+      <feComposite
+         in2="fbSourceGraphic"
+         in="result1"
+         result="result2"
+         operator="in"
+         id="feComposite5342" />
+      <feComposite
+         in="fbSourceGraphic"
+         result="result4"
+         operator="arithmetic"
+         k2="2"
+         k3="1"
+         in2="result2"
+         id="feComposite5344"
+         k1="0"
+         k4="0" />
+      <feComposite
+         in2="result4"
+         in="result4"
+         operator="in"
+         result="result91"
+         id="feComposite5346" />
+      <feBlend
+         mode="darken"
+         in2="result91"
+         id="feBlend5348" />
+    </filter>
+    <filter
+       inkscape:menu-tooltip="Pressed metal with a rolled edge"
+       inkscape:menu="Bevels"
+       inkscape:label="Pressed Steel"
+       style="color-interpolation-filters:sRGB"
+       id="filter5350">
+      <feGaussianBlur
+         result="result1"
+         stdDeviation="3"
+         id="feGaussianBlur5352" />
+      <feBlend
+         in2="result1"
+         result="result5"
+         mode="multiply"
+         in="result1"
+         id="feBlend5354" />
+      <feGaussianBlur
+         in="result5"
+         result="result6"
+         stdDeviation="1"
+         id="feGaussianBlur5356" />
+      <feComposite
+         result="result8"
+         in2="result5"
+         in="result6"
+         operator="xor"
+         id="feComposite5358" />
+      <feComposite
+         in="result6"
+         result="fbSourceGraphic"
+         operator="xor"
+         in2="result8"
+         id="feComposite5360" />
+      <feSpecularLighting
+         in="fbSourceGraphic"
+         result="result1"
+         lighting-color="#ffffff"
+         surfaceScale="2"
+         specularConstant="2.20000005"
+         specularExponent="55"
+         id="feSpecularLighting5362">
+        <fePointLight
+           x="-5000"
+           y="-10000"
+           z="20000"
+           id="fePointLight5364" />
+      </feSpecularLighting>
+      <feComposite
+         in2="fbSourceGraphic"
+         in="result1"
+         result="result2"
+         operator="in"
+         id="feComposite5366" />
+      <feComposite
+         in="fbSourceGraphic"
+         result="result4"
+         operator="arithmetic"
+         k2="2"
+         k3="1"
+         in2="result2"
+         id="feComposite5368"
+         k1="0"
+         k4="0" />
+      <feComposite
+         in2="result4"
+         in="result4"
+         operator="in"
+         result="result91"
+         id="feComposite5370" />
+      <feBlend
+         mode="darken"
+         in2="result91"
+         id="feBlend5372" />
+    </filter>
+    <filter
+       inkscape:menu-tooltip="Pressed metal with a rolled edge"
+       inkscape:menu="Bevels"
+       inkscape:label="Pressed Steel"
+       style="color-interpolation-filters:sRGB"
+       id="filter5374">
+      <feGaussianBlur
+         result="result1"
+         stdDeviation="3"
+         id="feGaussianBlur5376" />
+      <feBlend
+         in2="result1"
+         result="result5"
+         mode="multiply"
+         in="result1"
+         id="feBlend5378" />
+      <feGaussianBlur
+         in="result5"
+         result="result6"
+         stdDeviation="1"
+         id="feGaussianBlur5380" />
+      <feComposite
+         result="result8"
+         in2="result5"
+         in="result6"
+         operator="xor"
+         id="feComposite5382" />
+      <feComposite
+         in="result6"
+         result="fbSourceGraphic"
+         operator="xor"
+         in2="result8"
+         id="feComposite5384" />
+      <feSpecularLighting
+         in="fbSourceGraphic"
+         result="result1"
+         lighting-color="#ffffff"
+         surfaceScale="2"
+         specularConstant="2.20000005"
+         specularExponent="55"
+         id="feSpecularLighting5386">
+        <fePointLight
+           x="-5000"
+           y="-10000"
+           z="20000"
+           id="fePointLight5388" />
+      </feSpecularLighting>
+      <feComposite
+         in2="fbSourceGraphic"
+         in="result1"
+         result="result2"
+         operator="in"
+         id="feComposite5390" />
+      <feComposite
+         in="fbSourceGraphic"
+         result="result4"
+         operator="arithmetic"
+         k2="2"
+         k3="1"
+         in2="result2"
+         id="feComposite5392"
+         k1="0"
+         k4="0" />
+      <feComposite
+         in2="result4"
+         in="result4"
+         operator="in"
+         result="result91"
+         id="feComposite5394" />
+      <feBlend
+         mode="darken"
+         in2="result91"
+         id="feBlend5396" />
+    </filter>
+    <filter
+       inkscape:menu-tooltip="Pressed metal with a rolled edge"
+       inkscape:menu="Bevels"
+       inkscape:label="Pressed Steel"
+       style="color-interpolation-filters:sRGB"
+       id="filter5398">
+      <feGaussianBlur
+         result="result1"
+         stdDeviation="3"
+         id="feGaussianBlur5400" />
+      <feBlend
+         in2="result1"
+         result="result5"
+         mode="multiply"
+         in="result1"
+         id="feBlend5402" />
+      <feGaussianBlur
+         in="result5"
+         result="result6"
+         stdDeviation="1"
+         id="feGaussianBlur5404" />
+      <feComposite
+         result="result8"
+         in2="result5"
+         in="result6"
+         operator="xor"
+         id="feComposite5406" />
+      <feComposite
+         in="result6"
+         result="fbSourceGraphic"
+         operator="xor"
+         in2="result8"
+         id="feComposite5408" />
+      <feSpecularLighting
+         in="fbSourceGraphic"
+         result="result1"
+         lighting-color="#ffffff"
+         surfaceScale="2"
+         specularConstant="2.20000005"
+         specularExponent="55"
+         id="feSpecularLighting5410">
+        <fePointLight
+           x="-5000"
+           y="-10000"
+           z="20000"
+           id="fePointLight5412" />
+      </feSpecularLighting>
+      <feComposite
+         in2="fbSourceGraphic"
+         in="result1"
+         result="result2"
+         operator="in"
+         id="feComposite5414" />
+      <feComposite
+         in="fbSourceGraphic"
+         result="result4"
+         operator="arithmetic"
+         k2="2"
+         k3="1"
+         in2="result2"
+         id="feComposite5416"
+         k1="0"
+         k4="0" />
+      <feComposite
+         in2="result4"
+         in="result4"
+         operator="in"
+         result="result91"
+         id="feComposite5418" />
+      <feBlend
+         mode="darken"
+         in2="result91"
+         id="feBlend5420" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-maximized="1"
+     inkscape:window-y="24"
+     inkscape:window-x="65"
+     inkscape:window-height="876"
+     inkscape:window-width="1535"
+     inkscape:snap-grids="false"
+     showguides="true"
+     inkscape:snap-bbox="false"
+     showgrid="true"
+     inkscape:current-layer="svg2"
+     inkscape:document-units="px"
+     inkscape:cy="496.39986"
+     inkscape:cx="327.57307"
+     inkscape:zoom="0.70000001"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     borderlayer="false"
+     inkscape:snap-to-guides="false"
+     inkscape:snap-intersection-paths="false"
+     inkscape:snap-page="false"
+     inkscape:snap-perpendicular="true"
+     inkscape:object-paths="false"
+     inkscape:object-nodes="false"
+     inkscape:snap-object-midpoints="false"
+     inkscape:snap-midpoints="true"
+     inkscape:snap-center="true"
+     inkscape:snap-global="false"
+     inkscape:connector-spacing="26"
+     inkscape:snap-others="true"
+     inkscape:snap-nodes="false"
+     inkscape:snap-bbox-midpoints="false"
+     inkscape:bbox-paths="false"
+     inkscape:bbox-nodes="false"
+     inkscape:snap-bbox-edge-midpoints="false"
+     inkscape:snap-text-baseline="true"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid15208"
+       spacingx="20"
+       spacingy="20"
+       dotted="false"
+       empspacing="0"
+       originx="84.535615"
+       originy="-34.500034" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(56.035869,-48.362179)" />
+  <rect
+     style="fill:#ff9b58;fill-opacity:1;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-miterlimit:0;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5398)"
+     id="rect15298"
+     width="100"
+     height="39.999996"
+     x="346.03613"
+     y="3.9999998"
+     ry="19.999998" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="395.46545"
+     y="33.285709"
+     id="text15304"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan15306"
+       x="395.46545"
+       y="33.285709">Start</tspan></text>
+  <rect
+     style="fill:#ff9b58;fill-opacity:1;stroke:#000000;stroke-width:2.93979216;stroke-linecap:butt;stroke-miterlimit:0;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5374)"
+     id="rect15308"
+     width="290.06018"
+     height="74.345917"
+     x="251.006"
+     y="110.82932"
+     ry="3.7605369e-06" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="397.49304"
+     y="142.28799"
+     id="text15310"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan15312"
+       x="397.49304"
+       y="142.28799">Find</tspan><tspan
+       sodipodi:role="line"
+       x="397.49304"
+       y="169.78799"
+       id="tspan15314">\MGL@@@<script></tspan></text>
+  <rect
+     style="fill:#ff9b58;fill-opacity:1;stroke:#000000;stroke-width:2.61052561;stroke-linecap:butt;stroke-miterlimit:0;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5350)"
+     id="rect15316"
+     width="104.42103"
+     height="104.421"
+     x="-37.940403"
+     y="434.159"
+     ry="0"
+     transform="matrix(0.73605839,-0.67691805,0.73605839,0.67691805,27.536121,2.4999998)" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="396.24426"
+     y="309.45212"
+     id="text15372"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan15374"
+       x="396.24426"
+       y="309.45212">Is it</tspan><tspan
+       sodipodi:role="line"
+       x="396.24426"
+       y="336.95212"
+       id="tspan15376">defined?</tspan></text>
+  <rect
+     style="fill:#ff9b58;fill-opacity:1;stroke:#000000;stroke-width:2.46426511;stroke-linecap:butt;stroke-miterlimit:0;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5326)"
+     id="rect15308-5"
+     width="214.82143"
+     height="70.535728"
+     x="66.625397"
+     y="458.73218"
+     ry="3.5678115e-06" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="173.32182"
+     y="487.595"
+     id="text15310-7"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan15402"
+       x="173.32182"
+       y="487.595">Compare</tspan><tspan
+       sodipodi:role="line"
+       id="tspan15404"
+       x="173.32182"
+       y="515.09497">script vs. code</tspan></text>
+  <rect
+     style="fill:#ff9b58;fill-opacity:1;stroke:#000000;stroke-width:2.6016953;stroke-linecap:butt;stroke-miterlimit:0;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5302)"
+     id="rect15308-5-1"
+     width="261.11255"
+     height="64.684021"
+     x="483.47986"
+     y="461.65802"
+     ry="3.2718219e-06" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="615.10748"
+     y="487.8367"
+     id="text15310-7-8"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan15430"
+       x="615.10748"
+       y="487.8367">Rewrite/recompile</tspan><tspan
+       sodipodi:role="line"
+       id="tspan15432"
+       x="615.10748"
+       y="515.33667">script</tspan></text>
+  <rect
+     style="fill:#ff9b58;fill-opacity:1;stroke:#000000;stroke-width:2.93979216;stroke-linecap:butt;stroke-miterlimit:0;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5230)"
+     id="rect15308-58"
+     width="290.06018"
+     height="74.345917"
+     x="469.00604"
+     y="802.82477"
+     ry="3.7605369e-06" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="615.46466"
+     y="833.83441"
+     id="text15310-2"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan15538"
+       x="615.46466"
+       y="833.83441">Undefine</tspan><tspan
+       sodipodi:role="line"
+       id="tspan15540"
+       x="615.46466"
+       y="861.33441">\MGL@@@<script></tspan></text>
+  <rect
+     style="fill:#ff9b58;fill-opacity:1;stroke:#000000;stroke-width:2.93979216;stroke-linecap:butt;stroke-miterlimit:0;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5254)"
+     id="rect15308-7"
+     width="290.06018"
+     height="74.345917"
+     x="29.006018"
+     y="802.82477"
+     ry="3.7605369e-06" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="175.46468"
+     y="833.83441"
+     id="text15310-4"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan15534"
+       x="175.46468"
+       y="833.83441">Define</tspan><tspan
+       sodipodi:role="line"
+       id="tspan15536"
+       x="175.46468"
+       y="861.33441">\MGL@@@<script></tspan></text>
+  <rect
+     style="fill:#ff9b58;fill-opacity:1;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-miterlimit:0;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5206)"
+     id="rect15298-0"
+     width="100"
+     height="39.999996"
+     x="346.03613"
+     y="944"
+     ry="19.999998" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="395.93542"
+     y="973.28571"
+     id="text15304-3"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan15563"
+       x="395.93542"
+       y="973.28571">End</tspan></text>
+  <rect
+     style="fill:#ff9b58;fill-opacity:1;stroke:#000000;stroke-width:2.61052561;stroke-linecap:butt;stroke-miterlimit:0;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5278)"
+     id="rect15316-5"
+     width="104.42103"
+     height="104.421"
+     x="-291.92599"
+     y="688.14459"
+     ry="0"
+     transform="matrix(0.73605839,-0.67691805,0.73605839,0.67691805,27.536121,2.4999998)" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="396.24426"
+     y="638.30701"
+     id="text15372-1"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan4665"
+       x="396.24426"
+       y="638.30701">Are</tspan><tspan
+       sodipodi:role="line"
+       id="tspan4667"
+       x="396.24426"
+       y="665.80701">they</tspan><tspan
+       sodipodi:role="line"
+       id="tspan4669"
+       x="396.24426"
+       y="693.30701">equal?</tspan></text>
+  <path
+     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
+     d="m 395.9522,41.850038 0,65.659912"
+     id="path9635"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cc" />
+  <path
+     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
+     d="m 395.9522,184.76632 0,64.67006"
+     id="path9668"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cc" />
+  <path
+     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
+     d="m 320.69584,322.14706 -146.47212,0 0,134.37059"
+     id="path9880"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="ccc" />
+  <path
+     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
+     d="m 472.88165,322.14453 146.47212,0 0,134.37059"
+     id="path9880-8"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="ccc" />
+  <path
+     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
+     d="m 281.75015,497.57146 114.28572,-0.71429 0,95.85714"
+     id="path11097"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="ccc" />
+  <path
+     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
+     d="m 472.48848,666.43983 146.47212,0 0,134.37059"
+     id="path9880-87"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="ccc" />
+  <path
+     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
+     d="m 319.58325,665.72555 -146.47211,0 0,134.37059"
+     id="path9880-4"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="ccc" />
+  <path
+     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
+     d="m 319.6073,843.28574 147.85714,0"
+     id="path12272"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
+     d="m 396.03587,843.28574 0,97.14286"
+     id="path12293"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
+     d="m 618.89301,527.57146 0,37.14285 -202.85714,-0.71428 c 0,0 -19.14012,-27.19021 -39.21292,-0.0237 l -203.28708,0.38084 -0.35715,101.42857"
+     id="path12941"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccccc" />
+  <rect
+     style="fill:#ffe3d0;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     id="rect5520"
+     width="71.428574"
+     height="40"
+     x="214.67897"
+     y="301.21429"
+     ry="20" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+     x="227.53612"
+     y="329.78571"
+     id="text5522"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan5524"
+       x="227.53612"
+       y="329.78571">Yes</tspan></text>
+  <rect
+     style="fill:#ffe3d0;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     id="rect5520-4"
+     width="71.428574"
+     height="40"
+     x="213.2504"
+     y="644.64282"
+     ry="20" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+     x="226.10754"
+     y="673.21423"
+     id="text5522-9"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan5524-4"
+       x="226.10754"
+       y="673.21423">Yes</tspan></text>
+  <rect
+     style="fill:#ffe3d0;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     id="rect5520-7"
+     width="71.428574"
+     height="40"
+     x="507.5361"
+     y="644.07141"
+     ry="20" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+     x="524.67896"
+     y="674.07141"
+     id="text5522-6"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan5586"
+       x="524.67896"
+       y="674.07141">No</tspan></text>
+  <rect
+     style="fill:#ffe3d0;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     id="rect5520-7-3"
+     width="71.428574"
+     height="40"
+     x="506.10754"
+     y="301.21426"
+     ry="20" />
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.5px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+     x="523.25037"
+     y="331.21423"
+     id="text5522-6-9"
+     sodipodi:linespacing="100%"><tspan
+       sodipodi:role="line"
+       id="tspan5586-2"
+       x="523.25037"
+       y="331.21423">No</tspan></text>
+</svg>
diff --git a/mgltex/mgltex.dtx b/mgltex/mgltex.dtx
index 34dedae..ecdd628 100644
--- a/mgltex/mgltex.dtx
+++ b/mgltex/mgltex.dtx
@@ -1,42 +1,48 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 2014 by Diego Sejas <diego.mathematician at gmail.com>
-% 
+% Copyright (C) 2014--2015 by Diego Sejas Viscarra <diego.mathematician at gmail.com>
+% Copyright (C) 2014--2015 by Alexey Balakin <mathgl.abalakin at gmail.com>
+%
 % This program is free software: you can redistribute it and/or modify it
 % under the terms of the GNU General Public License as published by the
 % Free Software Foundation, either version 3 of the License, or (at your
 % option) any later version.
-% 
+%
 % This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
-% 
+% with this program. If not, see <http://www.gnu.org/licenses/>.
+%
 % \fi
-% 
+%
 % \iffalse
 %
+%<package>
 %<package>\NeedsTeXFormat{LaTeX2e}
-%<package>\ProvidesPackage{mgltex}[/2014/11/22 v2.0 Embed MGL scripts in LaTeX documents]
-% 
+%<package>\ProvidesPackage{mgltex}[2015/11/07 v4.0 Embed MGL scripts into LaTeX documents]
+%<package>
+%
 %<*driver>
-\documentclass{ltxdoc}
+\documentclass[10pt]{ltxdoc}
 \usepackage{color}
-\usepackage[comments]{mgltex}
+\IfFileExists{hyperref.sty}{\usepackage{hyperref}}{}
+\usepackage{mgltex}
 \EnableCrossrefs
 \CodelineIndex
 \RecordChanges
+\widowpenalty=10000
+\clubpenalty=10000
 \begin{document}
   \DocInput{mgltex.dtx}
 \end{document}
 %</driver>
 % \fi
-% 
-% \CheckSum{1297}
-% 
+%
+% \CheckSum{1520}
+%
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
 %   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -52,14 +58,66 @@
 %   Right bracket \]     Circumflex    \^     Underscore    \_
 %   Grave accent  \`     Left brace    \{     Vertical bar  \|
 %   Right brace   \}     Tilde         \~}
-% 
+%
+% \bgroup%
+%   \makeatletter%
+%   \gdef\MGL at set@pseudo at verb@env{%
+%     \if at minipage\else\vskip\parskip\fi%
+%     \setlength{\labelsep}{1em}%
+%     \@beginparpenalty\predisplaypenalty%
+%     \leftskip\@totalleftmargin\rightskip\z@%
+%     \parindent\z@\parfillskip\@flushglue\parskip\z@%
+%     \itemsep\z@%
+%     \@@par%
+%     \def\par{%
+%       \if at tempswa%
+%         \leavevmode\null\@@par\penalty\interlinepenalty%
+%       \else%
+%         \@tempswatrue%
+%         \ifhmode\@@par\penalty\interlinepenalty\fi%
+%       \fi%
+%     }%
+%     \ttfamily%
+%     \frenchspacing%
+%   }%
+%   \makeatother
+% \egroup
+%
 % \changes{v1.0}{2014/09/27}{Initial version}
-% \changes{v.2.0}{2014/11/15}{Possible bugfix by adding \texttt{\textbackslash expandafter} to commands to ignore/write lines of MGL code}
-% \changes{v.2.0}{2014/11/15}{Add environment \texttt{mglsignature} that adds a commentary every MGL script}
-% \changes{v.2.0}{2014/11/15}{Eliminate line ignoring commands to create more elegant scripts, due to the a new command that adds comments to the scripts}
-% 
+% \changes{v2.0}{2014/11/23}{Possible bugfix by adding \texttt{\textbackslash expandafter} to commands to ignore/write lines of MGL code}
+% \changes{v2.0}{2014/11/23}{Add environment \texttt{mglsignature} that adds a commentary every MGL script}
+% \changes{v2.0}{2014/11/23}{Eliminate line ignoring commands to create more elegant scripts, due to the a new command that adds comments to the scripts}
+% \changes{v2.0}{2014/11/23}{Move the MGL \emph{stop} command from the \texttt{\textbackslash{}AtEndDocument} command to the \texttt{\textbackslash{}mgl at func} buffer}
+% \changes{v3.0}{/2015/03/29}{Add detection of changes in MGL scripts to speed up compilation time (only changed scripts are recompiled)}
+% \changes{v3.0}{/2015/03/29}{Add command \texttt{\textbackslash mgldir}, \texttt{\textbackslash mglscriptsdir}, \texttt{\textbackslash mglgraphicsdir} and \texttt{\textbackslash mglbackupsdir} to specify a main directory for \textsf{\mglTeX} and directories for the creation of scripts, graphics and backups}
+% \changes{v3.0}{/2015/03/29}{Add the \texttt{\textbackslash mglquality} command to specify a default quality}
+% \changes{v3.0}{/2015/03/29}{Add the \texttt{\textbackslash mglwidth} and \texttt{\textbackslash mglheight} commands to specify the default size of the images produced}
+% \changes{v3.0}{/2015/03/29}{Add the \texttt{\textbackslash mglsettings} command to configure behavior of the package}
+% \changes{v3.0}{/2015/03/29}{Improve environment \texttt{mglsignature} by adding the possibility of using \LaTeX{} commands inside it}
+% \changes{v4.0}{/2015/08/17}{Completely rewrite of \textsf{\mglTeX}}
+% \changes{v4.0}{/2015/08/17}{\textsf{\mglTeX} now depends of the \textsf{verbatim} package}
+% \changes{v4.0}{/2015/08/17}{All environments write their contents \emph{verbatim}}
+% \changes{v4.0}{/2015/08/17}{Remove \texttt{\textbackslash mglquality} command. Instead, add package options \texttt{0q}, \ldots, \texttt{8q} to specify quality}
+% \changes{v4.0}{/2015/08/17}{Add the \texttt{\textbackslash mglpaths} command to add directories to the search paths for MGL scripts}
+% \changes{v4.0}{/2015/08/17}{Add the \texttt{\textbackslash mglname} command to force clousure of the current main script, its compilation, and the opening of a new main script}
+% \changes{v4.0}{/2015/08/17}{Add the option \texttt{label} to the \texttt{mgl} environment in order to override the automatic naming of the script and corresponding image}
+% \changes{v4.0}{/2015/08/17}{Add the option \texttt{label} to the \texttt{mglverbatim} environment to name the verbatim code}
+% \changes{v4.0}{/2015/08/17}{Add the option \texttt{separator} to the command \texttt{\textbackslash mglplot} to brake the code into different physical text lines}
+% \changes{v4.0}{/2015/08/17}{Add the option \texttt{path} to the commands \texttt{\textbackslash mglgraphics} and \texttt{\textbackslash mglinclude} to force a path to search MGL scripts}
+% \changes{v4.0}{/2015/08/17}{Make verbatim-like environments and \texttt{\textbackslash mglinclude} command more visually elegant}
+% \changes{v4.0}{/2015/08/17}{Numbering in verbatim-like environments is optional now}
+% \changes{v4.0}{/2015/08/17}{Add the command \texttt{\textbackslash listofmglscripts} to create a list of all MGL scripts included verbatim in the document}
+% \changes{v4.0}{/2015/08/17}{Add the command \texttt{\textbackslash mglTeXwVer} that prints the name of the package with its version in a coherent manner, and separated by an unbreakable space}
+% \changes{v4.0}{/2015/08/17}{Verbatim-like environments and the \texttt{\textbackslash mglinclude} command have starred versions wich prevent the command \texttt{\textbackslash listofmglscripts} to list them}
+% \changes{v4.0}{/2015/08/17}{Remove \texttt{mglsignature} environment for being considered useless, and to avoid interference with the detection of changes in MGL scripts, to speed up script writing and to make the package less resource-consuming}
+% \changes{v4.0}{/2015/08/17}{Remove the \texttt{\textbackslash mglwidth} and \texttt{\textbackslash mglheight} commands for being considered useless}
+% \changes{v4.0}{/2015/08/17}{Remove the \texttt{\textbackslash MGL at setkeys} command since it isn't needed as first thought}
+% \changes{v4.0}{/2015/08/17}{\textsf{\mglTeX} is more customizable now}
+% \changes{v4.0}{/2015/08/17}{Many improvements, including, but not limited to, speed up, increased coherence and cleanness of the code, less resource consumption}
+% \changes{v4.0}{/2015/08/17}{Many bugfixes}
+%
 % \GetFileInfo{mgltex.sty}
-% 
+%
 % \DoNotIndex{\def,\bgroup,\egroup,\newcommand,\newenvironment,\\,\@onlypreamble,\@undefined,\@vobeyspaces,\list}
 % \DoNotIndex{\if,\else,\fi,\begingroup,\endgroup,\end,\edef,\xdef,\gdef,\scapechar,\active,\arabic,\catcode,\bfseries}
 % \DoNotIndex{\@flushglue,\@for,\@ifnextchar,\@makeother,\{,\},\^,\ ,\AtBeginDocument,\AtEndDocument,\centering}
@@ -71,25 +129,27 @@
 % \DoNotIndex{\PassOptionsToPackage,\ProcessOptions,\read,\relax,\RequirePackage,\rightskip,\setcounter,\setkeys,\setlength}
 % \DoNotIndex{\space,\stepcounter,\string,\TeX,\the,\vbox,\verbatim at font,\write,\z@,\z at skip,\newif,\PackageInfo,\today}
 % \DoNotIndex{\obeylines,\or\ifcase,\small}
-% 
+%
 % \title{The \textsf{\mglTeX} package\thanks{This document corresponds to \textsf{\mglTeX}~\fileversion, dated \filedate.}}
 % \author{Diego Sejas Viscarra\\\texttt{diego.mathematician at gmail.com}}
-% 
+%
 % \maketitle
-% 
+%
 % \begin{abstract}
-%   \noindent MathGL is a fast and efficient library by Alexey Balakin for the creation of high-quality publication-ready scientific graphics. Although it defines interfaces for many programming languages, it also implements its own programming language, called \emph{MGL}, which can be used independently. With the package \textsf{\mglTeX}, MGL scripts can be embedded within any \LaTeX{} document, and the corresponding images are automatically created and included.
-
-% This manual documents the use of the commands and environments of~\mglTeX.
+% \noindent MathGL is a fast and efficient library by Alexey Balakin for the creation of high-quality publication-ready scientific graphics. Although it defines interfaces for many programming languages, it also implements its own scripting language, called \emph{MGL}, which can be used independently. With the package \textsf{\mglTeX}, MGL scripts can be embedded within any \LaTeX{} document, and the corresponding images are automatically created and included.
+%
+% This manual documents the use of the commands and environments of~\textsf{\mglTeX}.
 % \end{abstract}
-% 
+%
+% \tableofcontents
+%
 % \section{Introduction}
-% MathGL is a fast and efficient library by Alexey Balakin for the creation of high-quality publication-ready scientific graphics. It implements more than $50$ different types of graphics for 1d, 2d and 3d large sets of data. It supports exporting images to bitmap formats (PNG, JPEG, BMP, etc.), or vector formats (EPS, \TeX, SVG, etc.), or 3d image formats (STL, OBJ, XYZ, etc.), and even its own 3d format, MGLD. MathGL also defines its own vector font specification format, and supports U [...]
-% 
+% MathGL is a fast and efficient library by Alexey Balakin for the creation of high-quality publication-ready scientific graphics. It implements more than $50$ different types of graphics for 1d, 2d and 3d large sets of data. It supports exporting images to bitmap formats (PNG, JPEG, BMP, etc.), or vector formats (EPS, \TeX, SVG, etc.), or 3d image formats (STL, OBJ, XYZ, etc.), and even its own native 3d format, MGLD. MathGL also defines its own vector font specification format, and sup [...]
+%
 % MathGL has interfaces for a wide variety of programming languages, such as C/C++, Fortran, Python, Octave, Pascal, Forth, and many others, but it also defines its own scripting language, called \emph{MGL}, which can be used to generate graphics independently of any programming language. The \textsf{\mglTeX} package adds support to embed MGL code inside \LaTeX{} documents, which is automatically extracted and executed, and the resulting images are included in the document.
-% 
+%
 % Besides the obvious advantage of having available all the useful features of MathGL, \textsf{\mglTeX} facilitates the maintenance of your document, since both code for text and code for graphics are contained in a single file.
-% 
+%
 % \section{Usage}
 % \noindent The simplest way to load \textsf{\mglTeX} to a \LaTeX{} document is to write the command
 % \begin{center}
@@ -99,77 +159,168 @@
 % \begin{center}
 % |\usepackage|\oarg{options list}|{mgltex}|,  
 % \end{center}
-% where \meta{options list} is a comma-separated list that can contains one or more of the following options:
+% where \meta{options list} is a comma-separated list that can contain one or more of the following options:
 % \begin{itemize}
 %   \item |draft|: The generated images won't be included in the document. This option is useful when fast compilation of the document is needed.
-%   \item |final|: This overrides the |draft| option.
-%   \item |on|: To create the MGL scripts and corresponding images of the document every time \LaTeX{} is run.
-%   \item |off|: To avoid creating the MGL scripts and corresponding images of the document, but still try to include the images.
+%   \item |final|: Overrides the |draft| option.
+%   \item |on|: To rewrite, recompile and include the changed MGL scripts and/or corresponding graphics.
+%   \item |off|: To avoid creation, compilation and/or inclusion of the MGL scripts and corresponding images.
 %   \item |comments|: To allow the contents of the |mglcomment| environments to be shown in the \LaTeX{} document.
-%   \item |nocomments|: To not show the contents of the |mglcomment| environments in the \LaTeX{} document.
-%   \item |png|, |jpg|, |jpeg|: To export images to the corresponding bitmap format.
-%   \item |eps|, |epsz|: To export to uncompressed/compressed EPS format as primitives.
-%   \item |bps|, |bpsz|: To export to uncompressed/compressed EPS format as bitmap.
+%   \item |nocomments|: To avoid showing the contents of the |mglcomment| environments in the \LaTeX{} document.
+%   \item |1x|, \ldots, |9x|: To specify the scale for the creation of graphics (|1x| is normal scaling, |2x| is twice as bigger, etc).
+%   \item |0q|, \ldots, |8q|: To specify the quality for the creation of graphics. An info message indicating the characteristics of the chosen quality is printed in the .log file according to the following table:
+% \begin{center}
+%   \DeleteShortVerb{\|}
+%   \begin{tabular}{|c|l|}
+%     \hline
+%     Quality & Description\\
+%     \hline
+%     \hline
+%     $0$ & No face drawing (fastest)\\
+%     \hline
+%     $1$ & No color interpolation (fast)\\
+%     \hline
+%     $2$ & High quality (normal)\\
+%     \hline
+%     $3$ & High quality with 3d primitives (not implemented yet)\\
+%     \hline
+%     $4$ & No face drawing, direct bitmap drawing (low memory usage)\\
+%     \hline
+%     $5$ & No color interpolation, direct bitmap drawing (low memory usage)\\
+%     \hline
+%     $6$ & High quality, direct bitmap drawing (low memory usage)\\
+%     \hline
+%     $7$ & High quality with 3d primitives, direct bitmap drawing\\
+%     & (not implemented yet)\\
+%     \hline
+%     $8$ & Draw dots instead of primitives (extremely fast)\\
+%     \hline
+%   \end{tabular}
+%   \MakeShortVerb{\|}
+% \end{center}
+%   \item |png|, |jpg|, |jpeg|: To export images to a bitmap format.
+%   \item |eps|, |epsz|: To export to uncompressed/compressed vectorial EPS format.
+%   \item |bps|, |bpsz|: To export to uncompressed/compressed bitmap EPS format.
 %   \item |pdf|: To export to 3D PDF format.
 %   \item |tex|: To export to \LaTeX{}/\emph{tikz} document.
 % \end{itemize}
-% It must be noted that the options |on| and |off| are exclusive, in the sense that if one specifies both of them, only the last one will be used. Likewise, the options that specify the format to save the graphics are exclusive.
-% 
-% Observe the option |off| is useful to save compilation time of a document. For example, if the graphics of an article are in final version, instead of compilling them over and over again every time \LaTeX{} runs, they can be created only once with the |on| option, and then only included (but not recompiled) with the |off| option.
-% 
-% The are two ways to compile a document with \textsf{\mglTeX}: The first way is to run
+% If two or more mutually exclusive options are specified, only the last one will be used by \textsf{\mglTeX}. For example, if one specifies the options |0q|, |3q| and |8q|---in that order---, then the quality will be set to $8$.
+%
+% Observe the |off| option is similar to the |draft| option, with the exception that |draft| deactivates inclusion of graphics for the \textsf{\mglTeX} and \textsf{graphicx} packages, while the |off| option only deactivates \textsf{\mglTeX} functionalities (creation and/or inclusion of scripts and graphics), not affecting \textsf{graphicx}. This could be useful to recognize which images are created with MGL, and which are only included. Another possible use for this option is to avoid re [...]
+%
+% There are two ways to compile a document with \textsf{\mglTeX}: The first way is to run
 % \begin{center}
-%   |latex --shell-escape |\meta{document}
+%   |latex --shell-escape |\meta{document}|.tex|
 % \end{center}
-% twice, since the first run will extract the MGL code, execute it and include some of the resulting graphics, while the second run will include the remaining graphics; the second way is to run |latex |\meta{document} to extract the MGL code, then execute the generated scripts with the program |mglconv| (which comes with MathGL), and execute |latex |\meta{document} once more to include the graphics.
-% 
-% \subsection{Environments for MGL code embedding}
-% \DescribeEnv{mgl}\noindent The main environment defined by \textsf{\mglTeX} is |mgl|. It extracts its contents to a general script, called \meta{document}.mgl, where \meta{document} stands for the name of the \LaTeX{} file being compiled; this script is compiled, and the corresponding image is included. Its syntax is:
+% three times, since the first run will detect changes in the scripts; the second run will extract the MGL code, execute it and include some of the resulting graphics, while the third run will include the remaining graphics. The second way is to run
+% \begin{center}
+%   |latex |\meta{document}|.tex|
+% \end{center}
+% twice to detect changes in MGL code and to extract it, then compile the generated scripts with the program |mglconv| (part of MathGL bundle), and execute |latex |\meta{document}|.tex| once more to include the graphics.\footnote{If no changes were made to scripts intended to create graphics, only one \LaTeX{} run is needed.} (More on the recompilation-decision mechanism of \textsf{\mglTeX} can be found in subsection~\ref{subsection: recompilation decision}.)
+%
+% \subsection{Warning for the user}\label{subsection: warning}
+% Before we continue the description of the package, it must be pointed out that \textsf{\mglTeX} assummes that the command |\end{|\meta{MGL environment}|}|, that ends the corresponding \meta{MGL environment}, occupies its own physical line of \LaTeX{} code. So the correct forms of use of environments are the following:
+% \begin{quote}
+%|\begin{|\meta{MGL environment}|}|\\
+%\meta{contents of the environment}\\
+%|\end{|\meta{environment}|}|
+% \end{quote}
+% and
+% \begin{quote}
+%|\begin{|\meta{MGL environment}|}|\meta{contents of the environment}\\
+%|\end{|\meta{environment}|}|
+% \end{quote}
+% The following form will cause problems:
+% \begin{quote}
+%|\begin{|\meta{MGL environment}|}|\meta{contents of the environment}|\end{|\meta{MGL environment}|}|
+% \end{quote}
+%
+% \textsf{\mglTeX} depends on the \textsf{verbatim} package to define its environments. One of the characteristics of \textsf{verbatim} is that it transcripts everything contained between the begining and the end of an environment, including spaces before an |\end{|\meta{MGL environment}|}| command. This should not be a problem, except for the fact that \textsf{\mglTeX} has a mechanism to detect changes in MGL scripts in order to recompile them (see subsection \ref{subsection: recompilat [...]
+%
+% It should also be pointed out that the default behavior of the |verbatim| package makes the following form to ignore the \meta{text} after the |\end|\meta{MGL environment}, issuing a warning.
+% \begin{quote}
+%|\begin{|\meta{MGL environment}|}|\\
+%\meta{contents of the environment}\\
+%|\end{|\meta{MGL environment}|}|\meta{text}
+% \end{quote}
+%
+% \subsection{Setting up \textsf{\mglTeX} for use}
+% \noindent Although \textsf{\mglTeX} is completely functional without any further set up, there are some parameters of its behavior that could be useful to modify. The following commands must be used in the preamble of the document only, since the first MGL script is created at the moment of the |\begin{document}| command, and otherwise they could create weird errors during compilation; trying to use them somewhere else will produce an error. 
+%
+% \DescribeMacro{\mgldir} This command can be used to specify the main working directory for \textsf{\mglTeX}. Inside it, the scripts, backup files and graphics will be created, or can be separated inside subdirectories. This is useful, for example, to avoid many scripts and graphics from polluting the directory where the \LaTeX{} document is.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\begin{mgl}|\oarg{key-val list}\\[0.5em]
-%       \hss\meta{MGL code}\hss\\[0.5em]
-%     |\end{mgl}|\\[0.25em]
+%     |\mgldir|\marg{\mglTeX{} main directory}\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% Here, \meta{key-val list} accepts the same optional arguments as the |\includegraphics| command from the \textsf{graphicx} package, plus an additional one, |imgext|, which can be used to specify the extension to save the graphic. The \meta{MGL code} doesn't need to contain any specific instruction to create the image, since \textsf{\mglTeX} takes care of that.
-% 
-% \DescribeEnv{mgladdon} This environment adds its contents to the general script \meta{document}.mgl, but it doesn't produce any image. It doesn't require any kind of arguments.
+% \meta{\mglTeX{} main directory} can be in the form of an absolute path or a relative path, and should be an existing location, since it won't be created automatically.
+%
+% \DescribeMacro{\mglscriptsdir} It specifies the subdirectory inside \meta{\mglTeX{} main directory} where the MGL scripts will be created.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\begin{mgladdon}|\\[0.5em]
-%       \hss\meta{MGL code}\hss\\[0.5em]
-%     |\end{mgladdon}|\\[0.25em]
+%     |\mglscriptsdir|\marg{MGL scripts subdirectory}\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% \DescribeEnv{mglcode} This is the same as the |mgl| environment, but the corresponding code is written \emph{verbatim} to a separate script, whose name is specified as mandatory argument. It accepts the same optional arguments as |mgl|.
+%
+% \DescribeMacro{\mglgraphicsdir} It specifies the subdirectory inside \meta{\mglTeX{} main directory} where the MGL graphics will be created, including the ones from external scripts (not embedded inside the \LaTeX{} document).
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\begin{mglcode}|\oarg{key-val list}\marg{script\_name}\\[0.5em]
+%     |\mglgraphicsdir|\marg{MGL graphics subdirectory}\\[0.25em]
+%     \hline
+%   \end{tabular}
+% \end{center}
+%
+% \DescribeMacro{\mglbackupsdir} It specifies the subdirectory inside \meta{\mglTeX{} main directory} where backups for the MGL scripts will be created.
+% \begin{center}
+%   \begin{tabular}{l}
+%     \hline\\[-0.75em]
+%     |\mglbackupsdir|\marg{MGL backups subdirectory}\\[0.25em]
+%     \hline
+%   \end{tabular}
+% \end{center}
+%
+% The above commands can be used in various combinations. For example, if none of them is used, the scripts, graphics and backups will be created inside the same path where the \LaTeX{} document is being compiled; if only |\mgldir| is used, they will be created inside \meta{\mglTeX{} main directory}; if only |\mgldir| and |\mglscriptsdir| are used, the scripts will be created inside \meta{\mglTeX{} main directory}\meta{MGL scripts directory}, while the graphics and backups will be inside [...]
+%
+% \DescribeMacro{\mglpaths} In case of having external MGL scripts, it is not recommended to place them inside the same location as where the embedded scripts are extracted, since they could be accidentally overwritten or deleted by the user; they should be separated in a folder which can be specified in the form of an absolute or relative path using this command.
+% \begin{center}
+%   \begin{tabular}{l}
+%     \hline\\[-0.75em]
+%     |\mglpaths|\marg{List of external MGL scripts paths/}\\[0.25em]
+%     \hline
+%   \end{tabular}
+% \end{center}
+% This command can be used many times or can be used to specify many paths at once. In the case of using it many times, each call will add the new directory to the list of searching paths; if it is used to specify many paths at once, they must be separated by commas.
+%
+% \subsection{Environments for MGL code embedding}
+% \DescribeEnv{mgl}\noindent The main environment defined by \textsf{\mglTeX} is |mgl|. It extracts its contents to a main script, called \meta{name}.mgl, where \meta{name} stands for a name specified by the user with the |\mglname| command (see below), or the name of the \LaTeX{} document being executed otherwise; this script is compiled, and the corresponding image is included.
+% \begin{center}
+%   \begin{tabular}{l}
+%     \hline\\[-0.75em]
+%     |\begin{mgl}|\oarg{key-val list}\\[0.5em]
 %       \hss\meta{MGL code}\hss\\[0.5em]
-%     |\end{mglcode}|\\[0.25em]
+%     |\end{mgl}|\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% \DescribeEnv{mglscript} The code within |mglscript| is written verbatim to a script whose name is specified as mandatory argument, but no image is produced. It is useful for creation of MGL scripts which can be later post-processed by another package, like \textsf{listings}.
+% Here, \meta{key-val list} can have the same optional arguments as the |\includegraphics| command from the \textsf{graphicx} package, plus two additional ones, |imgext|, which can be used to specify the extension to save the graphic, and |label|, which can be used to indicate a name for the corresponding graphic (otherwise, an automatic naming will be applied). The \meta{MGL code} doesn't need to contain any specific instruction to create the image since \textsf{\mglTeX} takes care of that.
+%
+% \DescribeEnv{mgladdon} This environment adds its contents to the document's main script, but it doesn't produce any image. It doesn't require any kind of arguments. It is useful to add ``complementary code'', like loading of dynamic libraries, set default size for the graphics, etc.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\begin{mglscript}|\marg{script\_name}\\[0.5em]
+%     |\begin{mgladdon}|\\[0.5em]
 %       \hss\meta{MGL code}\hss\\[0.5em]
-%     |\end{mglscript}|\\[0.25em]
+%     |\end{mgladdon}|\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% \DescribeEnv{mglfunc} This is used to define MGL functions within the general script \meta{document}.mgl. It takes one mandatory argument, which is the name of the function, plus one optional argument, which specifies the number of arguments of the function. The environment needs to contain only the body of the function, since the lines ``func \meta{function\_name} \meta{number of arguments}'' and ``return'' are appended automatically at the beginning and the end, respectively. The res [...]
+%
+% \DescribeEnv{mglfunc} Is used to define MGL functions within the document's main script. It takes one mandatory argument, which is the name of the function, plus one optional argument, which specifies the number of arguments of the function (the default is $0$). The environment needs to contain only the body of the function, since the lines ``func \meta{function\_name} \meta{number of arguments}'' and ``return'' are appended automatically at the beginning and the end, respectively. The [...]
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
@@ -179,74 +330,64 @@
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% \DescribeEnv{mglcommon} This is used to create a common ``setup'' script that will be executed together with each of the other scripts. It is useful to define constants, parameters, etc. that will be available to every script. 
+%
+% \DescribeEnv{mglcode} It has the same function as the |mgl| environment, but the corresponding code is written to a separate script, whose name is specified as mandatory argument. It accepts the same optional arguments as |mgl|, except, of course, the |label| option.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\begin{mglcommon}|\\[0.5em]
+%     |\begin{mglcode}|\oarg{key-val list}\marg{script\_name}\\[0.5em]
 %       \hss\meta{MGL code}\hss\\[0.5em]
-%     |\end{mglcommon}|\\[0.25em]
+%     |\end{mglcode}|\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% For example, one could make
-% \begin{verbatim}
-% \begin{mglcommon}
-% define gravity 9.81 # [m/s^2]
-% \end{mglcommon}
-% \end{verbatim}
-% to make the constant \emph{gravity} available to every script.
-% 
-% Observe this environment should be used only to define constants, parameters and things like that, but not graphical objects like axis or grids, because every image created with the |mgl| environment clears every graphical object before creating the image.\footnote{This problem occurs only with the \texttt{mgl} environment, so you could use \texttt{mglcommon} to create many graphics with the same axis, grid, etc., with environments like \texttt{mglcode}, but in that case the best optio [...]
-% 
-% \DescribeEnv{mglsignature} This environment is used to declare a signature (or commentary) that will be included at the beginning of every script generated by \mglTeX. It is verbatim-like environment, so no \LaTeX{} cammand will be executed, but copied literally. However, the default signature is ``This script was generated from \meta{document}.mgl on date \meta{today}''.
+%
+% \DescribeEnv{mglscript} The code within |mglscript| is written to a script whose name is specified as mandatory argument, but no image is produced. It is useful for creation of MGL scripts which can be later post-processed by another package, like \textsf{listings} or \textsf{pygments}.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\begin{mglsignature}|\\[0.5em]
-%       \hss\meta{Signature for MGL scripts}\hss\\[0.5em]
-%     |\end{mglsignature}|\\[0.25em]
+%     |\begin{mglscript}|\marg{script\_name}\\[0.5em]
+%       \hss\meta{MGL code}\hss\\[0.5em]
+%     |\end{mglscript}|\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% \DescribeEnv{mglcomment} This environment is used to embed commentaries in the \LaTeX{} document. The commentary won't appear in the case of the user passing the option |nocomments| to the package, but it will be written \emph{verbatim} is the user passes the option |comments|.
+%
+% \DescribeEnv{mglcommon} This is used to create a common ``setup'' script to define constants, parameters, etc. that will be available to the others.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\begin{mglcomment}|\\[0.5em]
-%       \hss\meta{Commentary}\hss\\[0.5em]
-%     |\end{mglcomment}|\\[0.25em]
+%     |\begin{mglcommon}|\\[0.5em]
+%       \hss\meta{MGL code}\hss\\[0.5em]
+%     |\end{mglcommon}|\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% In the case of the user allowing commentaries, this will result in the appearance of the following commentary in the \LaTeX{} document:
-% \begin{center}
-% \makeatletter
-% \verbatim at font
-% \makeatother
-% <------------------ MGL comment ------------------>\\
-% \meta{Commentary}\\
-% <------------------ MGL comment ------------------>\\
-% \end{center}
-% 
+% If called more than once, it will overwrite the setup code. Also note that it should be used only to define constants, parameters and things like that, but not graphical objects like axis or grids, because the |mgl| environment clears every graphical object before creating the image.\footnote{This problem occurs only with the \texttt{mgl} environment, so you could use \texttt{mglcommon} to create many graphics with the same axis, grid, etc., with environments like \texttt{mglcode}, but [...]
+%
+% For example, one could write
+% \begin{quote}
+%   |\begin{mglcommon}|\\
+%   |define gravity 9.81 # [m/s^2]|\\
+%   |\end{mglcommon}|
+% \end{quote}
+% to make the constant \emph{gravity} available to every script.
+%
 % \subsection{Fast creation of graphics}
-% \noindent\textsf{\mglTeX} defines a convenient way to work with many graphics that have exactly the same settings (for example, same angles of rotation, same type of grid, etc.): instead of writing repetitive code every time it's needed, it can be stored in memory with the |mglsetup| environment, and then can be used when needed with the |\mglplot| command.
-% 
-% \DescribeEnv{mglsetup} This environment stores its contents in memory for later use. It accepts one optional argument, which is a keyword (name) to be associated to the corresponding block of code, so different blocks of code can be stored with different names.
+% \noindent\textsf{\mglTeX} defines a convenient way to work with many graphics that have exactly the same settings (same rotation angles, same type of grid, same lighting, etc.): instead of writing repetitive code every time it's needed, it can be stored inside a |mglsetup| environment, and then can be used when needed with the |\mglplot| command.
+%
+% \DescribeEnv{mglsetup} This environment is defined as a special case of the |mglfunc| environment. It accepts one mandatory argument, which is a keyword (name) associated to the corresponding block of code (MGL function body).
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\begin{mglsetup}|\oarg{keyword}\\[0.5em]
+%     |\begin{mglsetup}|\marg{keyword}\\[0.5em]
 %       \hss\meta{MGL code}\hss\\[0.5em]
 %     |\end{mglsetup}|\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% \DescribeMacro{\mglplot} This command is used for fast generation of graphics with default settings, and can be used in parallel with the |mglsetup| environment. It accepts one mandatory argument which consists of MGL instructions, separated by the symbol ``:'', which can span through various text lines. It also accepts the same optional arguments as the |mgl| environment, plus an additional one, called |settings|, which can be used to specify a keyword used in a |mglsetup| environment [...]
+%
+% \DescribeMacro{\mglplot} This command is used for fast generation of graphics with default settings, and can be used in parallel with the |mglsetup| environment. It accepts one mandatory argument which consists of MGL instructions, separated by the symbol ``:'', and can span through various text lines. It accepts the same optional arguments as the |mgl| environment, plus two additional ones, called |setup| and |separator|. The |setup| option specifies a keyword associated to a |mglsetu [...]
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
@@ -254,73 +395,141 @@
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
+%
 % \subsection{Verbatim-like environments}
-% \DescribeEnv{mglblock}\noindent It writes its contents \emph{verbatim} to a file, whose name is given as mandatory argument, and then it also typesets its contents on the \LaTeX{} document, numbering each line of code.
+% \noindent The main purpose of these environments is to typeset their contents to the \LaTeX{} document, elegantly separated from the rest of the text. They have two versions: an unstarred version which can be listed later with the |\listofmglscripts| command (see below), and a starred version which won't be listed.
+%
+% Although these environments are intended to mimic the behavior of the |verbatim| environment from \LaTeX{}, there is an important difference, namely, long lines will be broken when the page margin is reached. This intended behavior is set because a language like MGL can easily have very long lines of code, like textual formulas, vectors input as lists of values, etc. Of course, no hyphenation will be performed, but the code will be indented in the second, third, etc. continuation lines [...]
+%
+% \DescribeEnv{mglblock}\DescribeEnv{mglblock*} Besides typesetting its contents to the document, |mglblock| creates a script whose name is specified as mandatory argument. It also accepts one optional argument, called |lineno|, whose default value is |true|, used to activate (|lineno=true|) or deactivate (|lineno=false|) line numbering inside the environment. The default behavior is to number each line of code.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\begin{mglblock}|\marg{script\_name}\\[0.5em]
+%     |\begin{mglblock}|\oarg{lineno value}\marg{script\_name}\\[0.5em]
 %       \hss\meta{MGL code}\hss\\[0.5em]
 %     |\end{mglblock}|\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% \DescribeEnv{mglverbatim} It typesets its contents to the \LaTeX{} document, numbering each line of code.
+% The ouput looks like this:
+% \begin{quote}
+%   \makeatletter
+%   \MGL at set@script at name{example_script}%
+%   \refstepcounter{MGL at verb@script at no}%
+%   \addcontentsline{lms}{MGL at script}{\protect\numberline{\theMGL at verb@script at no.}{\ttfamily\protect\detokenize{\MGL at script@name.mgl}}}%
+%   \setcounter{MGL at line@no}{0}%
+%   \list{\mgllinenostyle\arabic{MGL at line@no}.}{}%
+%   \MGL at set@pseudo at verb@env
+%   \fboxrule=\mgllinethickness%
+%   \item[\MGL at line@sep]\fbox{\bfseries\ttfamily\expandafter\detokenize\expandafter{\MGL at script@name.mgl}}\hskip\labelsep\MGL at line@sep\par\par%
+%   \stepcounter{MGL at line@no}%
+%   \item new x 50 40 '0.8*sin(pi*x)*sin(pi*(y+1)/2)'
+%   \stepcounter{MGL at line@no}%
+%   \item new y 50 40 '0.8*cos(pi*x)*sin(pi*(y+1)/2)'
+%   \stepcounter{MGL at line@no}%
+%   \item new z 50 40 '0.8*cos(pi*(y+1)/2)'
+%   \stepcounter{MGL at line@no}%
+%   \item title 'Parametric surface' : rotate 50 60 : box
+%   \stepcounter{MGL at line@no}%
+%   \item surf x y z 'BbwrR'
+%   \item[\MGL at line@sep]\hskip-\labelsep\MGL at line@sep%
+%   \endlist%
+% \end{quote}
+%
+% \DescribeEnv{mglverbatim}\DescribeEnv{mglverbatim*} This environment only typesets its contents to the \LaTeX{} document without creating any script. It accepts the |lineno| option, with default value |true|, plus an one called |label|, intended to specify a name associated to the corresponding code. The default behavior is to number each line of code.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\begin{mglverbatim}|\\[0.5em]
+%     |\begin{mglverbatim}|\oarg{key-val list}\\[0.5em]
 %       \hss\meta{MGL code}\hss\\[0.5em]
 %     |\end{mglverbatim}|\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% \subsection{Working with external scripts}
-% \noindent In case of having MGL scripts in their own files, \textsf{\mglTeX} can work with them without needing to transcript them to the \LaTeX{} document.
-% 
-% \DescribeMacro{\mglgraphics} This command takes one mandatory argument, which is the name of an external MGL script, which will be automatically executed, and the resulting image will be included. The same optional arguments as the |mgl| environment are accepted.
+% The output looks like this without |label|:
+% \begin{quote}
+%   \makeatletter
+%   \setcounter{MGL at line@no}{0}%
+%   \list{\mgllinenostyle\arabic{MGL at line@no}.}{}%
+%   \MGL at set@pseudo at verb@env
+%   \fboxrule=\mgllinethickness%
+%   \MGL at set@script at name{\mglverbatimname}%
+%   \item[\MGL at line@sep]\hskip-\labelsep\MGL at line@sep%
+%   \refstepcounter{MGL at verb@script at no}%
+%   \addcontentsline{lms}{MGL at script}{\protect\numberline{\theMGL at verb@script at no.}{\ttfamily\protect\detokenize{\MGL at script@name}}}%
+%   \stepcounter{MGL at line@no}%
+%   \item new x 50 40 '0.8*sin(pi*x)*sin(pi*(y+1)/2)'
+%   \stepcounter{MGL at line@no}%
+%   \item new y 50 40 '0.8*cos(pi*x)*sin(pi*(y+1)/2)'
+%   \stepcounter{MGL at line@no}%
+%   \item new z 50 40 '0.8*cos(pi*(y+1)/2)'
+%   \stepcounter{MGL at line@no}%
+%   \item title 'Parametric surface' : rotate 50 60 : box
+%   \stepcounter{MGL at line@no}%
+%   \item surf x y z 'BbwrR'
+%   \item[\MGL at line@sep]\hskip-\labelsep\MGL at line@sep%
+%   \endlist%
+% \end{quote}
+% \noindent If a |label| is specified, the output will look exactly as that of the |mglblock| environment.
+%
+% \DescribeEnv{mglcomment} This environment is used to embed commentaries in the \LaTeX{} document. The commentary won't be visible in the case of the user passing the option |nocomments| to the package, but it will be typeset \emph{verbatim} to the document if the user passes the option |comments|.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\mglgraphics|\oarg{key-val list}\marg{script\_name}\\[0.25em]
+%     |\begin{mglcomment}|\\[0.5em]
+%       \hss\meta{Commentary}\hss\\[0.5em]
+%     |\end{mglcomment}|\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% \DescribeMacro{\mglinclude} This command takes one mandatory argument, which is the name of an external MGL script, which will be automatically transcript \emph{verbatim} on the \LaTeX{} document, and each line of code will be numerated.
+% If the user requests visible commentaries, this will result in the appearance of something like the following in the \LaTeX{} document:
+% \begin{quote}
+%   \makeatletter
+%   \list{}{}%
+%   \MGL at set@pseudo at verb@env
+%   \item\hskip-\labelsep<\MGL at dash@sep\mglcommentname\MGL at dash@sep>%
+%   \item This is a MGL commentary
+%   \item\hskip-\labelsep<\MGL at dash@sep\mglcommentname\MGL at dash@sep>%
+%   \endlist%
+% \end{quote}
+%
+% \subsection{Working with external scripts}
+% \noindent External scripts exist in their own files, independently of the \LaTeX{} document ---for example, a script sent by a colleague, a script created before the actual writing of the \LaTeX{} document, etc. \textsf{\mglTeX} provides convenient ways to deal with external scripts, as if they were embedded. It must be noted, however, that the package works on the suposition that these scripts are in their final version, so no change detection is performed on them. If a external scrip [...]
+%
+% \DescribeMacro{\mglinclude}\DescribeMacro{\mglinclude*} This command is the equivalent of the |mglverbatim| environment for external scripts. It takes one mandatory argument, which is the name of a MGL script, which will be automatically transcript \emph{verbatim} on the \LaTeX{} document. It accepts the same optional arguments as the |\mglgraphics| command, plus the |lineno| option to activate/deactivate line numbering. There are unstarred version of this command will be listed if |\l [...]
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\mglinclude|\marg{script\_name}\\[0.25em]
+%     |\mglinclude|\marg{script\_name}\oarg{lineno boolean value}\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% \subsection{Additional commands}
-% \DescribeMacro{\mgldir}\noindent This command can be used to specify where \textsf{\mglTeX} should create the MGL scripts and corresponding images. This is useful, for example, to avoid a lot of scripts and images from polluting the current directory.
+%
+% \DescribeMacro{\mglgraphics} This takes one mandatory argument, which is the name of an external MGL script, which will be automatically executed, and the resulting image will be included. The same optional arguments as the |\includegraphics| command are accepted, plus the |imgext| option to specify the extension of the resulting graphic, and an additional option, |path|, which can be used to specify the location of the script.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\mgldir|\marg{directory}\\[0.25em]
+%     |\mglgraphics|\oarg{key-val list}\marg{script\_name}\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% This command must be used in the preamble of the document, since the first MGL script is created at the moment of the |\begin{document}| command; trying to use it somewhere else will issue an error. On the other hand, it is the responsibility of the user to create the \meta{directory}, since \textsf{\mglTeX} won't do it automatically.
-% 
-% \DescribeMacro{\mglquality} This command can be used to specify the quality for the graphics created with \mglTeX. An info message specifying the characteristics of the chosen quality is printed in the .log file.
+%
+% \subsection{Additional commands}
+% \DescribeMacro{\mglname}\noindent This command can be used in the preamble of the document to indicate the name of the main script, passed as mandatory argument. If used after the |\begin{document}| command, it will force the closure of the current main script, create the corresponding graphics, and start a new script with the specified name.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\mglquality|\marg{quality}\\[0.25em]
+%     |\mglname|\marg{main\_script\_name}\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% The available qualities are described below:
+%
+% The use of this command is encourage when writing large documents, like books or thesis, to create a main script per document block (section, chapter, part, etc.). Since the |mgl| environment and the |\mglplot| command use an internal counter to automatically name scripts, unless the |label| option is used; if a new script is added this way to the document, it will alter the original numbering, causing \textsf{\mglTeX} to recompile the scripts from that point on (for more details, read [...]
+%
+% \DescribeMacro{\mglquality} The default quality for the creation of MGL graphics can be specified with this command. Its effect is local, meaning that the new quality will be applied from the point this command is used on. An info message will be printed in the |.log| file indicating the characteristics of the chosen value, according to the following table:
 % \begin{center}
-%   \begin{tabular}{cl}
+%   \DeleteShortVerb{\|}
+%   \begin{tabular}{|c|l|}
 %     \hline
 %     Quality & Description\\
 %     \hline
@@ -339,14 +548,33 @@
 %     \hline
 %     $6$ & High quality, direct bitmap drawing (low memory usage)\\
 %     \hline
-%     $7$ & High quality with 3d primitives, direct bitmap drawing (not implemented yet)\\
+%     $7$ & High quality with 3d primitives, direct bitmap drawing\\
+%     & (not implemented yet)\\
 %     \hline
 %     $8$ & Draw dots instead of primitives (extremely fast)\\
 %     \hline
 %   \end{tabular}
+%   \MakeShortVerb{\|}
 % \end{center}
-% 
-% \DescribeMacro{\mgltexon} This command has the same effect as the package option |on|, i.e., create all the scripts and corresponding graphics, but its effect is local, meaning that it work only from the point it is used on.
+% If a non available quality is chosen, it will be changed to $2$ (the default), and a warning message will be issued for the user.
+% \begin{center}
+%   \begin{tabular}{l}
+%     \hline\\[-0.75em]
+%     |\mglquality|\marg{quality value}\\[0.25em]
+%     \hline
+%   \end{tabular}
+% \end{center}
+%
+% \DescribeMacro{\mglscale} Can be used to specify the default scaling for the creation of MGL graphics (1 is normal scaling, 2 is twice as bigger, etc.). Its effect is local, meaning that the new scaling will be applied from the point this command is used on. Any non negative value can be specified.
+% \begin{center}
+%   \begin{tabular}{l}
+%     \hline\\[-0.75em]
+%     |\mglscale|\marg{scale value}\\[0.25em]
+%     \hline
+%   \end{tabular}
+% \end{center}
+%
+% \DescribeMacro{\mgltexon} This command has the same effect as the package option |on|, i.e., create all the scripts and corresponding graphics, but its effect is local.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
@@ -354,8 +582,8 @@
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% \DescribeMacro{\mgltexoff} This command has the same effect as the package option |off|, i.e., DO NOT create the scripts and corresponding graphics, and include images anyway, but its effect is also local, meaning that it work only from the point it is used on.
+%
+% \DescribeMacro{\mgltexoff} This command has the same effect as the package option |off|, i.e., DO NOT create the scripts and corresponding graphics, but its effect is local.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
@@ -363,18 +591,19 @@
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% Observe the commands |\mgltexon| and |\mgltexoff| can be used to save compilation time of a document. For example, when writing an article, if the graphics of the first section are already in final version, instead of compilling them every time \LaTeX{} is called, they can be created only once, and then the section can be wrapped with |mgltexoff| and |mgltexon|, so the graphics do not get recompiled again (wasting time), but only included.
-% 
-% \DescribeMacro{\mglcomments} This command has the same effect as the package option |comments|, i.e., show all the commentaries contained int the |mglcomment| environments, but its effect is local, meaning that it work only from the point it is used on.
+%
+% Observe that |\mgltexon| and |\mgltexoff| can be used to save time when writing a document, wrapping a section with them, avoiding recompilation of the corresponding scripts.
+%
+% \DescribeMacro{\mglcomments} This command has the same effect as the package option |comments|, i.e., show all the commentaries contained within |mglcomment| environments, but its effect is local.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
-%     |\mglcoments|\\[0.25em]
+%     |\mglcomments|\\[0.25em]
 %     \hline
 %   \end{tabular}
 % \end{center}
-% \DescribeMacro{\mglnocomments} This command has the same effect as the package option |nocomments|, i.e., DO NOT show the contentsof the |mglcomment| environments, but its effect is also local, meaning that it work only from the point it is used on.
+%
+% \DescribeMacro{\mglnocomments} This command has the same effect as the package option |nocomments|, i.e., DO~NOT show the contents of |mglcomment| environments, but its effect is also local.
 % \begin{center}
 %   \begin{tabular}{l}
 %     \hline\\[-0.75em]
@@ -382,9 +611,14 @@
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
-% Observe the commands |\mglcomments| and |\mglnocomments| can be used to activate/deactivate commentaries on the document: just like \LaTeX{} commentaries, but with the possibilty of making them visible/invisible. This feature could be used, for example, to show remainders or commentaries for readers of test versions of an article.
-% 
+%
+% \DescribeMacro{\listofmglscripts} Opens a new section or chapter---depending on the \LaTeX{} class used---, where all the scripts that have been transcript in the document with the unstarred versions of the |mglblock| and |mglverbatim| environments, and the |\mglinclude| command, are listed. In case a |mglverbatim| is used, but no |label| is specified, the default name to display is specified by the |\mglverbatimname| macro (see below), otherwise, the corresponding label is typeset. Th [...]
+% \begin{center}
+%   \begin{minipage}{0.9\textwidth}
+%     \listofmglscripts
+%   \end{minipage}
+% \end{center}
+%
 % \DescribeMacro{\mglTeX} This command just pretty-prints the name of the package.
 % \begin{center}
 %   \begin{tabular}{l}
@@ -393,1552 +627,2001 @@
 %     \hline
 %   \end{tabular}
 % \end{center}
-% 
+%
+% \DescribeMacro{\mglTeXwVer} This command just pretty-prints the name of the package with its version in a coherent manner, separated by a an unbreakable space.
+% \begin{center}
+%   \begin{tabular}{l}
+%     \hline\\[-0.75em]
+%     |\mglTeXwVer|\\[0.25em]
+%     \hline
+%   \end{tabular}
+% \end{center}
+%
 % \subsection{User-definable macros}
-% \noindent There are two macros that the user is allowed to modify:
-% 
-% \DescribeMacro{\mgltexsignature}
-% As an alternative to the |mglsignature| environment for declaring signatures, the user can manually redefine the signature macro |\mgltexsignature|, according to the following rules:
-% \begin{itemize}
-%   \item The positions of the comment signs for the MGL language have to be manually specified in the signature using the |\mglcomm| macro.
-%   \item The new-line character is declared as ``|^^J|''.
-%   \item A percent sign (|%|) has to be added at the end of every physical line of |\mgltexsignature|, otherwise an inelegant space at the beginning of every line will appear.
-%   \item Any \LaTeX{} command can be used in this case.
-% \end{itemize}
-% For example, the default signature:
+% \noindent There are macros that the user is allowed to modify in order to customize some aspects of the behavior of \textsf{\mglTeX}. For example, if writing in spanish, french or russian, the user would like to modify the name of the common script, the words typeset in the separator lines of MGL commentaries, the name of the list of MGL scripts, etc.
+%
+% \DescribeMacro{\mglcommonscriptname} It is the name for the common script that takes the contents of the |mglcommon| environment. The default name is defined by
 % \begin{quote}
-%   \mglcomm\\
-%   \mglcomm\ This script was generated from \meta{document}.mgl on date \meta{today}\\
-%   \mglcomm
+%   |\def\mglcommonscriptname{MGL_common_script}|
 % \end{quote}
-% can be achieved with
-% \begin{verbatim}
-%   \def\mgltexsignature{%
-%     \mglcomm^^J%
-%     \mglcomm\ This script was generated from \jobname.mgl on date \today^^J%
-%     \mglcomm%
-%   }
-% \end{verbatim}
-% 
-% \DescribeMacro{\mglcommonscript}
-% It is the name for the common script that takes the contents of the |mglcommon| environment. For example, the default name of the script (``mgl\_common\_script'') is defined by doing
-% \begin{verbatim}
-%   \def\mglcommonscript{mgl_common_script}
-% \end{verbatim}
-% 
-% \subsection{Behavior of \textsf{\mglTeX}}
-% \noindent As a convenient feature, the environments |mglcode|, |mglscript| and |mglblock| will automatically check if they are being used to create different scripts with the same name, in which case \textsf{\mglTeX} will issue a warning; however, if one of these environments overwrite an external script (not embedded in the document), it won't be noticed. Likewise, the user will be warned if the environment |mglfunc| is being used to create different MGL functions with the same name.
-% 
-% When \textsf{\mglTeX} is unable to find a graphic that is supposed to include, instead of producing an error, it will warn the user about it, and will display a box in the corresponding position of the document, like the following one:
-% \begin{center}
-%   \framebox[10em]{
-%     \centering
-%     \bfseries\Huge
-%     \vbox{MGL\\image\\not\\found}
-%   }
-% \end{center}
-% Notice that the first time \LaTeX{} is executed, many of these boxes will appear in the document because the graphics from the MGL scripts are created, but not all are included (until \LaTeX{} is run for the second time).
-% \section{Warning for the user}
-% \mglTeX{} assummes that the |\begin{|\meta{environment}|}| and |\end{|\meta{environment}|}| commands will occupy their own physical line of \LaTeX{} code. So the correct form to use the environments is the following:
-% \begin{verbatim}
-%   \begin{<environment>}
-%     <contents of the environment>
-%   \end{<environment>}
-% \end{verbatim}
-% The following forms of use could cause problems:
-% \begin{verbatim}
-%   \begin{<environment>}<contents of the environment>\end{<environment>}
-% \end{verbatim}
-% \begin{verbatim}
-%   \begin{<environment>}<contents of the environment>
-%   \end{<environment>}
-% \end{verbatim}
-% \begin{verbatim}
-%   \begin{<environment>}
-%   <contents of the environment>
-%   \end{<environment>}<text>
-% \end{verbatim}
-% One of the reasons for this is that some of the environments in \mglTeX{} are programmed to ignore the empty space following the |\begin{|\meta{environment}|}|, which would cause an inelegant empty line in the script, so the first two incorrect forms would cause \mglTeX{} to ignore a complete line of code. The other reason is the method used to detect the |\end{|\meta{environment}|}| command, which could fail in the case of the third incorrect use.
-% \StopEventually{\PrintChanges\PrintIndex}
-% \section{Implementation}
-% \noindent This section documents the implementation of \mglTeX. Its purpose is to facilitate the comprehension and maintenance of the package.
-% \subsection{Initialization}
-% \noindent The \textsf{keyval} package is loaded to facilitate the declaration of \meta{key}=\meta{value} options for commands and environments; the \textsf{graphicx} package is loaded in order to manipulate and include the images created by MGL code.
-%    \begin{macrocode}
-
-\RequirePackage{keyval}
-\RequirePackage{graphicx}
-%    \end{macrocode}
-
-% We declare the options of the package. The first two are |draft| and |final|, which are passed directly to the \textsf{graphicx} package.
-%    \begin{macrocode}
-
-\DeclareOption{draft}{%
-  \PassOptionsToPackage{\CurrentOption}{graphicx}%
+%
+% \DescribeMacro{\mglcommentname} This macro expands to the words typeset before and after a MGL commentary, in the middle of the separator lines. The default words are set by
+% \begin{quote}
+%   |\def\mglcommentname{MGL commentary}|
+% \end{quote}
+%
+% \DescribeMacro{\listofmglscriptsname} This is the name of the section/chapter created by the command |\listofmglscripts|. The default is set by
+% \begin{quote}
+%   |\def\listofmglscriptsname{List of MGL scripts}|
+% \end{quote}
+%
+% \DescribeMacro{\mglverbatimname} This is the default name to be printed in the list of MGL scripts for scripts created with the unstarred version of |mglverbatim|, for which a |label| hasn't been specified. The default is
+% \begin{quote}
+%   |\def\mglverbatimname{(Unnamed MGL script)}|
+% \end{quote}
+%
+% \DescribeMacro{\mgllinenostyle} Indicates the style for typeseting the line numbers inside the |mglblock| and |mglverbatim| environments, and the |\mglinclude| command. The default is
+% \begin{quote}
+%   |\def\mgllinenostyle{\footnotesize}|
+% \end{quote}
+%
+% \DescribeMacro{\mgldashwidth} The dashes of the separator lines for the |mglcomment| environment are contained inside boxes whose width is specified by this macro. For practical purposes, this dimension can be used to increase/decrease the space between the dashes. The default is
+% \begin{quote}
+%   |\mgldashwidth=0.75em|
+% \end{quote}
+% It is recommended to use font-dependent units for this dimension, like |em|, just in case the font is changed later, so it adapts to the new metric.\footnote{A rule of thumb is to use \texttt{em} units for horizontal dimensions, and \texttt{ex} units for vertical dimensions.}
+%
+% \DescribeMacro{\mgllinethickness} It is the thickness of the separator lines for the |mglblock| and |mglverbatim| environments, and the |\mglinclude| command. The default is
+% \begin{quote}
+%   |\mgllinethickness=0.25ex|
+% \end{quote}
+% It is also recommended to use font-dependent units for this dimension, like |ex|.
+%
+% \DescribeMacro{\mglbreakindent} \textsf{\mglTeX} allows line breaking inside verbatim-like environments and commands. When a line of code is broken, |\mglbreakindent| is the indentation of the second, third, etc. continuation lines. The default is
+% \begin{quote}
+%   |\mglbreakindent=1em|
+% \end{quote}
+% Once more, font-dependent units are encourage.
+%
+% \section{Behavior of \textsf{\mglTeX}}
+% \noindent \textsf{\mglTeX} has many convenient features designed for the comfort of the user, and to reduce the possibility of unintentional malfunction.
+% \subsection{Creation and inclusion of MGL scripts and graphics}
+% \noindent All environments and commands for MGL code embedding check for multiple scripts with the same name. This detection is performed in order to avoid unintentionally overwriting scripts, or creating confusion with different verbatim chunks of code with the same name. If such multiple naming is found a warning will be issued. However, external scripts are supposed to be responsibility of the user, so no detection of multiple naming will be performed on them.
+%
+% When \textsf{\mglTeX} is unable to find a graphic that is supposed to include, instead of producing an error, it will warn the user about it, and will display a box in the corresponding position of the document like the one shown in figure~\ref{fig: MGL image not found box}.
+% \begin{figure}[!ht]
+%   \centering
+%   \fbox{%
+%     \centering%
+%     \bfseries\Huge%
+%     \begin{tabular}{c}MGL\\image\\not\\found\end{tabular}%
+%   }
+%   \caption{This box is shown by \textsf{\mglTeX} instead of a graphic that should be included, but can't be found.}\label{fig: MGL image not found box}
+% \end{figure}
+% Notice that the first time or even the second time \LaTeX{} is executed, many of these boxes will appear in the document, because the first run detects changes on scripts, while the second run creates the graphics, but not all of them are included, until \LaTeX{} is run for the third time.
+%
+% Likewise, when a script isn't found, a warning will be issued for the user, and, if that script was meant to be included in the document by a |\mglinclude| command, the box shown in figure~\ref{fig: MGL script not found box} will be displayed instead.
+% \begin{figure}[!ht]
+%   \centering
+%   \fbox{%
+%     \centering%
+%     \bfseries\Huge%
+%     \begin{tabular}{c}MGL\\script\\not\\found\end{tabular}%
+%   }
+%    \caption{This box is shown by \textsf{\mglTeX} instead of a script that should be included, but can't be found.}\label{fig: MGL script not found box}
+% \end{figure}
+%
+% When \textsf{\mglTeX} is |off| no MGL graphics will be generated nor will be included, but instead, a box like the one of figure~\ref{fig: mglTeX is off box} will be shown.
+% \begin{figure}[!ht]
+%   \centering
+%   \fbox{%
+%     \centering%
+%     \bfseries\Huge%
+%     \begin{tabular}{c}\mglTeX\\is off;\\no image\\included\end{tabular}%
+%   }
+%   \caption{This box is shown instead of an image when \textsf{\mglTeX} is \texttt{off}.}\label{fig: mglTeX is off box}
+% \end{figure}
+%
+% \subsection{Recompilation-decision algorithm}\label{subsection: recompilation decision}
+% \noindent \textsf{\mglTeX} has the builtin capacity of detecting changes in MGL scripts, so that a script is recompiled only when it has changed, not every time \LaTeX{} is executed. This saves a lot of time, since most of the compilation time of a document is spent on the creation (and conversion to another format, if necessary) of the graphics.
+%
+% This is how the recompilation-decision is performed: When \textsf{\mglTeX} finds an environment or command meant to create a graphic, it checks if the command |\MGL@@@|\meta{script} is defined, where \meta{script} is the name of the current script. If the command is undefined, this means the script has changed, so the corresponding code is transcript to the file \meta{script}.mgl, and the command |\MGL@@@|\meta{script} is defined. If the command is already defined, this means the scrip [...]
+%
+% \begin{figure}[ht!]
+%   \centering
+%   \includegraphics[scale=0.35]{Recompilation_decision}
+%   \caption{The algorithm used by \textsf{\mglTeX} to decide which scripts recereate/recompile.}\label{fig: recompilation decision}
+% \end{figure}
+%
+% The recompilation-decision mechanism can be fooled, however. The |mgl| environment and |\mglplot| command have the ability to automatically name scripts by means of the use of an internal counter, unless the |label| option is specified. Suppose the user wants to add a new |mgl| environment or |\mglplot| command exactly after the $(n-1)$th script, so the $n$th script will be the newly added, while the old $n$th will be the new $(n+1)$th, and so on, altering the original numbering. This  [...]
+%
+% There are two ways to avoid this problem: The first one is to use the |label| option on the newly arrived; the second is to wrap a complete block of the document with the |\mgltexoff| and |\mgltexon| commands, avoiding recompilation and saving time. This last option will avoid the inclusion of the MGL graphics, so it is only recommended in case of the wrapped scripts being in their final version (not needing further modification), so there is no need of updating the corresponding graph [...]
+%
+% There are situations when recompilation of a script has to be forced. For example, if the default quality has changed, but the script hasn't, \textsf{\mglTeX} won't recreate the corresponding graphic by its own initiative, because it won't detect any changes in the code. In order to force recompilation, the image of the corresponding script can be deleted: \textsf{\mglTeX} will detect this abscence in the next \LaTeX{} run and recompile.
+%
+% \section{Acknowledgements}
+% \noindent \textsf{\mglTeX} was born as a small personal project. It has grown and mature under the constant suggestions and requests from Prof. Alexey Balakin.
+%
+% \section{Redistributing and modifying}
+% \noindent The \emph{source code} of \textsf{\mglTeX} (.sty, .dtx, and .ins files) can be redistributed and/or modified under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The \emph{documentation} of \textsf{\mglTeX} (.dvi, .ps, .pdf and other files) is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 
+%
+% \StopEventually{\PrintChanges\PrintIndex}
+%
+% \section{Implementation}
+% \noindent This section documents the complete implementation of \textsf{\mglTeX}. It's main purpose is to facilitate the understanding and maintanance of the package's code. For the following, we use ``|@|'' in the name of macros the user should not modify; the prefix ``|MGL|'' is used to simulate a namespace, so the macros from \textsf{\mglTeX} won't interfere with the ones from other packages.
+%
+% \subsection{Initialization}
+% \noindent We first define some macros that will serve different purposes on different parts of the package.
+% \begin{macro}{\MGL at TeX@ext}
+% Is used to determine whether the user has chosen to save graphics in \LaTeX/Tikz format.
+%    \begin{macrocode}
+\def\MGL at TeX@ext{.tex}
+%    \end{macrocode}
+% \end{macro}
+%
+% Now we declare the options |final| and |draft|, which are simply passed to the \textsf{graphicx} package.
+%    \begin{macrocode}
+
+\DeclareOption{draft}{%
+  \PassOptionsToPackage{\CurrentOption}{graphicx}%
 }
 \DeclareOption{final}{%
   \PassOptionsToPackage{\CurrentOption}{graphicx}%
 }
 %    \end{macrocode}
-% 
-% The next two options are |on| and |off|, where |on| indicates \mglTeX{} to create every script and every corresponding image every time \LaTeX{} is executed, while |off| tells not to do it, but to include the images anyway. First we declare a flag (boolean variable) |\@mgltex at on@| to know if the used passed the |on| or the |off| option.
+%
+% The next options are |on| and |off|. Since they are equivalent to the commands |\mgltexon| and |\mgltexoff|, respectively, instead of writing the same code twice (one time for the options and one time for the commands), we first define the commands and then make the options execute them. 
+% \begin{macro}{\mgltexon}
+% (Re)defines the commands to open, read, write and close scripts, and the command that includes MGL graphics.
 %    \begin{macrocode}
-\newif\if at mgltex@on@
+
+\def\mgltexon{%
+%    \end{macrocode}
+% \begin{macro}{\MGL at openout}
+% Opens a script for writing. It takes two arguments, the first being an output stream number, allocate by |\newwrite| (\TeX{} command), and the second being the path to the script.
+%    \begin{macrocode}
+  \def\MGL at openout##1##2{%
+    \immediate\openout##1="##2"%
+  }%
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MGL at openin}
+% Opens a script for reading. It takes two arguments, the first being an input stream number, allocate by |\newread| (\TeX{} command), and the second being the path to the script.
+%    \begin{macrocode}
+  \def\MGL at openin##1##2{%
+    \immediate\openin##1="##2"%
+  }%
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MGL at write}
+% Writes to a script opened with |\MGL at openout|. Its first argument is the output stream number of the script, and the second is the text to write.
+%    \begin{macrocode}
+  \def\MGL at write##1##2{%
+    \immediate\write##1{##2}%
+  }%
 %    \end{macrocode}
-% If the user passes the option |on|, |\@mgltex at on@| is true, and the command |\mgl at write| (which takes care of writing code to the scripts) is the normal \LaTeX{} |\immediate\write| commands;
-% \changes{v.2.0}{2014/11/15}{Add package options \texttt{on} and \texttt{off}}
+% \end{macro}
+% \begin{macro}{\MGL at read}
+% Reads one line from a script opened with |\MGL at openin|. Its first argument is the input stream number of the script, and the second is a variable where the read text will be stored. The variable is first initialized as empty; if the end of the script has been reached, then there is nothing to read, so it remains empty; otherwise, one line is read and stored in the variable, locally supressing any end line character (|\endlinechar=-1|).
 %    \begin{macrocode}
-\DeclareOption{on}{%
-  \@mgltex at on@true%
-  \def\mgl at write#1#2{%
-    \immediate\write#1{#2}%
+  \def\MGL at read##1##2{%
+    \def##2{}%
+    \ifeof##1\else%
+      \bgroup%
+      \endlinechar=-1%
+      \immediate\global\read##1 to ##2%
+      \egroup%
+    \fi%
+  }%
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MGL at closeout}
+% Closes a script opened with |\MGL at openout|, whose stream number is passed as argument.
+%    \begin{macrocode}
+  \def\MGL at closeout##1{%
+    \immediate\closeout##1%
   }
-}
 %    \end{macrocode}
-% if the user passes the option |off|, |\@mgltex at on@| is false, and the command |\mgl at write| does nothing (doesn't write to scripts).
+% \end{macro}
+% \begin{macro}{\MGL at closein}
+% Closes a script opened with |\MGL at openin|, whose stream number is passed as argument.
 %    \begin{macrocode}
-\DeclareOption{off}{%
-  \@mgltex at on@false%
-  \def\mgl at write#1#2{}%
-}
+  \def\MGL at closein##1{%
+    \immediate\closein##1%
+  }
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MGL at includegraphics}
+% This is a quite sophisticated command. It is in charge of including the graphics created by \textsf{\mglTeX}.
+%    \begin{macrocode}
+  \def\MGL at includegraphics{%
 %    \end{macrocode}
-% The next options are |comments| and |nocomments|, where |comments| indicates \mglTeX{} to show the comments included inside |\mglcomments| environments, while |nocomments| tells not to do it. First we create a flag that will indicate which of these options is passed by the user.
+% First checks if the image exists. Note the |\MGL at dir| and |\MGL at graphics@dir| macros are set by the user with the |\mgldir| and |\mglgraphicsdir| commands, respectively, while |\MGL at script@name| stores the name of the script ---and thus the image--- executed, and |\MGL at graph@ext| is the extension chosen by the user to save the graphics.
 %    \begin{macrocode}
-\newif\if at mgl@comments@
+    \IfFileExists{\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext}{%
 %    \end{macrocode}
-% If the user passes the option |comments|, |\@mgl at comments@| is true, and the |\mglcomments| environments print their contents;
-% \changes{v2.0}{2014/11/22}{Add package options \texttt{comments} and \texttt{nocomments}}
+% If the chosen extension is |.tex|, a \LaTeX/Tikz file has been created, which has to be simply included in the document; it will be automatically compiled by \LaTeX{}. (Observe we use the |\MGL at TeX@ext| macro defined above.)
+%    \begin{macrocode}
+      \ifx\MGL at graph@ext\MGL at TeX@ext%
+        \include{\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext}%
+%    \end{macrocode}
+% If the chosen extension is not |.tex|, a normal visual image has been created, so the |\includegraphics| command is invoked to deal with it. The options for this command (like |scale|, |angle|, etc.) are stored in the |\MGL at graph@keys| macro, which is defined by every environment or command that creates and compiles MGL scripts, according to the optional arguments the user has passed.
+%    \begin{macrocode}
+      \else%
+        \expandafter\includegraphics\expandafter[\MGL at graph@keys]{%
+          \MGL at dir\MGL at graphics@dir\MGL at script@name%
+        }%
+      \fi%
+    }{%
+%    \end{macrocode}
+% If the requested image doesn't exist, the issue a warning message for the user, and print a warning framed box (``\textbf{MGL image not found}'') in the place the image should occupy.
+%    \begin{macrocode}
+      \PackageWarning{mgltex}{MGL image "\MGL at script@name" not found}%
+      \fbox{%
+        \centering%
+        \bfseries\Huge%
+        \begin{tabular}{c}MGL\\image\\not\\found\end{tabular}%
+      }%
+    }%
+  }%
+%    \end{macrocode}
+% \end{macro}
+% And here ends the |\mgltexon| command.
 %    \begin{macrocode}
-\DeclareOption{comments}{%
-  \@mgl at comments@true%
 }
 %    \end{macrocode}
-% if the user passes the option |nocomments|, |\@mgl at comments@| is false, and the |\mglcomments| environments won't print their contents.
+% \end{macro}
+%
+% \begin{macro}{\mgltexoff}
+% (Re)defines the same commands as |\mgltexon| in such a way they accept the same arguments, but do nothing. The exception is |\MGL at includegraphics| which, instead of doing nothing, prints a warning framed box (``\textbf{\mglTeX{} is off; no image included}'').
 %    \begin{macrocode}
-\DeclareOption{nocomments}{%
-  \@mgl at comments@false%
+\def\mgltexoff{%
+  \PackageWarning{mgltex}{mglTeX is off}%
+  \def\MGL at openout##1##2{}%
+  \def\MGL at openin##1##2{}%
+  \def\MGL at write##1##2{}%
+  \def\MGL at read##1##2{}%
+  \def\MGL at closeout##1{}
+  \def\MGL at closein##1{}
+  \def\MGL at includegraphics{%
+    \fbox{%
+      \centering%
+      \bfseries\Huge%
+      \begin{tabular}{c}\mglTeX\\is off;\\no image\\included\end{tabular}%
+    }%
+  }%
 }
 %    \end{macrocode}
-% We then indicate the supported extensions to save the images created by the package, and the corresponding package options. The chosen extension is stored in the |\mgl at image@ext| macro for future use.
+% \end{macro}
+% Now we can declare the package options |on| and |off| so that they execute |\mgltexon| and |\mgltexoff|, respectively.
+%    \begin{macrocode}
+\DeclareOption{on}{\mgltexon}
+\DeclareOption{off}{\mgltexoff}
+%    \end{macrocode}
+%
+% The options |nocomments| and |comments| are equivalent to the commands |\mglnocomments| and |\mglcomments|, respectively, so, following the same logic as before, we first define the commands and make the options execute them.
+% \begin{macro}{\@MGL at comments@}
+% We will need a boolean switch to activate/deactivate commentaries later.
 %    \begin{macrocode}
 
-\DeclareGraphicsExtensions{%
-  .png,.eps,.jpg,.jpeg,.bps,.pdf,.epsz,.eps.gz,.bpsz,.bps.gz,.gif%
+\newif\if at MGL@comments@
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mglnocomments} Declares |\@MGL at comments@| as false.
+%    \begin{macrocode}
+\def\mglnocomments{\@MGL at comments@false}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mglcomments} Declares |\@MGL at comments@| as true.
+%    \begin{macrocode}
+\def\mglcomments{\@MGL at comments@true}
+%    \end{macrocode}
+% \end{macro}
+% Now, the options call the respective commands.
+%    \begin{macrocode}
+\DeclareOption{nocomments}{\mglnocomments}
+\DeclareOption{comments}{\mglcomments}
+%    \end{macrocode}
+%
+% \begin{macro}{\mglscale}\begin{macro}{\MGL at scale}
+% |\mglscale| sets the value of the |\MGL at scale| macro, which is used later to specify the default scaling for graphics. It only accepts integer values from $1$ to $9$, otherwise it issues a warning and restarts the scaling to $1$. In order to be able to check the validity of the value passed by the user, we first set the |\MGL at scale| macro to that value and test it with the |\ifcase| conditional; if the value is valid, we do nothing, but if it is invalid, we issue a warning and overwrit [...]
+%    \begin{macrocode}
+
+\def\mglscale#1{
+  \def\MGL at scale{#1}%
+  \ifcase\MGL at scale\or\or\or\or\or\or\or\or\else%
+    \PackageWarning{mgltex}{%
+      Scaling value of \MGL at scale\space not allowed; using default (1)%
+    }%
+    \def\MGL at scale{1}%
+  \fi%
 }
+%    \end{macrocode}
+% \end{macro}\end{macro}
+% The pacakage options |1x|, \ldots, |9x| just call |\mglscale| with the appropiate value.
+%    \begin{macrocode}
+\DeclareOption{1x}{\mglscale{1}}
+\DeclareOption{2x}{\mglscale{2}}
+\DeclareOption{3x}{\mglscale{3}}
+\DeclareOption{4x}{\mglscale{4}}
+\DeclareOption{5x}{\mglscale{5}}
+\DeclareOption{6x}{\mglscale{6}}
+\DeclareOption{7x}{\mglscale{7}}
+\DeclareOption{8x}{\mglscale{8}}
+\DeclareOption{9x}{\mglscale{9}}
+%    \end{macrocode}
+%
+% \begin{macro}{\mglquality}\begin{macro}{\MGL at quality}
+% |\mglquality| sets the value of the |\MGL at quality| macro, which is used later to specify the default quality for graphics. It only accepts integer values from $0$ to $8$ (the only ones defined by |MathGL|), otherwise it issues a warning and restarts to $2$ (the default for |MathGL|). In order to be able to check the validity of the value passed by the user, we first set the |\MGL at quality| macro to that value and test it with the |\ifcase| conditional; if the value is valid, we print an [...]
+% \end{macro}\end{macro}
+%    \begin{macrocode}
 
-\DeclareOption{jpg}{\def\mgl at image@ext{.jpg}}
-\DeclareOption{jpeg}{\def\mgl at image@ext{.jpeg}}
-\DeclareOption{pdf}{\def\mgl at image@ext{.pdf}}
-\DeclareOption{png}{\def\mgl at image@ext{.png}}
-\DeclareOption{eps}{\def\mgl at image@ext{.eps}}
-\DeclareOption{epsz}{\def\mgl at image@ext{.eps.gz}}
-\DeclareOption{bps}{\def\mgl at image@ext{.bps}}
-\DeclareOption{bpsz}{\def\mgl at image@ext{.bps.gz}}
-\DeclareOption{gif}{\def\mgl at image@ext{.gif}}
+\def\mglquality#1{%
+  \def\MGL at quality{#1}%
+  \ifcase\MGL at quality%
+    \PackageInfo{mgltex}{%
+      Quality 0: No face drawing (fastest)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 1: No color interpolation (fast)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 2: High quality (normal)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 3: High quality with 3d primitives (not implemented yet)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 4: No face drawing, direct bitmap drawing (low memory usage)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 5: No color interpolation, direct bitmap drawing (low memory usage)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 6: High quality, direct bitmap drawing (low memory usage)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 7: High quality with 3d primitives, direct bitmap drawing (not implemented yet)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 8: Draw dots instead of primitives (extremely fast)%
+    }%
+  \else%
+    \PackageWarning{mgltex}{%
+      Quality #1 not available; using default (2)%
+    }%
+    \def\MGL at quality{2}%
+  \fi%
+}
+%    \end{macrocode}
+% The package options |0q|, \ldots, |8q| just call |\mglquality| with the appropiate value.
+%    \begin{macrocode}
+\DeclareOption{0q}{\mglquality{0}}
+\DeclareOption{1q}{\mglquality{1}}
+\DeclareOption{2q}{\mglquality{2}}
+\DeclareOption{3q}{\mglquality{3}}
+\DeclareOption{4q}{\mglquality{4}}
+\DeclareOption{5q}{\mglquality{5}}
+\DeclareOption{6q}{\mglquality{6}}
+\DeclareOption{7q}{\mglquality{7}}
+\DeclareOption{8q}{\mglquality{8}}
+%    \end{macrocode}
+%
+% \begin{macro}{\MGL at graph@ext}
+% The following options set the default graphics extension, which is stored in the |\MGL at graph@ext| macro for later use.
+%    \begin{macrocode}
 
-\DeclareOption{tex}{\def\mgl at image@ext{.tex}}
+\DeclareOption{eps}{\def\MGL at graph@ext{.eps}}
+\DeclareOption{epsz}{\def\MGL at graph@ext{.epsz}}
+\DeclareOption{epsgz}{\def\MGL at graph@ext{.eps.gz}}
+\DeclareOption{bps}{\def\MGL at graph@ext{.bps}}
+\DeclareOption{bpsz}{\def\MGL at graph@ext{.bpsz}}
+\DeclareOption{bpsgz}{\def\MGL at graph@ext{.bps.gz}}
+\DeclareOption{pdf}{\def\MGL at graph@ext{.pdf}}
+\DeclareOption{png}{\def\MGL at graph@ext{.png}}
+\DeclareOption{jpg}{\def\MGL at graph@ext{.jpg}}
+\DeclareOption{jpeg}{\def\MGL at graph@ext{.jpeg}}
+\DeclareOption{gif}{\def\MGL at graph@ext{.gif}}
+\DeclareOption{tex}{\def\MGL at graph@ext{.tex}}
 %    \end{macrocode}
-% 
-% Other options produce an error message.
+% \end{macro}
+%
+% Any other option passed by the user is invalid, so an error message is issued.
 %    \begin{macrocode}
+
 \DeclareOption*{\@unknownoptionerror}
 %    \end{macrocode}
-% 
-% The default options for the package are set to |final| and |eps|, then the options passed by the user are processed. 
+%
+% We now declare the default package options, and, finally, process the options the user specifies in the order they are introduced.
 %    \begin{macrocode}
 
-\ExecuteOptions{final,on,nocomments,eps}
+\ExecuteOptions{final,on,nocomments,1x,2q,eps}
 \ProcessOptions*
 %    \end{macrocode}
-% 
-% Declare the \meta{key}=\meta{value} pairs for the |mgl| environment and companions. The pairs corresponding to the |\includegraphics| command are repeated, and saved in the |\graph at keys| macro; the new option is |imgext|, which can be used to overwrite the default extension chosen for the package. Notice that |imgext| can be any supported extension by MathGL but, of course, not all of them are supported by \LaTeX.
+%
+% \textsf{\mglTeX} requires the \textsf{keyval} package to define \meta{key}=\meta{value} options for the environments and commands; the \textsf{graphicx} package apports the facilities for inclusion of graphics, and the \textsf{verbatim} package is used as engine for the environments.
 %    \begin{macrocode}
 
-\define at key{mgl at keys}{bb}{\g at addto@macro{\graph at keys}{bb=#1,}}
-\define at key{mgl at keys}{bbllx}{\g at addto@macro{\graph at keys}{bbllx=#1,}}
-\define at key{mgl at keys}{bblly}{\g at addto@macro{\graph at keys}{bblly=#1,}}
-\define at key{mgl at keys}{bburx}{\g at addto@macro{\graph at keys}{bburx=#1,}}
-\define at key{mgl at keys}{bbury}{\g at addto@macro{\graph at keys}{bbury=#1,}}
-\define at key{mgl at keys}{natwidth}{\g at addto@macro{\graph at keys}{natwidth=#1,}}
-\define at key{mgl at keys}{natheight}{\g at addto@macro{\graph at keys}{natheight=#1,}}
-\define at key{mgl at keys}{hiresbb}{\g at addto@macro{\graph at keys}{hiresbb=#1,}}
-\define at key{mgl at keys}{viewport}{\g at addto@macro{\graph at keys}{viewport=#1,}}
-\define at key{mgl at keys}{trim}{\g at addto@macro{\graph at keys}{trim=#1,}}
-\define at key{mgl at keys}{angle}{\g at addto@macro{\graph at keys}{angle=#1,}}
-\define at key{mgl at keys}{origin}{\g at addto@macro{\graph at keys}{origin=#1,}}
-\define at key{mgl at keys}{width}{\g at addto@macro{\graph at keys}{width=#1,}}
-\define at key{mgl at keys}{height}{\g at addto@macro{\graph at keys}{height=#1,}}
-\define at key{mgl at keys}{totalheight}{\g at addto@macro{\graph at keys}{totalheight=#1,}}
-\define at key{mgl at keys}{keepaspectratio}{\g at addto@macro{\graph at keys}{keepaspectratio=#1,}}
-\define at key{mgl at keys}{scale}{\g at addto@macro{\graph at keys}{scale=#1,}}
-\define at key{mgl at keys}{clip}[true]{\g at addto@macro{\graph at keys}{clip=#1,}}
-\define at key{mgl at keys}{draft}[false]{\g at addto@macro{\graph at keys}{draft=#1,}}
-\define at key{mgl at keys}{type}{\g at addto@macro{\graph at keys}{type=#1,}}
-\define at key{mgl at keys}{ext}{\g at addto@macro{\graph at keys}{ext=#1,}}
-\define at key{mgl at keys}{read}{\g at addto@macro{\graph at keys}{read=#1,}}
-\define at key{mgl at keys}{command}{\g at addto@macro{\graph at keys}{command=#1,}}
-\define at key{mgl at keys}{imgext}{\def\mgl at image@ext{.#1}}
+\RequirePackage{keyval}
+\RequirePackage{graphicx}
+\RequirePackage{verbatim}
 %    \end{macrocode}
+% The supported graphic formats are declared, and the |\verbatim at finish| command from the \textsf{verbatim} package is disabled to avoid it from writing a blank line at the end of every script (see subsection~\ref{subsection: warning}).
+%    \begin{macrocode}
+\DeclareGraphicsExtensions{%
+  .eps,.epsz,.eps.gz,.bps,.bpsz,.bps.gz,.pdf,.png,.jpg,.jpeg,.gif%
+}
+\let\verbatim at finish\relax
+%    \end{macrocode}
+%
+% \begin{macro}{\MGL at graph@keys}
+% The main family of \meta{key}=\meta{value} pairs is defined. These pairs are common to every environment or command that produces graphics. Most of the \meta{key}'s are redefinitions of the optional arguments for the |\includegraphics| commands, so they are stored inside the |\MGL at graph@keys| macro, which is later passed to that command as optional argument by |\MGL at includegraphics|.
+%    \begin{macrocode}
 
-% We do the same for the |\mglplot| command. The options for the |\includegraphics| command are repeated and stored in the |\graph at keys| macro; the new options are |imgext|, which is the same as the one for the |mgl| environment, and |setup|, which is used to specify a keyword associated to a block of MGL code stored by the |mglsetup| environment.
+\define at key{MGL at keys}{bb}{\g at addto@macro\MGL at graph@keys{bb=#1,}}
+\define at key{MGL at keys}{bbllx}{\g at addto@macro\MGL at graph@keys{bbllx=#1,}}
+\define at key{MGL at keys}{bblly}{\g at addto@macro\MGL at graph@keys{bblly=#1,}}
+\define at key{MGL at keys}{bburx}{\g at addto@macro\MGL at graph@keys{bburx=#1,}}
+\define at key{MGL at keys}{bbury}{\g at addto@macro\MGL at graph@keys{bbury=#1,}}
+\define at key{MGL at keys}{natwidth}{\g at addto@macro\MGL at graph@keys{natwidth=#1,}}
+\define at key{MGL at keys}{natheight}{\g at addto@macro\MGL at graph@keys{natheight=#1,}}
+\define at key{MGL at keys}{hiresbb}{\g at addto@macro\MGL at graph@keys{hiresbb=#1,}}
+\define at key{MGL at keys}{viewport}{\g at addto@macro\MGL at graph@keys{viewport=#1,}}
+\define at key{MGL at keys}{trim}{\g at addto@macro\MGL at graph@keys{trim=#1,}}
+\define at key{MGL at keys}{angle}{\g at addto@macro\MGL at graph@keys{angle=#1,}}
+\define at key{MGL at keys}{origin}{\g at addto@macro\MGL at graph@keys{origin=#1,}}
+\define at key{MGL at keys}{width}{\g at addto@macro\MGL at graph@keys{width=#1,}}
+\define at key{MGL at keys}{height}{\g at addto@macro\MGL at graph@keys{height=#1,}}
+\define at key{MGL at keys}{totalheight}{\g at addto@macro\MGL at graph@keys{totalheight=#1,}}
+\define at key{MGL at keys}{keepaspectratio}[true]{%
+  \g at addto@macro\MGL at graph@keys{keepaspectratio=#1,}%
+}
+\define at key{MGL at keys}{scale}{\g at addto@macro\MGL at graph@keys{scale=#1,}}
+\define at key{MGL at keys}{clip}[true]{\g at addto@macro\MGL at graph@keys{clip=#1,}}
+\define at key{MGL at keys}{draft}[true]{\g at addto@macro\MGL at graph@keys{draft=#1,}}
+\define at key{MGL at keys}{type}{\g at addto@macro\MGL at graph@keys{type=#1,}}
+\define at key{MGL at keys}{ext}{\g at addto@macro\MGL at graph@keys{ext=#1,}}
+\define at key{MGL at keys}{read}{\g at addto@macro\MGL at graph@keys{read=#1,}}
+\define at key{MGL at keys}{command}{\g at addto@macro\MGL at graph@keys{command=#1,}}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MGL at graph@ext}
+% Stores the default extension for the creation of the graphics.
+%    \begin{macrocode}
+\define at key{MGL at keys}{imgext}{\def\MGL at graph@ext{.#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@MGL at lineno@}
+% The only \meta{key}=\meta{value} pair needed for verbatim-like environments and commands is the one for the |lineno| option, which sets the value of the |\@MGL at lineno@| boolean macro.
 %    \begin{macrocode}
 
-\define at key{mglplot at keys}{bb}{\g at addto@macro{\graph at keys}{bb=#1,}}
-\define at key{mglplot at keys}{bbllx}{\g at addto@macro{\graph at keys}{bbllx=#1,}}
-\define at key{mglplot at keys}{bblly}{\g at addto@macro{\graph at keys}{bblly=#1,}}
-\define at key{mglplot at keys}{bburx}{\g at addto@macro{\graph at keys}{bburx=#1,}}
-\define at key{mglplot at keys}{bbury}{\g at addto@macro{\graph at keys}{bbury=#1,}}
-\define at key{mglplot at keys}{natwidth}{\g at addto@macro{\graph at keys}{natwidth=#1,}}
-\define at key{mglplot at keys}{natheight}{\g at addto@macro{\graph at keys}{natheight=#1,}}
-\define at key{mglplot at keys}{hiresbb}{\g at addto@macro{\graph at keys}{hiresbb=#1,}}
-\define at key{mglplot at keys}{viewport}{\g at addto@macro{\graph at keys}{viewport=#1,}}
-\define at key{mglplot at keys}{trim}{\g at addto@macro{\graph at keys}{trim=#1,}}
-\define at key{mglplot at keys}{angle}{\g at addto@macro{\graph at keys}{angle=#1,}}
-\define at key{mglplot at keys}{origin}{\g at addto@macro{\graph at keys}{origin=#1,}}
-\define at key{mglplot at keys}{width}{\g at addto@macro{\graph at keys}{width=#1,}}
-\define at key{mglplot at keys}{height}{\g at addto@macro{\graph at keys}{height=#1,}}
-\define at key{mglplot at keys}{totalheight}{\g at addto@macro{\graph at keys}{totalheight=#1,}}
-\define at key{mglplot at keys}{keepaspectratio}{\g at addto@macro{\graph at keys}{keepaspectratio=#1,}}
-\define at key{mglplot at keys}{scale}{\g at addto@macro{\graph at keys}{scale=#1,}}
-\define at key{mglplot at keys}{clip}[true]{\g at addto@macro{\graph at keys}{clip=#1,}}
-\define at key{mglplot at keys}{draft}[false]{\g at addto@macro{\graph at keys}{draft=#1,}}
-\define at key{mglplot at keys}{type}{\g at addto@macro{\graph at keys}{type=#1,}}
-\define at key{mglplot at keys}{ext}{\g at addto@macro{\graph at keys}{ext=#1,}}
-\define at key{mglplot at keys}{read}{\g at addto@macro{\graph at keys}{read=#1,}}
-\define at key{mglplot at keys}{command}{\g at addto@macro{\graph at keys}{command=#1,}}
-\define at key{mglplot at keys}{imgext}{\def\mglplot at image@ext{.#1}}
-\define at key{mglplot at keys}{setup}{\def\mglplot at setup{#1}}
+\newif\if at MGL@lineno@
+\define at key{MGL at verb@keys}{lineno}[true]{\csname @MGL at lineno@#1\endcsname}
 %    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\MGL at main@script at name}
+% \noindent This macro stores the name of the of the document's main script. It is initialized to the name of the \LaTeX{} document.
+%    \begin{macrocode}
 
-% A special extension for images created with MathGL is ``.tex'', so we store it within a macro for future use.
+\edef\MGL at main@script at name{\jobname}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\MGL at dir}
+% This is the \textsf{\mglTeX} main working directory. By default, it is defined to empty, so it points to the path of the \LaTeX{} document.
 %    \begin{macrocode}
 
-\def\TeX at ext{.tex}
+\def\MGL at dir{}
 %    \end{macrocode}
-% \subsection{Environments for MGL code embedding}
-% \begin{macro}{\mgl at include@image}
-% This is the command that will include graphics created by MGL code. We can't use |\includegraphics| directly for two reasons: first, MathGL has the capacity of creating graphics with \LaTeX{} commands (with the aid of the \textsf{tikz} package), in which case there is no image, but a ``.tex'' file, which has to be included; the second reason is that |\includegraphics| issues an error when the specified image doesn't exist, and remember that the first \LaTeX{} run only creates the image [...]
+% \end{macro}
+% \begin{macro}{\MGL at scripts@dir}
+% The subdirectory inside |\MGL at dir| where all MGL scripts will be created.
 %    \begin{macrocode}
-\def\mgl at include@image#1{%
+\def\MGL at scripts@dir{}
 %    \end{macrocode}
-% If the extension of the graphics is ``.tex'',
+% \end{macro}
+% \begin{macro}{\MGL at graphics@dir}
+% The subdirectory inside |\MGL at dir| where all MGL graphics will be created.
 %    \begin{macrocode}
-  \ifx\mgl at image@ext\TeX at ext%
+\def\MGL at graphics@dir{}
 %    \end{macrocode}
-% first check if the file exists;
+% \end{macro}
+% \begin{macro}{\MGL at backups@dir}
+% The subdirectory inside |\MGL at dir| where all backups of scripts will be created.
 %    \begin{macrocode}
-    \IfFileExists{#1.tex}{%
+\def\MGL at backups@dir{}
 %    \end{macrocode}
-% if so, include it,
+% \end{macro}
+% \begin{macro}{\MGL at paths}
+% This is a list of paths where extracted and external scripts will be searched for by the |\mglgraphics| and |\mglinclude| commands. Since extracted scripts are created inside |\MGL at dir\MGL at scripts@dir| and |\MGL at dir\MGL at backups@dir|, this directories are included.
 %    \begin{macrocode}
-      \include{#1}%
-    }{%
+\def\MGL at paths{\MGL at dir\MGL at scripts@dir,\MGL at dir\MGL at backups@dir}
 %    \end{macrocode}
-% otherwise use the command |\mgl at img@not at found| to create a warning.
+% \end{macro}
+%
+% We set some additional staff that will be used later.
+% \begin{macro}{\MGL at main@stream}
+% The output stream for the document's main script.
 %    \begin{macrocode}
-      \mgl at img@not at found{#1}%
-    }%
+
+\newwrite\MGL at main@stream
 %    \end{macrocode}
-% If the extension of the graphics is not ``.tex'',
+% \end{macro}
+% \begin{macro}{\MGL at out@stream}
+% The output stream for scripts other than the main one.
 %    \begin{macrocode}
-  \else%
+\newwrite\MGL at out@stream
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MGL at in@stream}
+% The input stream for scripts other than the main one.
+%    \begin{macrocode}
+\newread\MGL at in@stream
 %    \end{macrocode}
-% we define the next action to be performed as warning that requested image doesn't exist. This is stored in the |\next at action| macro, and will be overwriten if the image is found.
+% \end{macro}
+% \begin{macro}{MGL at script@no}
+% The internal counter used by environments like |mgl| and commands like |\mglplot| to automatically name scripts.
 %    \begin{macrocode}
-  \def\next at action{\mgl at img@not at found{#1}}%
+\newcounter{MGL at script@no}
 %    \end{macrocode}
-% For every extension supported by \mglTeX{},
+% \end{macro}
+% \begin{macro}{MGL at line@no}
+% The counter used for verbatim-like environments and commands to numerate the lines of code.
 %    \begin{macrocode}
-    \@for\img at ext:=\Gin at extensions\do{%
+\newcounter{MGL at line@no}
 %    \end{macrocode}
-% if the file with the current extension exists,
+% \end{macro}
+% \begin{macro}{MGL at verb@script at no}
+% The counter used to numerate verbatim-written scripts with the |\listofmglscripts| command.
 %    \begin{macrocode}
-      \IfFileExists{#1\img at ext}{%
+\newcounter{MGL at verb@script at no}
 %    \end{macrocode}
-% overwrite the |\next at action| macro so it uses the |\includegraphics| command to include the image, otherwise do nothing.
+% \end{macro}
+% \begin{macro}{\@MGL at list@script@}
+% The boolean switch used to determine whether to add a verbatim-written script to the \emph{list of MGL scripts}.
 %    \begin{macrocode}
-        \def\next at action{%
-          \expandafter\includegraphics\expandafter[\graph at keys]{#1}%
-        }%
-      }{}%
-    }%
+\newif\if at MGL@list at script@
 %    \end{macrocode}
-% Execute |\next at action|.
+% \end{macro}
+% \begin{macro}{\l at MGL@script}
+% Finally, the style for the leaders associating script name and page number in the \emph{list of MGL scripts}.
 %    \begin{macrocode}
-    \next at action%
-  \fi%
+\def\l at MGL@script{\@dottedtocline{1}{0em}{1.5em}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \subsection{Anatomy of environments and commands}\label{subsection: anatomy}
+% \noindent Many of the environments and commands defined by \textsf{\mglTeX} are based on the same pieces of code. So, in order to avoid repetition of commands, we use the concept of \emph{anatomy of environments and commands}, which is basically the idea of taking repetitive pieces of code and enclose them into macros which can later be used.
+%
+% \begin{macro}{\MGL at setkeys}
+% This command recieves two arguments: a family of \meta{key}=\meta{value} pairs, like |MGL at keys|, and a list of such pairs. It first cleans the |\MGL at graph@keys| macro, and the process the list of pairs.
+%    \begin{macrocode}
+
+\def\MGL at setkeys#1#2{%
+  \def\MGL at graph@keys{}%
+  \setkeys{#1}{#2}%
 }
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mgl at img@not at found}
-% \changes{v2.0}{2014/11/22}{Fixed incompatibility of command \texttt{\textbackslash{}mgl at img@not at found} with environment \texttt{tabular}}
-% When this command is called with the name of a MGL image as argument, it issues a package warning indicating that the MGL image can't be found, and creates the following box in the corresponding position:
-% \begin{center}
-% \framebox[10em]{%
-%   \centering%
-%   \bfseries\Huge%
-%   \vbox{MGL\\image\\not\\found}%
-% }%
-% \end{center}
+%
+% \begin{macro}{\MGL at codes}
+% This macro changes the category codes of all special characters (like |\|, |$|, etc.) to $12$ (other), so they don't have any special meaning and can be processed as normal text. The exception is the new line character (|^^M|), which is kept active for compatibility with the \textsf{verbatim} package.
 %    \begin{macrocode}
-\def\mgl at img@not at found#1{%
-  \PackageWarning{mgltex}{MGL image "#1" not found}%
-  \framebox[10em]{%
-    \centering%
-    \bfseries\Huge%
-    \begin{tabular}{c}MGL\\image\\not\\found\end{tabular}%
-  }%
+
+\def\MGL at codes{%
+  \let\do\@makeother\dospecials%
+  \catcode`\^^M\active%
 }
 %    \end{macrocode}
 % \end{macro}
-% \begin{environment}{mgl}
-% This environment writes its contents to the main script \meta{document}.mgl.
-% 
-% First, declare a counter for numeration and naming of the images created from the main script \meta{document}.mgl.
+%
+% \begin{macro}{\MGL at document@scripts}
+% A macro to store the names of the scripts created or compiled in the document.
 %    \begin{macrocode}
 
-\newcounter{mgl at image@no}
+\def\MGL at document@scripts{}
 %    \end{macrocode}
-% Create an output stream for the main script \meta{document}.mgl.
+% \end{macro}
+% \begin{macro}{\MGL at set@script at name}\begin{macro}{\MGL at script@name}
+% |\MGL at set@script at name| recieves the name of a script without extension as argument, defines |\MGL at script@name| as that name, and checks if it has already been created or compiled, by comparing it with the names already stored in |\MGL at document@scripts|; if it's there already, warns the user. Finally, adds the name of the script to |\MGL at document@scripts|.
+%    \begin{macrocode}
+\def\MGL at set@script at name#1{%
+  \edef\MGL at script@name{#1}%
+  \@for\MGL at temp@a:=\MGL at document@scripts\do{%
+    \ifx\MGL at temp@a\MGL at script@name%
+      \PackageWarning{mgltex}{Multiple MGL scripts named "\MGL at script@name.mgl"}%
+    \fi%
+  }%
+  \g at addto@macro\MGL at document@scripts{\MGL at script@name,}%
+}
+%    \end{macrocode}
+% \end{macro}\end{macro}
+%
+% \begin{macro}{\MGL at unchanged}
+% This command defines the ``switch'' |\MGL@@@|\meta{script}, where \meta{script} is passed as argument, which indicates the script \meta{script}|.mgl| has not changed. This command has to be written to the |.aux| file to be preserved from compilation to compilation.
 %    \begin{macrocode}
 
-\newwrite\mgl at script
+\def\MGL at unchanged#1{%
+  \global\@namedef{MGL@@@#1}{}%
+}
 %    \end{macrocode}
-% Open the main script at the beginning of the document (at the moment of the |\begin{document}| command).
+% \end{macro}
+%
+% \begin{macro}{\MGL at process@script}
+% It checks whether the ``switch'' |\MGL@@@\MGL at script@name| is undefined, in which case executes its first argument. If the switch is defined, it checks if the corresponding image has been created; if so, it executes its second argument; otherwise, the first one.
 %    \begin{macrocode}
-\AtBeginDocument{%
-  \if at mgltex@on@%
-    \immediate\openout\mgl at script="\mgl at dir\jobname.mgl"%
-    \mglsignature at write\mgl at script%
-  \fi%
+
+\def\MGL at process@script#1#2{%
+  \@ifundefined{MGL@@@\MGL at script@name}{%
+    #1%
+  }{%
+    \IfFileExists{\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext}{%
+      #2%
+    }{%
+      #1%
+    }%
+  }%
 }
 %    \end{macrocode}
-% At the end of the document (at the moment of the |\end{document}| command):
+% \end{macro}
+%
+% \begin{macro}{\MGL at def@for at loop}\begin{macro}{\MGL at for}
+% |\MGL at def@for at loop| defines the command |\MGL at for| which is similar to the |\@for| command from the \LaTeX{} kernel, with the only exception that, instead of iterating over comma-separated lists, it can iterate over lists of items with any kind of separator, which is passed as argument of |\MGL at def@for at loop|. The body of this command is copied from the definition code of |\@for|, extracted from \emph{The \LaTeXe{} Sources} document, replacing the ``|,|'' by ``|#1|''. Note that |\MGL at fo [...]
 %    \begin{macrocode}
-\AtEndDocument{%
+
+\def\MGL at def@for at loop#1{%
+  \long\def\MGL at for##1:=##2\do##3{%
+    \expandafter\def\expandafter\@fortmp\expandafter{##2}%
+    \ifx\@fortmp\@empty\else%
+      \expandafter\MGL at forloop##2#1\@nil#1\@nil\@@##1{##3}%
+    \fi%
+  }%
+  \long\def\MGL at forloop##1#1##2#1##3\@@##4##5{%
+    \def##4{##1}%
+    \ifx##4\@nnil\else%
+      ##5\def##4{##2}%
+      \ifx##4\@nnil\else%
+        ##5\MGL at iforloop##3\@@##4{##5}%
+      \fi%
+    \fi%
+  }%
+  \long\def\MGL at iforloop##1#1##2\@@##3##4{%
+    \def##3{##1}%
+    \ifx##3\@nnil%
+      \expandafter\@fornoop%
+    \else%
+      ##4\relax\expandafter\MGL at iforloop%
+    \fi%
+    ##2\@@##3{##4}%
+  }%
+}
 %    \end{macrocode}
-% write an empty line on the main script (just for elegance),
+% The default |\MGL at for| loop iterates over |^^J|-separated lists, i.e, \meta{new line}-character-lists.
 %    \begin{macrocode}
-  \mgl at write\mgl at script{}%
+\MGL at def@for at loop{^^J}
 %    \end{macrocode}
-% write the MGL \emph{stop} command to stop the MathGL compiler.
+% \end{macro}\end{macro}
+%
+% \begin{macro}{\MGL at compare@code}
+% |\MGL at compare@code| is in charge of comparing the user's MGL code, embedded within \textsf{\mglTeX} environments, with its corresponding extracted script. For that purpose, the |\verbatim at processline| and |\verbatim at finish| commands from the \textsf{verbatim} package are redefined.
 %    \begin{macrocode}
-  \mgl at write\mgl at script{stop}%
+
+\def\MGL at compare@code#1{%
 %    \end{macrocode}
-% The |\mgl at func| is a buffer that contains instructions to write MGL functions declared with |mglfunc| environment. Here, we execute those instructions.
+% \begin{macro}{\MGL at next}
+% This macro is called at the end of environments that use the |\MGL at compare@code| macro, and performs the ending actions of the comparision process, which are closing the |\MGL at in@stream| and writing the |\MGL at unchanged{\MGL at script@name}| to the |.aux| file. If during the comparison process a difference in the code is found, |\MGL at next| is redefined to only close the |\MGL at in@stream|.
 %    \begin{macrocode}
-  \mgl at func%
+  \def\MGL at next{%
+    \MGL at closein\MGL at in@stream%
+    \MGL at write\@auxout{\string\MGL at unchanged{\MGL at script@name}}%
+  }%
 %    \end{macrocode}
-% Close the main script.
+% \end{macro}
+% The |\verbatim at processline| command is redefined to read from the input stream to a temporary variable (|\MGL at temp@a|), and compare it with one line of code in the \LaTeX{} document, which is stored in another temporary variable (|\MGL at temp@b|). In case they are not equal, the |\MGL at next| macro is redefined to only close the input stream, and |\verbatim at processline| is redefine again to do nothing (a little speed-up).
 %    \begin{macrocode}
-  \immediate\closeout\mgl at script%
+  \def\verbatim at processline{%
+    \MGL at read\MGL at in@stream{\MGL at temp@a}%
+    \edef\MGL at temp@b{\the\verbatim at line}%
+    \ifx\MGL at temp@a\MGL at temp@b\else%
+      \def\MGL at next{\MGL at closein\MGL at in@stream}%
+      \def\verbatim at processline{}%
+    \fi%
+  }%
+%    \end{macrocode}
+% The |\verbatim at finish| macro, which is called at the end of the environment, is also redefined to perform one last read of the input stream, and then check if the end of file has been reached; if it hasn't, then, despite the end of the environment has been reached ---thus the end of code---, there is still code inside the script, so there are differences between them, and |\MGL at next| has to be redefined to do nothing but close the input stream.
+%    \begin{macrocode}
+  \def\verbatim at finish{%
+    \MGL at read\MGL at in@stream{\MGL at temp@a}%
+    \ifeof\MGL at in@stream\else%
+      \def\MGL at next{\MGL at closein\MGL at in@stream}%
+    \fi%
+  }%
 %    \end{macrocode}
-% Use the program |mglconv| (part of MathGL) to compile the main script.
+% Finally, the input stream is opened, and the comparison is started by calling |\verbatim at start|.
 %    \begin{macrocode}
-  \mgl at write{18}{mglconv -n "\mgl at dir\jobname.mgl"}%
+  \MGL at openin\MGL at in@stream{#1}%
+  \verbatim at start%
 }
-
 %    \end{macrocode}
-% \begin{macro}{\mgl}
-% The beginning of the |mgl| environment.
+% \end{macro}
+%
+% \begin{macro}{\MGL at write@funcs}
+% This macro is used only by the |mglfunc| environment. Its only purpose is to store the commands to insert MGL functions in the main script, and is called at the end of the document or when the |\mglname| command is used. For now, we only ask it to write the |stop| command\footnote{Note the |stop| command is unnecesary in newer versions of the MGL language, but it is kept in \textsf{\mglTeX} for compatibility and for elegance.} that separates the section of scripts from the section of f [...]
 %    \begin{macrocode}
 
-\newcommand\mgl[1][]{%
+\def\MGL at write@funcs{\MGL at write\MGL at main@stream{stop^^J}}
 %    \end{macrocode}
-% First, process the \meta{key}=\meta{value} options for the environment.
+% \end{macro}
+% \begin{macro}{\MGL at func}
+% This is the command that writes the MGL functions. It is intended to be stored inside |\MGL at write@funcs|. It opens the backup file of the MGL function whose name is passed as argument (and has been created by a |mglfunc| environment), and then calls |\MGL@@func| to transcript from that file, line by line, to the main script.
 %    \begin{macrocode}
-  \def\graph at keys{}%
-  \setkeys{mgl at keys}{#1}%
+\def\MGL at func#1{%
+  \MGL at openin\MGL at in@stream{\MGL at dir\MGL at backups@dir#1.mgl}%
+  \MGL@@func%
+}
 %    \end{macrocode}
-% Now, make every ``special'' character (\textbackslash, \$, etc.) of category $13$ (other), i.e., make them common characters.
+% \end{macro}
+% \begin{macro}{\MGL@@func}
+% This command transcripts only one line from backup file of a MGL function to the main script. It calls itself recursively until the end of the backup.
 %    \begin{macrocode}
-  \let\do\@makeother \dospecials%
+\def\MGL@@func{%
 %    \end{macrocode}
-% Add an end-line character at the end of every read line. This end-line character is declared active (category 12).
+% It first reads from the input stream to the |\MGL at temp@a| temporary variable.
 %    \begin{macrocode}
-  \endlinechar`\^^M \catcode`\^^M\active%
+  \MGL at read\MGL at in@stream{\MGL at temp@a}%
 %    \end{macrocode}
-% Spaces characters are category 10; the spaces at the beginning of every read line are ignored.
+% If the end of the file has been reached, the stream is closed.
 %    \begin{macrocode}
-  \catcode`\ =10%
+  \ifeof\MGL at in@stream%
+    \MGL at closein\MGL at in@stream%
 %    \end{macrocode}
-% Finally, the command that reads/writes each line of the contents of the environment is called.
+% If the end of file hasn't been reached, |\MGL at temp@a| is written to the main script, and |\MGL@@func| is called recursively.
 %    \begin{macrocode}
-  \mgl at write\mgl at script{quality \mgl at quality}%
-  \expandafter\mgl at write@line%
+  \else%
+    \MGL at write\MGL at main@stream{\MGL at temp@a}%
+    \expandafter\MGL@@func%
+  \fi%
 }
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\end at mgl}
-% Define a macro that contains the |\end{mgl}| command as text, so the end of the environment can be tested by comparison with it. From now on, we adopt the convention that the macro |\end@|\meta{environment} contains the |\end{|\meta{environment}|}| command as text.
+%
+% \begin{macro}{\MGL at set@verbatim at code}
+% This command sets the parameters for verbatim-like environments and commands.
+%    \begin{macrocode}
+
+\def\MGL at set@verbatim at code{%
+%    \end{macrocode}
+% The following is standard stuff for verbatim-like environments and commands.
+%    \begin{macrocode}
+  \if at minipage\else\vskip\parskip\fi%
+  \leftskip\@totalleftmargin\rightskip\z at skip%
+  \parindent\z@\parfillskip\@flushglue\parskip\z@%
+  \@@par%
+  \def\par{%
+    \if at tempswa%
+      \leavevmode\null\@@par\penalty\interlinepenalty%
+    \else%
+      \@tempswatrue%
+      \ifhmode\@@par\penalty\interlinepenalty\fi%
+    \fi%
+  }%
+  \obeylines%
+  \let\do\@makeother\dospecials%
+  \verbatim at font%
+  \frenchspacing%
+  \everypar\expandafter{\the\everypar\unpenalty}%
+%    \end{macrocode}
+% If there are no lines of MGL code, instead of issuing an error, we display a package warning.
+%    \begin{macrocode}
+  \def\@noitemerr{\PackageWarning{mglTeX}{Empty MGL script}}%
+%    \end{macrocode}
+% The space between the end of the label box and the text of the first item (|\labelsep|) is set to |1em|, while the separation between items (|\itemsep|) is set to zero.
+%    \begin{macrocode}
+  \labelsep1em%
+  \itemsep\z@%
+%    \end{macrocode}
+% Since we want the lines of code to be broken between words, but verbatim spaces are unbreakable, we trick \LaTeX{} by inserting a breakable spaces (|\space|) instead.
 %    \begin{macrocode}
-\begingroup%
-  \escapechar=-1 \relax%
-  \xdef\end at mgl{\string\\end\string\{mgl\string\}}%
-\endgroup
+  \def\@xobeysp{\space}\@vobeyspaces%
+%    \end{macrocode}
+% However, \LaTeX{} still resists breaking lines as much as possible in order to preserve the shape of paragraphs, so we tell it it's OK not to do so by setting the badness tolerance before hyphenation (|\pretolerance|) and the badness above which bad hboxes will be shown (|\hbadness|) to the maximum value of $10000$ (|\@M|).
+%    \begin{macrocode}
+  \pretolerance\@M%
+  \hbadness\@M%
+%    \end{macrocode}
+% In order to achieve the desired indentation of broken lines, we use the following trick: We increase the |\leftskip| parameter by the amount specified by |\mglbreakindent|, so that lines will be indented; but then we decrease the |\itemindent| parameter by the same amount so the first line won't be indented.
+%    \begin{macrocode}
+  \advance\leftskip\mglbreakindent%
+  \itemindent-\mglbreakindent%
+}
 %    \end{macrocode}
 % \end{macro}
+%
+% \begin{macro}{\MGL at line@sep}
+% This is the separator displayed at the beginning and ending of the |mglblock| and |mglverbatim| environments, to distinguish the MGL code from the normal text. Its definition is similar to the one of the |\dotfill| command, which can be found in \emph{The \LaTeXe{} Sources} document, but |\nopagebreak| commands have been added to avoid unaesthetic page breaking before and after the separators.
+%    \begin{macrocode}
 
-% \begin{macro}{\mgl at write@line}
-% This command reads each line from the |mgl| environment and writes it to the general script \meta{document}.mgl. We start by wrapping the new command with a \LaTeX{} group because we will change the code of the end-line character to ``active'' \emph{locally}, so we can indicate |\mgl at write@line| that its argument stretches until the end of the line.
+\def\MGL at line@sep{%
+  \nopagebreak%
+  \leavevmode\cleaders\hrule height\mgllinethickness\hfill\kern\z@%
+  \nopagebreak%
+}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MGL at dash@sep}
+% This is the separator displayed at the begginning and ending of the |mglcomments| environment, when it is allowed to be displayed.
 %    \begin{macrocode}
-\begingroup%
+\def\MGL at dash@sep{%
+  \nopagebreak%
+  \leavevmode\cleaders\hb at xt@\mgldashwidth{\hss-\hss}\hfill\kern\z@%
+  \nopagebreak%
+}
 %    \end{macrocode}
+% \end{macro}
+%
+% \subsection{Environments for MGL code embedding}
+% \noindent For the following, we agree that if a macro is required by an environment, and it hasn't been already defined, it will be defined between the commands that start and end such environment; also the command's name will have the environment's name as prefix.
+%
+% \begin{environment}{mgl}
+% This environment has to transcript its contents to the document's main script, and create a backup of the code simultaneously; the backup is used to detect changes in following compilations.
+% \begin{macro}{\mgl}
+% The command that starts the |mgl| environment. It is called by the |\begin{mgl}| command.
+%    \begin{macrocode}
 
-% Declare the end-line character as active.
+\newcommand\mgl[1][]{%
+%    \end{macrocode}
+% We define an additional \meta{key}=\meta{value} pair in the main family of pairs, corresponding to the |label| option for this environment. This definition is local because we don't want to be valid outside the environment.
 %    \begin{macrocode}
-  \catcode`\^^M\active%
+  \define at key{MGL at keys}{label}{\def\MGL at script@name{##1}}%
 %    \end{macrocode}
-% The command |\mgl at write@line| reads its argument until it finds the end-line character, i.e., it reads a complete line of text, which is MGL code in this case.
+% The list of comma-separated options is processed.
 %    \begin{macrocode}
-  \gdef\mgl at write@line#1^^M{%
+  \MGL at setkeys{MGL at keys}{#1}%
 %    \end{macrocode}
-% The next action to be performed is write the read line of code to the main script \meta{document}.mgl and recursively call |\mgl at write@line|, so it reads the next line of text. These instructions are stored in the |\next at action| macro.
+% If the user hasn't used the |label| option, the automatic naming mechanism is called. Note that |\MGL at main@script at name| is set using the |\mglname| command.
 %    \begin{macrocode}
-    \def\next at action{%
-      \mgl at write\mgl at script{#1}%
-      \mgl at write@line%
-    }%
+  \@ifundefined{MGL at script@name}{%
+    \stepcounter{MGL at script@no}%
+    \edef\MGL at script@name{\MGL at main@script at name-MGL-\arabic{MGL at script@no}}%
+  }{}%
+%    \end{macrocode}
+% We use the |\MGL at set@script at name| to test whether the given name has already been used.
+%    \begin{macrocode}
+  \MGL at set@script at name{\MGL at script@name}%
 %    \end{macrocode}
-% The |\test at end@mgl| command test if the end of the |mgl| environment has been reached in the current line. If so, it overwrites the |\next at action| macro so it doesn't read the next line of text, but executes the |\end{mgl}| command (see bellow).
+% |\MGL at codes| is used to change the codes of special characters.
 %    \begin{macrocode}
-    \test at end@mgl{#1}%
+  \MGL at codes%
 %    \end{macrocode}
-% Execute the |\next at action| macro.
+% |\MGL at process@script| is used to test whether the code has changed or not the last time \LaTeX{} has been executed. If it has changed, we call the |\mgl at write@script| command to (re)write the code; otherwise, the code is scanned again by asking |\MGL at compare@code| to perform a comparison on the backup file, in order to determine whether the code has changed now.
 %    \begin{macrocode}
-    \next at action%
+  \MGL at process@script{%
+    \mgl at write@script%
+  }{%
+    \MGL at compare@code{\MGL at dir\MGL at backups@dir\MGL at script@name.mgl}%
   }%
-\endgroup
+}
 %    \end{macrocode}
 % \end{macro}
-
-% \begin{macro}{\test at end@mgl}
-% This command checks if its argument is equal to |\end at mgl|; if so, overwrites  the |\next at action| macro (see above) so that it executes the end of the |mgl| environment (|\end{mgl}|). Here, we adopt another convention: the |\test at end@|\meta{environment} checks if its argument is equal to |\end@|\meta{environment}, i.e., tests whether the |\end{|\meta{environment}|}| command has been reached, in which case, it executes that command.
+% \begin{macro}{\mgl at write@script}
+% (Re)writes the contents of the |mgl| environment.
 %    \begin{macrocode}
-\def\test at end@mgl#1{%
-  \edef\this at line{#1}%
-  \ifx\this at line\end at mgl%
-    \def\next at action{\end{mgl}}%
-  \fi%
+\def\mgl at write@script{%
+%    \end{macrocode}
+% \begin{macro}{\MGL at next}
+% It contains the actions to perform immediately after the end of |\mgl at write@script|. They are close the output stream; write in the main script the commands to save the image, and to reset the initial values for all MGL parameters and clear the image; finally, write |\MGL at unchanged{\MGL at script@name}| in the |.aux| file.
+%    \begin{macrocode}
+  \def\MGL at next{%
+    \MGL at closeout\MGL at out@stream%
+    \MGL at write\MGL at main@stream{%
+      write '\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext'^^J%
+      ^^Jreset^^J%
+    }%
+    \MGL at write\@auxout{\string\MGL at unchanged{\MGL at script@name}}%
+  }%
+%    \end{macrocode}
+% \end{macro}
+% Now we redefine the |\verbatim at processline| macro to write |\the\verbatim at line| to the main script and to the backup file.
+%    \begin{macrocode}
+  \def\verbatim at processline{%
+    \MGL at write\MGL at main@stream{\the\verbatim at line}%
+    \MGL at write\MGL at out@stream{\the\verbatim at line}%
+  }%
+%    \end{macrocode}
+% Before writing the MGL code of the environment, we set the default quality.
+%    \begin{macrocode}
+  \MGL at write\MGL at main@stream{quality \MGL at quality}%
+%    \end{macrocode}
+% We open the backup file in the output stream.
+%    \begin{macrocode}
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at backups@dir\MGL at script@name.mgl}%
+%    \end{macrocode}
+% The transcription process starts by calling the |\verbatim at start| command.
+%    \begin{macrocode}
+  \verbatim at start%
 }
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\endmgl}
-% The end of the environment is quite simple: the |mgl at image@no| counter is increased by one, then the MGL command to save the corresponding image is written; the name given to the image is ``\meta{document}-mgl-\meta{mgl at image@no}.\meta{mgl at image@ext}''; the MGL \emph{reset} command is written in the main script to clean the image and restart graphic parameters for the following image to be created. Finally, the |\mgl at include@image| command (see below) is called to include the image created.
+% The command that ends the |mgl| evironment. It is called by the |\end{mgl}| command. It simply calls |\MGL at next| to execute the final actions, and |\MGL at includegraphics| to insert the corresponding image. Note that |\MGL at next| performs different actions depending on whether |\MGL at process@script| calls |\mgl at write@script| or |\MGL at compare@code|, both of which define |\MGL at next| differently.
 %    \begin{macrocode}
 \def\endmgl{%
-  \stepcounter{mgl at image@no}%
-  \mgl at write\mgl at script{%
-    write '\mgl at dir\jobname-mgl-\arabic{mgl at image@no}\mgl at image@ext'%
-  }%
-  \mgl at write\mgl at script{reset}%
-  \mgl at write\mgl at script{}%
-  \mgl at include@image{\mgl at dir\jobname-mgl-\arabic{mgl at image@no}}%
+  \MGL at next%
+  \MGL at includegraphics%
 }
 %    \end{macrocode}
 % \end{macro}
 % \end{environment}
+%
 % \begin{environment}{mgladdon}
-% This is just a modification of the |mgl| environment. First, we define the |\end at mgladdon| to contain the |\end{mgladdon}| command as text as specified above, then we redefined |\test at end@mgl| command to check for the end of the |mgladdon| environment instead of |mgl|, finally we call the |\mgl| command with no options. The end of |mgladdon| is defined to do nothing.
+% This environment only writes its contents to the document's main script, so no backup is created, nor compilation or inclusion of graphics.
+% \begin{macro}{\mgladdon}
+% Since this environment doesn't produce any output in the \LaTeX{} document, we start a \emph{space hack} by calling |\@bsphack|. We set the appropiate category codes with |\MGL at codes|; the |\verbatim at processline| is redefined to transcript |\the\verbatim at line| to the main script; finally, the |\verbatim at start| command starts the transcription process.
 %    \begin{macrocode}
 
-\bgroup%
-  \escapechar=-1\relax%
-  \xdef\end at mgladdon{\string\\end\string\{mgladdon\string\}}%
-\egroup%
-\newenvironment{mgladdon}{%
-  \def\test at end@mgl##1{%
-    \edef\this at line{##1}%
-    \ifx\this at line\end at mgladdon%
-      \def\next at action{\end{mgladdon}}%
-    \fi%
+\def\mgladdon{%
+  \@bsphack%
+  \MGL at codes%
+  \def\verbatim at processline{%
+    \MGL at write\MGL at main@stream{\the\verbatim at line}%
   }%
-  \mgl[]%
-}{}
+  \verbatim at start%
+}
 %    \end{macrocode}
-% \end{environment}
-% \begin{environment}{mglcode}
-% This is like |mgl|, but it writes its contents to its own file, whose name is passed as mandatory argument.
-% \begin{macro}{\mgl at script@written}
-
-% The names of all the scripts written from the \LaTeX{} document will be stored in this macro, so we can later check if some script is being overwritten. This macro will be used in other environments.
+% \end{macro}
+% \begin{macro}{\endmgladdon}
+% The environment ends by closing the \emph{space hack} with |\@esphack|.
 %    \begin{macrocode}
-\def\mgl at script@written{}
+\def\endmgladdon{\@esphack}
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mgl at out@stream}
-% Declare an output stream for MGL scripts other than the main one. This stream will be used in other environments.
+% \end{environment}
+%
+% \begin{environment}{mglfunc}
+% This environment is used to define MGL functions inside the document's main script. Instead of writing directly to the main script, which would cause the MGL parser to end the execution of that script, it writes to a backup file which is later transcript before closing the main script.
+% \begin{macro}{\mglfunc}
+% It starts the |mglfunc| environment.
 %    \begin{macrocode}
-\newwrite\mgl at out@stream
+
+\newcommand\mglfunc[2][0]{%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\mglcode}
-% The beginning of the |mglcode| environment.
+% Once again, since this command doesn't produce any output in the \LaTeX{} document, we use a \emph{space hack}.
 %    \begin{macrocode}
-\newcommand\mglcode[2][]{%
-  \def\graph at keys{}%
+  \@bsphack%
 %    \end{macrocode}
-% Process the \meta{key}=\meta{value} options. These are the same for the |mgl| environment.
+% Although MGL functions and normal scripts are diferent in nature, in the sense that the first don't produce graphics by themselves, we have to check whether the function is being named as another script, because otherwise we run the risk of overwriting a backup file or confusing the parser.
 %    \begin{macrocode}
-  \setkeys{mgl at keys}{#1}%
+  \MGL at set@script at name{#2}%
 %    \end{macrocode}
-% Test if a script with the same name is already created from the \LaTeX{} document. If so, a warning is issue, but we proceed anyway.
+% The instruction to transcript from the backup file to the main stream is stored in |\MGL at write@funcs| (see subsection \ref{subsection: anatomy}).
 %    \begin{macrocode}
-  \test at mgl@script at written{#2}%
+  \g at addto@macro\MGL at write@funcs{\MGL at func{#2}}%
 %    \end{macrocode}
-% Add the script's name to the |\mgl at script@written| macro.
+% The codes for special characters are set.
 %    \begin{macrocode}
-  \xdef\mgl at script@written{\mgl at script@written#2,}%
+  \MGL at codes%
 %    \end{macrocode}
-% Open the script for writing.
+% The |\verbatim at processline| command is redefined to write |\the\verbatim at line| to the backup file.
 %    \begin{macrocode}
-  \def\this at script{#2}%
-  \if at mgltex@on@%
-    \immediate\openout\mgl at out@stream=\mgl at dir\this at script.mgl%
-    \mglsignature at write\mgl at out@stream%
-  \fi%
+  \def\verbatim at processline{\MGL at write\MGL at out@stream{\the\verbatim at line}}%
 %    \end{macrocode}
-%   Here, we do the same changes of categories as in the |mgl| environment, except for the spaces, which in this case will be respected, even the ones at the beginning of each like, i.e., we will write each line \emph{verbatim}.
+% The backup file is opened for writing.
 %    \begin{macrocode}
-  \let\do\@makeother \dospecials%
-  \endlinechar`\^^M \catcode`\^^M\active%
-  \obeyspaces%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at backups@dir\MGL at script@name.mgl}%
 %    \end{macrocode}
-% Call the command that will write each line of the contents of the environment.
+% The head of the function is written.
 %    \begin{macrocode}
-  \expandafter\mglcode at write@line%
+  \MGL at write\MGL at out@stream{func '\MGL at script@name' #1}%
+%    \end{macrocode}
+% The writing process is started.
+%    \begin{macrocode}
+  \verbatim at start%
 }
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\test at mgl@script at written}
-% The macro that checks is we are overwriting any script.
+% \begin{macro}{\endmglfunc}
+% It ends the |mglfunc| environment.
+%    \begin{macrocode}
+\def\endmglfunc{%
+%    \end{macrocode}
+% The end of the function is written.
 %    \begin{macrocode}
-\def\test at mgl@script at written#1{%
+  \MGL at write\MGL at out@stream{return^^J}%
 %    \end{macrocode}
-% For every script already written (whose name is stored in |\mgl at script@written|), check if the current script's name matches; if so, issue a warning telling we are overwriting, but proceed.
+% The output stream is closed.
 %    \begin{macrocode}
-  \edef\this at script{#1}%
-  \@for\mgl at script@name:=\mgl at script@written\do{%
-    \ifx\this at script\mgl at script@name%
-      \PackageWarning{mgltex}{Overwriting MGL script "\this at script.mgl"}%
-    \fi%
+  \MGL at closeout\MGL at out@stream%
+%    \end{macrocode}
+% The \emph{space hack} is terminated.
+%    \begin{macrocode}
+  \@esphack%
+}%
+%    \end{macrocode}
+% \end{macro}
+% \end{environment}
+%
+% \begin{environment}{mglcode}
+% This environment also checks for changes on the code, but, since it writes to its own script, there is no need to create a backup file (the check is performed using the script itself).
+% \begin{macro}{\mglcode}
+% It starts the |mglcode| environment. Its anatomy is similar to that of the |\mgl| command.
+%    \begin{macrocode}
+
+\newcommand\mglcode[2][]{%
+  \MGL at setkeys{MGL at keys}{#1}%
+  \MGL at set@script at name{#2}%
+  \MGL at codes%
+  \MGL at process@script{%
+    \mglcode at write@script%
+  }{%
+    \MGL at compare@code{\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl}%
   }%
 }
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mglcode at write@line}
-% This writes each line of the contents of the |mglcode| environment. However, contrary to the case of the |\mgl at write@line| command, it doesn't read line by line, but character by character, and stores each word in |\mgl at word| and each line in |\mgl at line|.
+% \begin{macro}{\mglcode at write@script}
+% This command takes care of creating the script for the |mglcode| environment.
 %    \begin{macrocode}
-\newtoks\mgl at word
-\newtoks\mgl at line
-\def\mglcode at write@line#1{%
+\def\mglcode at write@script{%
 %    \end{macrocode}
-% The next action (stored as |\next at action|) is to read the following character, unless overwritten later.
+% \begin{macro}{\MGL at next}
+% It performs the actions immediately following the end of |\mglcode at write@script|.
 %    \begin{macrocode}
-  \let\next at action\mglcode at write@line%
+  \def\MGL at next{%
 %    \end{macrocode}
-% If the current character is an end-line character,
+% The output stream is closed.
 %    \begin{macrocode}
-  \expandafter\if#1\^^M%
+    \MGL at closeout\MGL at out@stream%
 %    \end{macrocode}
-% write the contents of |\mgl at line|, i.e., the current line, and clean |\mgl at word| and |\mgl at line|;
+% The |\MGL at unchanged{\MGL at script@name}| command is written to the |.aux| file.
 %    \begin{macrocode}
-    \mgl at write\mgl at out@stream{\the\mgl at line}%
-    \mgl at word{}%
-    \mgl at line{}%
+    \MGL at write\@auxout{\string\MGL at unchanged{\MGL at script@name}}%
 %    \end{macrocode}
-% if the current character is a space, clean |\mgl at word|, but add the space to |\mgl at line|;
+% The script compilation instruction is written to the terminal.
 %    \begin{macrocode}
-  \else\expandafter\if#1\space%
-    \mgl at word{}%
-    \mgl at line\expandafter{\the\mgl at line#1}%
+    \MGL at write{18}{%
+      mglconv -q \MGL at quality\space -S \MGL at scale\space%
+      -s "\MGL at dir\MGL at scripts@dir\mglcommonscriptname.mgl"\space%
+      -o "\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext"\space%
+      "\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl"%
+    }%
+  }%
 %    \end{macrocode}
-% otherwise, the current character is alphanumeric and is added both to |\mgl at word| and |\mgl at line|, and
+% \end{macro}
+% The |\verbatim at processline| command is redefined so it writes |\the\verbatim at line| to the output stream.
 %    \begin{macrocode}
-  \else%
-    \mgl at word\expandafter{\the\mgl at word#1}%
-    \mgl at line\expandafter{\the\mgl at line#1}%
+  \def\verbatim at processline{\MGL at write\MGL at out@stream{\the\verbatim at line}}%
 %    \end{macrocode}
-% we test if the current word (|\mgl at word|) is |\end{mglcode}|, in which case, |\next at action| is overwritten to |\end{mglcode}|.
+% The script is opened for writing in the output stream.
 %    \begin{macrocode}
-    \test at end@mglcode{\the\mgl at word}%
-  \fi\fi%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl}%
 %    \end{macrocode}
-% Finally, execute |\next at action|.
+% The writing process is started by calling the |\verbatim at start| command.
 %    \begin{macrocode}
-  \next at action%
-}
-%    \end{macrocode}
-% \end{macro}
-% 
-% \begin{macro}{\test at end@mglcode}
-% The |\test at end@mglcode| checks if it's argument is equal to |\end at mglcode|, in which case overwrites |\next at action| to |\end{mglcode}|.
-%    \begin{macrocode}
-\begingroup%
-  \escapechar=-1\relax%
-  \xdef\end at mglcode{\string\\end\string\{mglcode\string\}}%
-\endgroup%
-\def\test at end@mglcode#1{%
-  \edef\this at word{#1}%
-  \ifx\this at word\end at mglcode%
-    \def\next at action{\end{mglcode}}%
-  \fi%
+  \verbatim at start%
 }
 %    \end{macrocode}
 % \end{macro}
-% 
 % \begin{macro}{\endmglcode}
-% The end of the |mglcode| environment. It closes the output stream |\mgl at out@stream|, and calls the \textsf{mglconv} program (part of MathGL) to execute the script. Finally, the |\mgl at include@image| command is used to include the image created.
+% It ends the |mglcode| environment. |\MGL at next| is called to perform the final actions and |\MGL at includegraphics| is called to insert the corresponding image. Once more, |\MGL at next| has different meanings depending on whether |\MGL at process@script| branches to |\MGL at compare@code| or |\mglcode at write@script|.
 %    \begin{macrocode}
 \def\endmglcode{%
-  \immediate\closeout\mgl at out@stream%
-  \mgl at write{18}{%
-    mglconv "\mgl at dir\this at script.mgl" -s "\mgl at dir\mglcommonscript.mgl" -o "\mgl at dir\this at script\mgl at image@ext"%
-  }%
-  \mgl at include@image{\mgl at dir\this at script}%
+  \MGL at next%
+  \MGL at includegraphics%
 }
 %    \end{macrocode}
 % \end{macro}
 % \end{environment}
-% 
 % \begin{environment}{mglscript}
-% This is just a modification of the |mglcode| environment. First, we define the |\end at mglscript| macro; then we modify the |\test at end@mglcode| to check for |\end{mglscript}| instead of |\end{mglcode}|; finally, we call the |\mglcode| macro with the same mandatory argument as |mglscript|. The |\end{mglscript}| just closes the output stream |\mgl at out@stream|, but doesn't create nor includes any image.
+% The only function of this environment is to write its contents to a script; no image is created. It has been considered that scanning the code looking for changes is as much operation-expensive as simply writing the code, so it has been decided that this environment (over)writes the script everytime it's executed, without performing any check.
+% \begin{macro}{\mglscript}
+% Starts the environment. Its anatomy is similar to the previous environments. Since no output is written to the \LaTeX{} document, a \emph{space hack} is used.
 %    \begin{macrocode}
 
-\bgroup%
-  \escapechar=-1\relax%
-  \xdef\end at mglscript{\string\\end\string\{mglscript\string\}}%
-\egroup%
-\newenvironment{mglscript}[1]{%
-  \def\test at end@mglcode##1{%
-    \edef\this at word{##1}%
-    \ifx\this at word\end at mglscript%
-      \def\next at action{\end{mglscript}}%
-    \fi%
-  }%
-  \mglcode{#1}%
-}{%
-  \immediate\closeout\mgl at out@stream%
+\def\mglscript#1{%
+  \@bsphack%
+  \MGL at set@script at name{#1}%
+  \MGL at codes%
+  \def\verbatim at processline{\MGL at write\MGL at out@stream{\the\verbatim at line}}%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl}%
+  \verbatim at start%
 }
 %    \end{macrocode}
-% \end{environment}
-% 
-% \begin{environment}{mglfunc}
-% This environment is used to create MGL functions in the main script \meta{document}.mgl.
-% \begin{macro}{\mglfunc at defined}
-% Within this macro we will store the names of the MGL functions already defined from the \LaTeX{} document, so that we can check if we are overwriting one of them
-%    \begin{macrocode}
-
-\def\mglfunc at defined{}
-%    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mgl at func}
-% This is a buffer to store the instructions to write the MGL functions code when the |\end{document}| command is called. This is done this way, because the functions have to be after the \emph{stop} command from the MGL language, which stops the execution of the MGL compiler, so no code should be after the \emph{stop}, except for functions.
+% \begin{macro}{\endmglscript}
+% It ends the |mglscript| environment. The \emph{space hack} ends here, too.
 %    \begin{macrocode}
-\def\mgl at func{}
+\def\endmglscript{%
+  \MGL at closeout\MGL at out@stream%
+  \@esphack%
+}
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mglgunc}
-% The beginning of the |mglfunc| environment.
+% \end{environment}
+%
+% \begin{environment}{mglcommon}
+% This environment doesn't require any backup file nor any scanning for changes. Although the user sets the name of the script by redifining |\mglcommonscriptname|, it is necessary to perform a check of the name, just in case a name has been inadvertedly repeated.
+% \begin{macro}{\mglcommon}
+% Starts the |mglcommon| environment.
 %    \begin{macrocode}
 
-\newcommand\mglfunc[2][0]{%
-%    \end{macrocode}
-% First, check if a function with the current name is already defined, in which case we issue a warning, but proceed anyway.
-%    \begin{macrocode}
-  \test at mglfunc@defined{#2}%
+\def\mglcommon{%
+  \@bsphack%
+  \MGL at set@script at name{\mglcommonscriptname}%
+  \MGL at codes%
+  \def\verbatim at processline{\MGL at write\MGL at out@stream{\the\verbatim at line}}%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl}%
+  \verbatim at start%
+}
 %    \end{macrocode}
-% Add the name of the current function to the list of functions defined.
+% It is declared to be an only-preamble command, so it can't be used after the |\begin{document}| instruction.
 %    \begin{macrocode}
-  \g at addto@macro{\mglfunc at defined}{#2,}%
+\@onlypreamble\mglcommon
 %    \end{macrocode}
 % \end{macro}
-% Here we do the same changes of categories as in the |mgl| environment.
-%    \begin{macrocode}
-  \let\do\@makeother \dospecials%
-  \endlinechar`\^^M \catcode`\^^M\active%
-  \catcode`\ =10%
-%    \end{macrocode}
-% Write an empty line in the main script just for elegance (and to visually separate different functions, too).
-%    \begin{macrocode}
-  \g at addto@macro{\mgl at func}{\mgl at write\mgl at script{}}%
-%    \end{macrocode}
-% Write the heading of the function.
-%    \begin{macrocode}
-  \g at addto@macro{\mgl at func}{\mgl at write\mgl at script{func '#2' #1}}%
-%    \end{macrocode}
-% Call the command that will write each line of the contents of the environment.
+% \begin{macro}{\endmglcommon}
+% It ends the |mglcommon| environment.
 %    \begin{macrocode}
-  \expandafter\mglfunc at write@line%
+\def\endmglcommon{%
+  \MGL at closeout\MGL at out@stream%
+  \@esphack%
 }
 %    \end{macrocode}
-% \begin{macro}{\test at mglfunc@defined}
-% This command tests if a function with a given name---given as argument---is already defined from the \LaTeX{} document; if so, a warning will be issued indicating multiple definitions for the same function, but we will proceed anyway.
+% \end{macro}
+% \end{environment}
+%
+% \subsection{Fast creation of graphics}
+% \begin{environment}{mglsetup}
+% This environment is meant to contain code that is executed just before the instruction of a |\mglplot| command, producing always the same ouput. Instead of writing a new chunk of code for that purpose, |mglsetup| is defined as a special case of the |mglfunc| environment, with the exception that the MGL function obtained this way doesn't accept any argument ---thus producing always the same output.
+% \begin{macro}{\mglsetup}
+% It is defined as an alias for |\mglfunc|, but only the name of the MGL function is passed to it, forcing the assumption that the number of arguments for the function is zero.
 %    \begin{macrocode}
-\def\test at mglfunc@defined#1{%
-  \def\this at func{#1}%
-  \@for\mglfunc at name:=\mglfunc at defined\do{%
-    \ifx\this at func\mglfunc at name%
-      \PackageWarning{\mgl at name}{MGL function "#1" has multiple definitions}%
-    \fi%
-  }%
-}
+
+\def\mglsetup#1{\mglfunc{#1}}%
 %    \end{macrocode}
 % \end{macro}
-% We declare \emph{locally} the end-line character as active.
+% \begin{macro}{\endmglsetup}
+% Likewise, it is defined as an alias for |\endmglfunc|.
 %    \begin{macrocode}
-\begingroup%
-  \catcode`\^^M\active%
+\let\endmglsetup\endmglfunc
 %    \end{macrocode}
-% \begin{macro}{\mglfunc at write@line}
-% This is the command that reads each line of code of the |mglfunc| environment, and stores in the buffer |\mgl at func| the instructions to write each of these lines.
+% \end{macro}
+% \end{environment}
+%
+% \begin{macro}{\mglplot}
+% Although the function of this command is quite simple and straightforward, it requires many lines of code and some tricks in order to reach the desired functionality.
 %    \begin{macrocode}
-  \gdef\mglfunc at write@line#1^^M{%
+
+\newcommand\mglplot[2][]{%
 %    \end{macrocode}
-% The next action (|\next at action|) is to store in the buffer the instruction to write the current line, and then call recursively the |\mglfunc at write@line| command, unless overwritten below.
+% We add some \meta{key}=\meta{value} pairs locally. The |label| key works exactly as the one of the |mgl| environment.
 %    \begin{macrocode}
-    \def\next at action{%
-      \g at addto@macro{\mgl at func}{\mgl at write\mgl at script{#1}}%
-      \expandafter\mglfunc at write@line%
-    }%
+  \define at key{MGL at keys}{label}{\edef\MGL at script@name{##1}}%
 %    \end{macrocode}
-% Check for the end of the |mglfunc| environment, in which case, |\next at action| is redefined to be |\end{mglfunc}|.
+% The |setup| key defines the variable |\MGL at mglplot@setup| which is later used to call a setup function for the corresponding image.
 %    \begin{macrocode}
-    \test at end@mglfunc{#1}%
+  \define at key{MGL at keys}{setup}{\def\MGL at mglplot@setup{##1}}%
 %    \end{macrocode}
-% Execute |\next at action|.
+% The |separator| key uses the |\MGL at def@for at loop| to define |\MGL at for| so that it iterates over lists separated by the indicated separator symbol.
 %    \begin{macrocode}
-    \next at action%
+  \define at key{MGL at keys}{separator}{%
+    \MGL at def@for at loop{##1}%
   }%
 %    \end{macrocode}
-% \end{macro}
+% Now, we process the keys passed by the user.
 %    \begin{macrocode}
-\endgroup
+  \MGL at setkeys{MGL at keys}{#1}%
 %    \end{macrocode}
-% \begin{macro}{\end at mglfunc}
-% \begin{macro}{\test at end@mglfunc}
-% By now, we already know now these two commands work.
+% If the user hasn't specified a name using the |label| option, then a name is autogenerated following the same naming mechanism of the |mgl| environment.
 %    \begin{macrocode}
-\begingroup%
-  \escapechar=-1 \relax%
-  \xdef\end at mglfunc{\string\\end\string\{mglfunc\string\}}%
-\endgroup
-\def\test at end@mglfunc#1{%
-  \edef\this at line{#1}%
-  \ifx\this at line\end at mglfunc%
-    \def\next at action{\end{mglfunc}}%
-  \fi%
-}
+  \@ifundefined{MGL at script@name}{%
+    \stepcounter{MGL at script@no}
+    \edef\MGL at script@name{\MGL at main@script at name-MGL-\arabic{MGL at script@no}}
+  }{}%
 %    \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\endmglfunc}
-% Just stores in the buffer the instruction that closes the MGL function with the \emph{return} command.
+% The name of the script is checked.
 %    \begin{macrocode}
-\def\endmglfunc{%
-  \g at addto@macro{\mgl at func}{\mgl at write\mgl at script{return}}%
-}
-
-% \begin{environment}{mglcommon}
-% Writes its contents to a common script that will be executed together with each of the other scripts. It is useful to define constants ---for example--- that will be available to all other scripts.
-% \begin{macro}{\mglcommonscript}
-% \changes{v2.0}{2014/11/22}{Add \texttt{\backslash{}mglcommonscript} user-definable macro}
-% We define a macro to store the name of the setup script that will contain common code to all other scripts. The default name is \emph{common\_script}.mgl.
+  \MGL at set@script at name{\MGL at script@name}%
+%    \end{macrocode}
+% If the user hasn't specified a setup, then the only code that has to be written is the non-optional argument of |\mglplot|; it is stored in the temporary variable |\MGL at temp@a|.
 %    \begin{macrocode}
-
-\def\mglcommonscript{mgl_common_script}
+  \@ifundefined{MGL at mglplot@setup}{%
+    \edef\MGL at temp@a{#2}%
+  }{%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\end at mglcommon}
-% We already know the purpose of this macro.
+% If the user has specified a setup, we store the code to call the setup and the code passed by the user in the temporary variable |\MGL at temp@a|.
 %    \begin{macrocode}
-\bgroup%
-  \escapechar=-1\relax%
-  \xdef\end at mglcommon{\string\\end\string\{mglcommon\string\}}%
-\egroup%
+    \edef\MGL at temp@a{call '\MGL at mglplot@setup'^^J#2}%
+  }
 %    \end{macrocode}
-% \end{macro}
-% 
-% The |mglcommon| environment redefines the |\test at end@mglcode| so it detects the |\end{mglcommon}| command instead, and uses the |\mglcode| to create the common script.
+% If the code has changed the last time \LaTeX{} has been run, we call |\mglplot at write@script| to (re)write and (re)compile the script; otherwise, we call |\mglplot at compare@code| to check if it has changed this time.
 %    \begin{macrocode}
-\newenvironment{mglcommon}{%
-  \def\test at end@mglcode##1{%
-    \edef\this at word{##1}%
-    \ifx\this at word\end at mglcommon%
-      \def\next at action{\end{mglcommon}}%
-    \fi%
+  \MGL at process@script{%
+    \mglplot at write@script%
+  }{%
+    \mglplot at compare@code%
   }%
-  \mglcode{\mglcommonscript}%
-}{%
-  \mgl at write\mgl at out@stream{quality \mgl at quality}%
-  \immediate\closeout\mgl at out@stream%
-}
 %    \end{macrocode}
-% This environment can be used only in the preamble.
+% Finally, the corresponding image is included in the document.
 %    \begin{macrocode}
-\@onlypreamble\mglcommon
+  \MGL at includegraphics%
+}
 %    \end{macrocode}
-% \end{environment}
-% \begin{environment}{mglsignature}
-% This environment is used to declare signature text that will be written as comment on every script generated by \mglTeX.
-% \begin{macro}{\mglcomm}
-% We store the comment sign for MGL in this macro. For that, we need to declare \emph{locally} the symbol ``\#'' as one of category $12$.
+% \begin{macro}{\mglplot at write@script}
+% This command takes the code stored in the |\MGL at temp@a| variable by the |\mglplot| command and writes it to the document's main script and to a backup file, so changes in the code can be detected.
 %    \begin{macrocode}
-\bgroup
-  \catcode`#=12
-  \gdef\mglcomm{#}
-\egroup
+\def\mglplot at write@script{%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\mgltexsignature}
-% \changes{v2.0}{2014/11/22}{Add \texttt{\textbackslash{}mgltexsignature} user-definable macro}
-% The buffer where the signature will be stored. Here, we declare a default signature.
+% The default quality is written to the main script.
 %    \begin{macrocode}
-\def\mgltexsignature{%
-  \mglcomm^^J%
-  \mglcomm\space This file was autogenerated from the document \jobname.tex on date \today^^J%
-  \mglcomm%
-}
+  \MGL at write\MGL at main@stream{quality \MGL at quality}%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\mglsignature}
-% The beginning of the |mglsignature| environment.
+% The backup file is opened to write in the output stream.
 %    \begin{macrocode}
-\newcommand\mglsignature{%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at backups@dir\MGL at script@name.mgl}%
 %    \end{macrocode}
-% Delete |\mgltexsignature| contents.
+% Now we use the |\MGL at for| command to iterate over |\MGL at temp@a|. It takes a piece of code up to the separator symbol indicated by the user, and stores it in the temporary variable |\MGL at temp@b|, which is then written to the main script and backup file.
 %    \begin{macrocode}
-  \def\mgltexsignature{}%
+  \MGL at for\MGL at temp@b:=\MGL at temp@a\do{%
+    \MGL at write\MGL at main@stream{\MGL at temp@b}%
+    \MGL at write\MGL at out@stream{\MGL at temp@b}%
+  }%
 %    \end{macrocode}
-% We do the same changes of category as in the |mglcode| environment.
+% The output stream is closed.
 %    \begin{macrocode}
-  \let\do\@makeother \dospecials%
-  \endlinechar`\^^M \catcode`\^^M\active%
-  \@vobeyspaces%
+  \MGL at closeout\MGL at out@stream%
 %    \end{macrocode}
-% Call the command that will store each line of the signature in the |\mgltexsignature| macro.
+% The instructions to save the image and reset the MGL parameters are written to the main script.
 %    \begin{macrocode}
-  \expandafter\mglsignature at write@line%
-}
+  \MGL at write\MGL at main@stream{%
+    write '\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext'^^J%
+    ^^Jreset^^J%
+  }%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\end at mglsignature}
-% We already know the purpose of this command.
+% Finally, |\MGL at unchanged{\MGL at script@name}| is written to the |.aux| file.
 %    \begin{macrocode}
-\begingroup%
-  \escapechar=-1 \relax%
-  \xdef\end at mglsignature{\string\\end\string\{mglsignature\string\}}%
-\endgroup
+  \MGL at write\@auxout{\string\MGL at unchanged{\MGL at script@name}}%
+}
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mglsignature at write@line}
-% This command stores each line of the signature in the |\mgltexsignature| buffer.
+% \begin{macro}{\mglplot at compare@code}
+% This macro is in charge of comparing the code from a |\mglplot| command to detect changes.
 %    \begin{macrocode}
-\begingroup%
-%   \catcode`\\=0%
-  \catcode`\^^M\active%
-  \gdef\mglsignature at write@line#1^^M{%
+\def\mglplot at compare@code{%
 %    \end{macrocode}
-% Unless overwritten later, the next action (|\next at action|) is to store the current line of the signature in the |\mgltexsignature| buffer, ending with a new-line character, and call |\mglsignature at write@line| recursively.
+% The action that will finish this command is, for now, to write |\MGL at unchanged{\MGL at script@name}| in the |.aux| file; it is stored in the |\MGL at next| variable. If no changes in the code are found, this will remain as the last action; otherwise, it will be overwritten to do nothing.
 %    \begin{macrocode}
-    \def\next at action{%
-      \g at addto@macro{\mgltexsignature}{\mglcomm\space#1^^J}
-      \mglsignature at write@line%
-    }%
+  \def\MGL at next{\MGL at write\@auxout{\string\MGL at unchanged{\MGL at script@name}}}%
 %    \end{macrocode}
-% We check if the current line is |\end{mglsignature}|, in which case, overwrite |\next at action| to that command.
+% The backup file is opened for reading in the input stream.
 %    \begin{macrocode}
-    \test at end@mglsignature{#1}%
+  \MGL at openin\MGL at in@stream{\MGL at dir\MGL at backups@dir\MGL at script@name.mgl}%
 %    \end{macrocode}
-% Execute |\next at action|.
+% Once again, the |\MGL at for| command is used to iterate over the |\MGL at temp@a| variable defined by |\mglplot|. Pieces of code are taken up to the appearance of the separator symbol indicated by the user. In every iteration, the corresponding piece of code is stored in the |\MGL at temp@b| variable, one line of code is read from the input stream to the variable |\MGL at temp@c|, and these two are compared; if they are different, we redefined |\MGL at next| to do nothing.
 %    \begin{macrocode}
-    \next at action%
+  \MGL at for\MGL at temp@b:=\MGL at temp@a\do{%
+    \MGL at read\MGL at in@stream{\MGL at temp@c}%
+    \ifx\MGL at temp@b\MGL at temp@c\else%
+      \let\MGL at next\relax%
+    \fi%
   }%
-\endgroup
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\test at end@mglsignature}
-% We already know the purpose of this command.
+% The input stream is closed.
 %    \begin{macrocode}
-\def\test at end@mglsignature#1{%
-  \edef\this at line{#1}%
-  \ifx\this at line\end at mglsignature%
-    \def\next at action{\end{mglsignature}}%
-  \fi%
-}
+  \MGL at closein\MGL at in@stream%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\endmglsignature}
-% The end of the |mglsignature| environment. It just adds a comment sign to |\mgltexsignature| for elegance.
+% |\MGL at next| is executed.
 %    \begin{macrocode}
-\def\endmglsignature{%
-  \g at addto@macro{\mgltexsignature}{\mglcomm}
+  \MGL at next%
 }
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mglsignature at write}
-% It takes care of writing the signature to the output stream which is passed as its argument.
-%    \begin{macrocode}
-\def\mglsignature at write#1{\mgl at write#1{\mgltexsignature}}
-%    \end{macrocode}
 % \end{macro}
-% \end{environment}
-% \begin{environment}{mglcomment}
-% \changes{v2.0}{2014/11/22}{Add the |mglcomment| environment.}
-% An environment to contain multiline comments that won't be printed to the document nor to any script in the case of the user passes the option |nocomments| to the package, and it'll print the comments if the |comments| option is passed to the package.
-% 
-% \begin{macro}{\mglcomment}
-% The beginning of the |mglcomment| environment. Here, we change categories of special characters (like \#, \@, etc.) and indicate to obey lines and spaces.
+%
+% \subsection{Verbatim-like environments}
+% \begin{environment}{mglblock}
+% \begin{environment}{mglblock*}
+% The main body of these environments is the same; the only difference is that the unstarred version creates an entry in the |\listofmglscripts|, while the starred version doesn't.
+% \begin{macro}{\mglblock}
+% This command defines the switch |\@MGL at list@script@| as true, so a |\listofmglscripts| entry for the code is created, then calls the main body of the environment (|\mglblock@|).
 %    \begin{macrocode}
 
-\def\mglcomment{%
-  \let\do\@makeother\dospecials%
-  \obeylines%
-  \@vobeyspaces%
-  \verbatim at font%
-  \small%
+\def\mglblock{\@MGL at list@script at true\mglblock@}
 %    \end{macrocode}
-% Call the command that will ignore all the commentary.
+% \end{macro}
+% \begin{macro}{\mglblock*}
+% This command defines the switch |\@MGL at list@script@| as false, so no |\listofmglscripts| entry is created, then calls the main body of the environment (|\mglblock@|).
 %    \begin{macrocode}
-  \mgl at comment%
-}
+\@namedef{mglblock*}{\@MGL at list@script at false\mglblock@}
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mgl at comment}
-% This command reads everything up to the |\end{mglcomment}| and ignores it if the |nocomments| option is passed to the package, or prints it otherwise. (We use the trick to consider everything up to the |\end{mglcomment}| the argument of |\mgl at comment|.)
+% \begin{macro}{\mglblock@}
+% This macro contains the real functionality of the |mglblock| and |mglblock*| environments. It is the common code they both have.
 %    \begin{macrocode}
-\begingroup%
+\newcommand\mglblock@[2][]{%
 %    \end{macrocode}
-% We do some adequate changes of code locally, so that \texttt{\textbackslash}, \texttt{\{} and \texttt{\}} are special, and \texttt{\textbar}, \texttt{[} and \texttt{]} take their functions, respectively.
+% First, the switch |\@MGL at lineno@| is set to true, so the lines of code will be numbered by default.
 %    \begin{macrocode}
-  \catcode`|=0\catcode`[= 1\catcode`]=2\catcode`\{=12\catcode`\}=12\catcode`\\=12%
+  \@MGL at lineno@true%
 %    \end{macrocode}
-% Define |\mgl at comment| to do nothing with its argument if the |nocomments| option has been passed to the package; otherwise, if the |comments| options has been passed, it will print the commentary, with delimiters to indicate where it starts and where it ends. Then call the end of the environment.
+% Now we process the decision of the user of keeping the line numbering or not.
 %    \begin{macrocode}
-  |gdef|mgl at comment#1\end{mglcomment}[%
-    |if at mgl@comments@%
-      |begin[center]%
-        <------------------ MGL comment ------------------>%
-        #1%
-        <------------------ MGL comment ------------------>%
-      |end[center]%
-    |fi%
-    |end[mglcomment]]%
-|endgroup%
+  \setkeys{MGL at verb@keys}{#1}%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\endmglcomment}
-% The end of the environment; it does nothing.
+% The name of the script is checked for repetition.
 %    \begin{macrocode}
-\def\endmglcomment{}
+  \MGL at set@script at name{#2}%
 %    \end{macrocode}
-% \end{macro}
-% \end{environment}
-
-% \subsection{Fast creation of graphics}
-% \begin{environment}{mglsetup}
-% This environment is used to store lines of code that need to be repeated many times. Later, the |\mglplot| command (see below) uses this lines of code without the need to repeat them.
-% \begin{macro}{\mglsetup at defined}
-% A macro to list the names of all the setups already defined.
+% If the switch |\@MGL at list@script@| is true, we increase the counter for verbatim code (|MGL at verb@script at no|), and add a contents line to the |.lms| file, using the style set by |\l at MGL@script|. In order to be able to use special characters in the name of the script, we use the |\detokenize| primitive.
 %    \begin{macrocode}
-
-\def\mglsetup at defined{}
+  \if at MGL@list at script@%
+    \refstepcounter{MGL at verb@script at no}%
+    \addcontentsline{lms}{MGL at script}{%
+      \protect\numberline{\theMGL at verb@script at no.}%
+      {\ttfamily\protect\detokenize{\MGL at script@name.mgl}}%
+    }%
+  \fi%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\mglsetup}
-% The beginning of the |mglsetup| environment. It accepts one optional argument, which is a name (keyword) to be associated to the block of code.
+% If the switch |\@MGL at lineno@| is true, we create a list such that each item will be labeled or numbered by the |MGL at lineno| counter. The style for the label is set by |\mgllinenostyle|.
 %    \begin{macrocode}
-\newcommand\mglsetup[1][generic]{%
+  \if at MGL@lineno@%
+    \list{\mgllinenostyle\arabic{MGL at line@no}.}{\usecounter{MGL at line@no}}%
 %    \end{macrocode}
-% Test if there already exists a setup with the current name; if so, issue a warning of redefinition of the setup, but proceed anyway.
+% Otherwise, we create a list without labeling for the items.
 %    \begin{macrocode}
-  \test at mglsetup@defined{#1}%
+  \else%
+    \list{}{}%
+  \fi%
 %    \end{macrocode}
-% Add the name of the current setup to |\mglsetup at defined|.
+% The parameters for the environment are set.
 %    \begin{macrocode}
-  \g at addto@macro{\mglsetup at defined}{#1,}%
+  \MGL at set@verbatim at code%
 %    \end{macrocode}
-% Define a new buffer which will contain the instructions to write the contents of the environment when the |\mglplot|. command is used. If the |mglsetup| environment is called like |\mglsetup\oarg{\meta{keyword}}|, the buffer will be called |\mgl at setup@\meta{keyword}|; if no name is given, use ``generic'' as keyword.
+% The thickness of the box that will contain the name of the script has to be the same as the thickness for the separation line at the begining of the verbatim code.
 %    \begin{macrocode}
-  \expandafter\def\csname mgl at setup@#1\endcsname{\mgl at write\mgl at script{}}%
-  \expandafter\def\csname mgl at setup@#1\endcsname{\mgl at write\mgl at script{quality \mgl at quality}}%
+  \fboxrule=\mgllinethickness%
 %    \end{macrocode}
-% Here, we do the same changes of category for special characters as we did in the |mgl| environment.
+% The separator to indicate the begining of the verbatim code is positioned; we use the |\MGL at line@sep| command to draw it.
 %    \begin{macrocode}
-  \let\do\@makeother \dospecials%
-  \endlinechar`\^^M \catcode`\^^M\active%
-  \catcode`\ =10%
+  \item[\MGL at line@sep]\fbox{%
+    \bfseries\ttfamily\expandafter\detokenize\expandafter{\MGL at script@name.mgl}%
+  }\hskip\labelsep\MGL at line@sep\par\par%
 %    \end{macrocode}
-% Call the command that will store in the buffer the instructions to write the lines of MGL code.
+% The |\verbatim at processline| is redefined to put |\the\verbatim at line| in an item of the list, and to to also write it to the script file.
 %    \begin{macrocode}
-  \expandafter\mglsetup at write@line%
-}
+  \def\verbatim at processline{%
+    \item\the\verbatim at line%
+    \MGL at write\MGL at out@stream{\the\verbatim at line}%
+  }%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\test at mglsetup@defined}
-% For every name stored in |\mglsetup at defined|, check if its argument (the name of the current setup) matches, in which case we will issue a warning, but proceed.
+% The script file is opened for writing.
 %    \begin{macrocode}
-\def\test at mglsetup@defined#1{%
-  \def\this at setup{#1}%
-  \@for\mglsetup at name:=\mglsetup at defined\do{%
-    \ifx\this at mglsetup\mglsetup at name%
-      \PackageWarning{\mgl at name}{Redefining "#1" setup for \noexpand\mglplot}%
-    \fi%
-  }%
-}
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl}%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\mglsetup at write@line}
-% This works exactly as the |\mgl at write@line|, but instead of writing directly to a script, it stores the writing instructions in the buffer.
+% The writing process starts.
 %    \begin{macrocode}
-\begingroup%
-  \catcode`\^^M\active%
-  \gdef\mglsetup at write@line#1^^M{%
-    \def\next at action{%
-      \expandafter\g at addto@macro\csname mgl at setup@\this at setup\endcsname{%
-        \mgl at write\mgl at script{#1}%
-      }%
-      \expandafter\mglsetup at write@line%
-    }%
-    \test at end@mglsetup{#1}%
-    \next at action%
-  }%
-\endgroup
+  \verbatim at start%
+}
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\end at mglsetup}
-% \begin{macro}{\test at end@mglsetup}
-% We already know how these two macros work
+% \begin{macro}{\endmglblock}
+% To finish the environment's work, the script file is closed, the separator indicating the end of the verbatim code is placed, and the list is ended.
 %    \begin{macrocode}
-\begingroup%
-  \escapechar=-1 \relax%
-  \xdef\end at mglsetup{\string\\end\string\{mglsetup\string\}}%
-\endgroup
-\def\test at end@mglsetup#1{%
-  \edef\this at line{#1}%
-  \ifx\this at line\end at mglsetup%
-    \def\next at action{\end{mglsetup}}%
-  \fi%
+\def\endmglblock{%
+  \MGL at closeout\MGL at out@stream%
+  \item[\MGL at line@sep]\hskip-\labelsep\MGL at line@sep%
+  \endlist%
 }
 %    \end{macrocode}
 % \end{macro}
-% \end{macro}
-% \begin{macro}{\endmglsetup}
-% The end of the |mglsetup| environment. It does nothing.
+% \begin{macro}{\endmglblock*}
+% It's defined as an alias for |\endmglblock|.
 %    \begin{macrocode}
-\def\endmglsetup{}
+\expandafter\let\csname endmglblock*\endcsname\endmglblock
 %    \end{macrocode}
 % \end{macro}
 % \end{environment}
-
-% \begin{macro}{\mglplot}
-% This macro uses the blocks of code stored by |mglsetup| environments to complete the code contained in its mandatory argument.
-% 
-% If there is an optional argument, make |\@mglplot| process it, otherwise pass no argument to |\@mglplot|.
+% \end{environment}
+%
+% \begin{environment}{mglverbatim}
+% \begin{environment}{mglverbatim*}
+% These two environments have the same main body. They difference in that the unstarred version creates an entry for the |\listofmglscripts|, while the starred version doesn't. We will apply a similar approach to the used for the |mglblock| and |mglblock*| environments.
+% \begin{macro}{\mglverbatim}
+% Similar in function to |\mglblock|.
 %    \begin{macrocode}
 
-\def\mglplot{%
-  \@ifnextchar[{\@mglplot}{\@mglplot[]}%
-}
+\def\mglverbatim{\@MGL at list@script at true\mglverbatim@}
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\@mglplot}
-% This command receives one mandatory argument, but enclosed between brackets; so it receives the optional argument of |\mglplot|.
-%    \begin{macrocode}
-\def\@mglplot[#1]{%
-%    \end{macrocode}
-% Unless overwritten by the user with the |setup=\meta{setup}| option,  the default setup is ``generic''; initialize the |\graph at keys| macro; process the \meta{key}=\meta{value} pairs passed by the user; increase the counter |mgl at image@no| for numbering and naming of images.
+% \begin{macro}{\mglverbatim}
+% Similar in function to |\mglblock*|.
 %    \begin{macrocode}
-  \def\mglplot at setup{generic}%
-  \def\graph at keys{}%
-  \setkeys{mglplot at keys}{#1}%
-  \stepcounter{mgl at image@no}%
+\@namedef{mglverbatim*}{\@MGL at list@script at false\mglverbatim@}
 %    \end{macrocode}
-% If the given setup is undefined, issue a package error; otherwise, execute the buffer of the setup, which will write the contents of the corresponding |mglsetup| blocks to the general script.
+% \end{macro}
+% \begin{macro}{\mglverbatim@}
+% The main body of these environments; it's similar to |\mglblock@|. To explain each line of this command would be repetitive, so we explain only the different parts.
 %    \begin{macrocode}
-  \ifx\csname mgl at setup@\mglplot at setup\endcsname\@undefined%
-    \PackageError{\mgl at name}{Setup "\mglplot at setup" undefined}{}%
+\newcommand\mglverbatim@[1][]{%
+  \@MGL at lineno@true%
+  \define at key{MGL at verb@keys}{label}{\edef\MGL at script@name{##1}}%
+  \setkeys{MGL at verb@keys}{#1}%
+  \if at MGL@lineno@%
+    \list{\mgllinenostyle\arabic{MGL at line@no}.}{\usecounter{MGL at line@no}}%
   \else%
-    \csname mgl at setup@\mglplot at setup\endcsname%
+    \list{}{}%
   \fi%
+  \MGL at set@verbatim at code%
+  \fboxrule=\mgllinethickness%
+%    \end{macrocode}
+% The separator that indicates the begining of the verbatim code is different depending on whether the user has specified a name associated to the code or not. If no name has been indicated, i.e., |\MGL at script@name| is undefined, the separator is just a line; otherwise, i.e., |\MGL at script@name| is defined, the separator is similar to the one of the |mglblock| environment.
+%    \begin{macrocode}
+  \@ifundefined{MGL at script@name}{%
+    \edef\MGL at script@name{\mglverbatimname}%
+    \item[\MGL at line@sep]\hskip-\labelsep\MGL at line@sep%
+  }{%
+    \item[\MGL at line@sep]\fbox{%
+      \bfseries\ttfamily\expandafter\detokenize\expandafter{\MGL at script@name.mgl}%
+    }\hskip\labelsep\MGL at line@sep\par\par%
+  }%
 %    \end{macrocode}
-% Call |\@@mglplot| (see below).
+% Note that, if the user requests an entry in the |\listofmglscripts|, the contents line is added to the same |.lms| file. So here start the similitudes again.
 %    \begin{macrocode}
-  \@@mglplot%
+  \if at MGL@list at script@%
+    \refstepcounter{MGL at verb@script at no}%
+    \addcontentsline{lms}{MGL at script}{%
+      \protect\numberline{\theMGL at verb@script at no.}%
+      {\ttfamily\protect\detokenize{\MGL at script@name}}%
+    }%
+  \fi%
+  \def\verbatim at processline{%
+    \item\the\verbatim at line%
+  }%
+  \verbatim at start%
 }
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\@@mglplot}
-% This command writes its argument verbatim to the main script, then writes the command to save the corresponding image, and the \emph{reset} command to prepare MathGL for the next image; finally, it uses the |\mgl at include@image| to include the corresponding graphics in the document.
+% \begin{macro}{\endmglverbatim}
+% This command could be defined as an alias for |\endmglblock|, for they execute the same instructions. But, for the sake of congruence, we rewrite the code.
 %    \begin{macrocode}
-\long\def\@@mglplot#1{%
-  \mgl at write\mgl at script{\detokenize{#1}}%
-  \mgl at write\mgl at script{%
-    write '\mgl at dir\jobname-mgl-\arabic{mgl at image@no}\mgl at image@ext'%
-  }%
-  \mgl at write\mgl at script{reset}%
-  \mgl at include@image{\mgl at dir\jobname-mgl-\arabic{mgl at image@no}}%
+\def\endmglverbatim{%
+  \MGL at closeout\MGL at out@stream%
+  \item[\MGL at line@sep]\hskip-\labelsep\MGL at line@sep%
+  \endlist%
 }
 %    \end{macrocode}
 % \end{macro}
-% \subsection{Verbatim-like environments}
-% \begin{macro}{mgl at verb@line at no}
-% \noindent We create a counter to number the lines of code in verbatim-like environments.
+% \begin{macro}{\endmglverbatim*}
+% It is an alias for |\endmglverbatim|.
 %    \begin{macrocode}
-
-\newcounter{mgl at verb@line at no}
+\expandafter\let\csname endmglverbatim*\endcsname\endmglverbatim
 %    \end{macrocode}
 % \end{macro}
-% \begin{environment}{mglverbatim}
-% This environment writes its contents \emph{verbatim} to the \LaTeX{} document, numbering each line of code.
-% \begin{macro}{\mglverbatim}
-% The beginning of the |mglverbatim| environment.
+% \end{environment}
+% \end{environment}
+%
+% \begin{environment}{mglcomment}
+% This environment has two different behaviors: When commentaries are allowed by the user, it behaves similarly to the |mglverbatim| environment; if commentaries are not allowed, it behaves as the |comment| environment from the \textsf{verbatim} package. So it is natural that we borrow code from them and adapt it to the corresponding situation.
+% \begin{macro}{\mglcomment}
+% The switch |\@MGL at comments@| governs the behavior of this command.
 %    \begin{macrocode}
 
-\def\mglverbatim{%
-%    \end{macrocode}
-% Initialize the counter for lines of code.
-%    \begin{macrocode}
-  \setcounter{mgl at verb@line at no}{0}%
+\def\mglcomment{%
 %    \end{macrocode}
-% We use the list environment to set the numeration of the lines of code that will be written to the \LaTeX{} document as items of the list. We also set the separation between lines of code, the indentation of the line, and some other length parameters.
+% If the switch is true, i.e., the user requests displaying of commentaries, we start a list without labels, and set the parameters for verbatim text.
 %    \begin{macrocode}
-  \list{\itshape\footnotesize\arabic{mgl at verb@line at no}.}{}%
-  \setlength{\labelsep}{1em}%
-  \itemsep\z at skip%
-  \leftskip\z at skip\rightskip\z at skip%
-  \parindent\z@\parfillskip\@flushglue\parskip\z at skip%
+  \if at MGL@comments@%
+    \list{}{}%
+    \MGL at set@verbatim at code%
 %    \end{macrocode}
-% We do the same changes of categories as in the |mglcode| environment.
+% The separator indicating the begining of the commentary is similar to the one used by the |mglblock| and |mglverbatim| environments; the differences are that, instead of using a solid line, we use a dashed line (|\MGL at dash@sep|), and instead of displaying the name of a script, we display |\mglcommentname|.
 %    \begin{macrocode}
-  \let\do\@makeother \dospecials%
-  \endlinechar`\^^M \catcode`\^^M\active%
-  \obeyspaces%
+    \item\hskip-\labelsep<\MGL at dash@sep\mglcommentname\MGL at dash@sep>%
 %    \end{macrocode}
-% use verbatim font.
+% The two following lines redefine the |\verbatim at processline| command to display the commentary text line by line as items of the list, and start the process of writing the text.
 %    \begin{macrocode}
-  \verbatim at font%
+    \def\verbatim at processline{\item\the\verbatim at line}%
+    \verbatim at start%
 %    \end{macrocode}
-% Call the command that will write each line of the contents of the environment.
+% If the switch is false, i.e., the user requests no to display commentaries, we start a \emph{space hack}, since no text output will be produced. Then, the category codes are changed with |\MGL at codes|, and the macros |\verbatim at startline|, |\verbatim at addtoline|, |\verbatim at processline| and |\verbatim at finish| are disabled, as done in the |comment| environment of the \textsf{verbatim} package. Finally, we call the |\verbatim@| command to start reading the text in the environment.
 %    \begin{macrocode}
-  \expandafter\mglverbatim at ignore@line%
+  \else%
+    \@bsphack%
+    \MGL at codes%
+    \let\verbatim at startline\relax%
+    \let\verbatim at addtoline\@gobble%
+    \let\verbatim at processline\relax%
+    \let\verbatim at finish\relax%
+    \verbatim@%
+  \fi%
 }
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mglverbatim at ignore@line}
-% This command ignores the first line of the |verbatim| environment, which is an empty line.
+% \begin{macro}{\endmglcomment}
+% The |\@MGL at comments@| switch also governs the behavior of this command. If it's true, then the separator that ends the commentary ---which is the same as the one that starts it--- is displayed, and the list is ended; otherwise, simply the \emph{space hack} is ended.
 %    \begin{macrocode}
-\def\mglverbatim at ignore@line#1{%
-  \expandafter\mglverbatim at write@line%
+\def\endmglcomment{%
+  \if at MGL@comments@%
+    \item\hskip-\labelsep<\MGL at dash@sep\mglcommentname\MGL at dash@sep>%
+    \endlist%
+  \else%
+    \@esphack%
+  \fi%
 }
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mglverbatim at write@line}
-% Reads the contents of the |mglverbatim| character by character, and stores words in the |\mgl at word| buffer and lines in the |\mgl at line| buffer, just like the |mglcode| environment did.
+% \end{environment}
+%
+% \subsection{Commands for external scripts}
+% \noindent Since external scripts exist independently of the \LaTeX{} document, there is no need of environments to process them, just commands. Remember these commands work on the suposition that the scripts don't change.
+%
+% \begin{macro}{\mglgraphics}
+% This command compiles the external script and includes it in the document. Although that process is simple, the code to execute it is relatively large due to the possibility of the user specifying an optional path, so many parameters have to be checked.
 %    \begin{macrocode}
-\def\mglverbatim at write@line#1{%
+
+\newcommand\mglgraphics[2][]{%
 %    \end{macrocode}
-% Unless overwritten later, the next action (|\next at action|) is recursively call |\mglverbatim at write@line|.
+% In order to keep all definitions and changes local, we start a local group inside which all \LaTeX{} code will be contained.
 %    \begin{macrocode}
-  \let\next at action\mglverbatim at write@line%
+  \bgroup%
 %    \end{macrocode}
-% If the character read is an end-line character,
+% We add the option |path| for the user to be able to specify the location of the script, which is stored in the variable |\MGL at force@path|.
 %    \begin{macrocode}
-  \expandafter\if#1\^^M%
+  \define at key{MGL at keys}{path}{\def\MGL at forced@path{##1}}%
 %    \end{macrocode}
-% increase the line of code counter, write the line contained in |\mgl at line| as an item of the |list| environment, and clean |\mgl at word| and |\mgl at line|;
+% The optional arguments are processed.
 %    \begin{macrocode}
-    \stepcounter{mgl at verb@line at no}%
-    \item\mbox{\the\mgl at line}%
-    \mgl at word{}%
-    \mgl at line{}%
+  \MGL at setkeys{MGL at keys}{#1}%
 %    \end{macrocode}
-% if the character is a space, clean |\mgl at wors|, but add the space to |\mgl at line|;
+% The name of the script is set, though it is not check for multiple naming. This is necessary, since |\MGL at includegraphics| uses this macro.
 %    \begin{macrocode}
-  \else\expandafter\if#1\space%
-    \mgl at word{}%
-    \mgl at line\expandafter{\the\mgl at line#1}%
+  \edef\MGL at script@name{#2}%
 %    \end{macrocode}
-% otherwise, the character is aphanumeric, so add it to the |\mgl at word| and |\mgl at line| buffers, and check if |\mgl at word| is |\end{mglverbatim}|, in which case overwrite |\next at action| to be that command.
+% If the corresponding image exists, then this script has been compiled in a previous \LaTeX{} run, so nothing is done, but the inclusion of the image.
 %    \begin{macrocode}
-  \else%
-    \mgl at word\expandafter{\the\mgl at word#1}%
-    \mgl at line\expandafter{\the\mgl at line#1}%
-    \test at end@mglverbatim{\the\mgl at word}%
-  \fi\fi%
-  \next at action%
-}
+  \IfFileExists{\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext}{}{%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\end at mglverbatim}
-% \begin{macro}{\test at end@mglverbatim}
-% We already know the purpose of these macros.
+% If the image doesn't exist, we check if the user has specified a custom location.
 %    \begin{macrocode}
-\begingroup%
-  \escapechar=-1\relax%
-  \xdef\end at mglverbatim{\string\\end\string\{mglverbatim\string\}}%
-\endgroup%
-\def\test at end@mglverbatim#1{%
-  \edef\this at word{#1}%
-  \ifx\this at word\end at mglverbatim%
-    \def\next at action{\end{mglverbatim}}%
-  \fi%
-}
+    \@ifundefined{MGL at forced@path}{%
 %    \end{macrocode}
-% \end{macro}
-% \end{macro}
+% If no custom location has been used, we iterate over the list of search paths (|\MGL at paths|): If we find the requested script, then we store its location in |\MGL at temp@b|.
 %    \begin{macrocode}
+      \@for\MGL at temp@a:=\MGL at paths\do{%
+        \IfFileExists{\MGL at temp@a\MGL at script@name.mgl}{%
+          \edef\MGL at temp@b{\MGL at temp@a}%
+        }{}%
+      }%
+    }{%
 %    \end{macrocode}
-% \begin{macro}{\endmglverbaim}
-% The end of the |mglverbatim| environment. It just closes the |list| environment.
+% If the user has specified a path for the script, we check if the script actually exists. If it does, we store its location inside |\MGL at temp@b|.
 %    \begin{macrocode}
-\def\endmglverbatim{\endlist}
+      \IfFileExists{\MGL at forced@path\MGL at script@name.mgl}{%
+        \edef\MGL at temp@b{\MGL at forced@path}%
+      }{}%
+    }%
 %    \end{macrocode}
-% \end{macro}
-% \end{environment}
-% \begin{environment}{mglblock}
-% This environment writes its contents to a script, whose name is passed as mandatory argument, ad then it also writes its contents to the \LaTeX{} document, numbering each line.
-% \begin{macro}{\mglblock}
-% The beginning of the |mglblock environment|.
+% If |\MGL at temp@b| is not defined, the script has not been found, so a warning is issued.
 %    \begin{macrocode}
-
-\def\mglblock#1{%
+    \@ifundefined{MGL at temp@b}{%
+      \PackageWarning{mgltex}{%
+        MGL script "\MGL at script@name.mgl" not found%
+      }%
+    }{%
 %    \end{macrocode}
-% Check if the script already exists, in which case we issue a warning, but proceed anyway.
+% If |\MGL at temp@b| is defined, the script has been found, so we compile it.
 %    \begin{macrocode}
-  \test at mgl@script at written{#1}%
+      \MGL at write{18}{%
+        mglconv -q \MGL at quality\space -S \MGL at scale\space%
+        -s "\MGL at dir\MGL at scripts@dir\mglcommonscriptname.mgl"\space%
+        -o "\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext"\space%
+        "\MGL at temp@b\MGL at script@name.mgl"%
+      }%
+    }%
+  }%
 %    \end{macrocode}
-% Add the name of the script to the list of scripts written.
+% The image is included.
 %    \begin{macrocode}
-  \xdef\mgl at script@written{\mgl at script@written#1,}%
+  \MGL at includegraphics%
 %    \end{macrocode}
-% We make the same changes of categories as in the |mglcode| environment.
+% The local group ends here.
 %    \begin{macrocode}
-  \let\do\@makeother \dospecials%
-  \endlinechar`\^^M \catcode`\^^M\active%
-  \obeyspaces%
+  \egroup%
+}
 %    \end{macrocode}
-% Open the output stream for the current script.
+% \end{macro}
+%
+% \begin{macro}{\mglinclude}\begin{macro}{\mglinclude*}
+% The purpose of these commands is to transcript the MGL code from a script. Once again, this is a straightforward functionality, but the code is quite large, so it has been separated in various macros.
+%
+% The unstarred version defines the |\@MGL at list@script@| switch to be true, so the script is listed with the |\listofmglscripts| command, and then it calls the main body of code (|\mglinclude@|), just like the |mglblock| environment does. The starred version defines the switch as false and calls the main body, too.
 %    \begin{macrocode}
-  \def\this at script{#1}%
-  \if at mgltex@on@%
-    \immediate\openout\mgl at out@stream="\mgl at dir\this at script.mgl"%
-    \mglsignature at write\mgl at out@stream%
-  \fi%
+
+\def\mglinclude{\@MGL at list@script at true\mglinclude@}
+\@namedef{mglinclude*}{\@MGL at list@script at false\mglinclude@}
 %    \end{macrocode}
-% Call the command that will write each line of the contents of the environment.
+% \begin{macro}{\mglinclude@}
 %    \begin{macrocode}
-  \expandafter\mglblock at write@line%
-}
+\newcommand\mglinclude@[2][]{%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\mglblock at write@line}
-% This macro reads characater by character the code inside |mglblock|, and uses the |\mgl at word| and |\mgl at line| buffers to store words and lines of codes, just like we did with the |mglcode| environment.
+% We start a local group to keep definitions and changes local.
 %    \begin{macrocode}
-\def\mglblock at write@line#1{%
+  \bgroup%
 %    \end{macrocode}
-% The next action (|\next at action|) is set to recursively call |\mglblock at write@line|, unless it is overwritten later.
+% The default behavior is to number lines of MGL code, so the switch |\@MGL at lineno@| is set to true.
 %    \begin{macrocode}
-  \let\next at action\mglblock at write@line%
+  \@MGL at lineno@true%
 %    \end{macrocode}
-% If the read character is an end-line character, write the contents of |\mgl at line| to the script, and the clean |\mgl at word| and |\mgl at line|;
+% We add the option |path| for the user to be able to specify the location of the script, which is stored in |\MGL at forced@path|.
 %    \begin{macrocode}
-  \expandafter\if#1\^^M%
-    \mgl at write\mgl at out@stream{\the\mgl at line}%
-    \mgl at word{}%
-    \mgl at line{}%
+  \define at key{MGL at verb@keys}{path}{\def\MGL at forced@path{##1}}%
 %    \end{macrocode}
-% if the read character if a space, clean |\mgl at word|, but add the space to |\mgl at line|;
+% The options are processed.
 %    \begin{macrocode}
-  \else\expandafter\if#1\space%
-    \mgl at word{}%
-    \mgl at line\expandafter{\the\mgl at line#1}%
+  \setkeys{MGL at verb@keys}{#1}%
 %    \end{macrocode}
-% otherwise, the character is alphnumeric, and should be added to |\mgl at word| and |\mgl at line|, and we test if |\mgl at word| is |\end{mglblock}|, in which case, we overwrite |\next at action| to that command.
+% We don't need to check if there are multiple scripts with the same name, so we namually set |\MGL at script@name|, instead of using |\MGL at set@script at name|.
 %    \begin{macrocode}
-  \else%
-    \mgl at word\expandafter{\the\mgl at word#1}%
-    \mgl at line\expandafter{\the\mgl at line#1}%
-    \test at end@mglblock{\the\mgl at word}%
-  \fi\fi%
+  \edef\MGL at script@name{#2}%
 %    \end{macrocode}
-% Execute |\next at action|.
+% We check if the user has specified a custom location for the script.
 %    \begin{macrocode}
-  \next at action%
-}
+  \@ifundefined{MGL at forced@path}{%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\end at mglblock}
-% \begin{macro}{\test at end@mglblock}
-% We already know the purpose of these macros.
+% If no custom location has been used, we iterate over the list |\MGL at paths| to find the script.
 %    \begin{macrocode}
-\begingroup%
-  \escapechar=-1\relax%
-  \xdef\end at mglblock{\string\\end\string\{mglblock\string\}}%
-\endgroup%
-\def\test at end@mglblock#1{%
-  \edef\this at word{#1}%
-  \ifx\this at word\end at mglblock%
-    \def\next at action{\end{mglblock}}%
-  \fi%
-}
+    \@for\MGL at temp@b:=\MGL at paths\do{%
 %    \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\mgl at in@stream}
-% We create an input stream to read from MGL scripts.
+% If the script exists, we store its location in |\MGL at temp@a|%
 %    \begin{macrocode}
-\newread\mgl at in@stream
+      \IfFileExists{\MGL at temp@b\MGL at script@name.mgl}{%
+        \edef\MGL at temp@a{\MGL at temp@b}%
+      }{}%
+    }%
+  }{%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\endmglblock}
-% The end of the |mglblock| environment.
+% If the user specified the location of the script, we check if it exists, in which case we store its location in |\MGL at temp@a|.
 %    \begin{macrocode}
-\def\endmglblock{%
+    \IfFileExists{\MGL at script@name.mgl}{%
+      \edef\MGL at temp@a{\MGL at forced@path}%
+    }{}%
+  }%
 %    \end{macrocode}
-% Close the output stream.
+% If |\MGL at temp@a| is not defined, the script has not been found, so we issue a warning, and display a box in the document with the words \emph{MGL script not found}.
 %    \begin{macrocode}
-  \immediate\closeout\mgl at out@stream%
+  \@ifundefined{MGL at temp@a}{%
+    \PackageWarning{mgltex}{%
+      MGL script "\MGL at forced@path\MGL at script@name.mgl" not found%
+    }%
+    \center%
+      \fbox{%
+        \centering%
+        \bfseries\Huge%
+        \begin{tabular}{c}MGL\\script\\not\\found\end{tabular}%
+      }%
+    \endcenter%
+  }{%
 %    \end{macrocode}
-% Open the input stream.
+% If |\MGL at temp@a| is defined, the script has been found, so we call |\mglinclude@@| to set up the inclusion of the script.
 %    \begin{macrocode}
-  \immediate\openin\mgl at in@stream="\mgl at dir\this at script.mgl"%
+    \mglinclude@@%
+  }%
+  \egroup%
+}
 %    \end{macrocode}
-% Here, we use the |list| environment to set the numeration of the lines of code that will be written to the \LaTeX{} document as items of the list. We also set the separation between lines of code, the indentation of the line, and some other lenght parameters.
+% \end{macro}
+% \begin{macro}{\mglinclude@@}
+% This macro sets the parameters for the inclusion of the script, and calls the command in charge of the transcription.
 %    \begin{macrocode}
-  \begingroup%
-  \list{\itshape\footnotesize\arabic{mgl at verb@line at no}.}{}%
-  \setlength{\labelsep}{1em}%
-  \itemsep\z at skip%
-  \leftskip\z at skip\rightskip\z at skip%
-  \parindent\z@\parfillskip\@flushglue\parskip\z at skip%
+\def\mglinclude@@{%
 %    \end{macrocode}
-% Use the verbatim font, and obey spaces, including spaces at the beggining of the line.
+% We first add the script to the \LaTeX{} list of included files.
 %    \begin{macrocode}
-  \verbatim at font%
-  \@vobeyspaces%
+  \@addtofilelist{\MGL at script@name.mgl}%
 %    \end{macrocode}
-% Call the command that will write the lines of code to the \LaTeX{} document.
+% If the user has used the unstarred version of |\mglinclude|, we add a contents line to the |.lms| file.
 %    \begin{macrocode}
-  \mglblock at read@line%
-}
+  \if at MGL@list at script@%
+    \refstepcounter{MGL at verb@script at no}%
+    \addcontentsline{lms}{MGL at script}{%
+      \protect\numberline{\theMGL at verb@script at no.}%
+      {\ttfamily\protect\detokenize{\MGL at script@name.mgl}}%
+    }%
+  \fi%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\mglblock at read@line}
-% This command reads lines of code from the input stream and writes them as items of the |list| environment.
+% We start a |\list| in which each line of code will be an item. If the lines have to be numbered, we use the |MGL at line@no| counter.
 %    \begin{macrocode}
-\def\mglblock at read@line{%
+  \if at MGL@lineno@%
+    \list{\mgllinenostyle\arabic{MGL at line@no}.}{\usecounter{MGL at line@no}}%
+  \else%
+    \list{}{}%
+  \fi%
 %    \end{macrocode}
-% Increase the line counter.
+% We set the parameters for a verbatim code.
 %    \begin{macrocode}
-  \stepcounter{mgl at verb@line at no}%
+  \MGL at set@verbatim at code%
 %    \end{macrocode}
-% Read a line from the input stream.
+% The heading of the environment is set. It is similar to that of the |mglblock| environment.
 %    \begin{macrocode}
-  \read\mgl at in@stream to \this at line%
+  \fboxrule=\mgllinethickness%
+  \item[\MGL at line@sep]\fbox{%
+    \bfseries\ttfamily\expandafter\detokenize\expandafter{\MGL at script@name.mgl}%
+  }\hskip\labelsep\MGL at line@sep\par\par%
 %    \end{macrocode}
-% If the end of file has been reached, define |\next at action| to close the input stream, and en the |list| environment;
+% We redefine the |\verbatim at processline| macro from the \textsf{verbatim} package to put |\the\verbatim at line| on an item.
 %    \begin{macrocode}
-  \ifeof\mgl at in@stream%
-    \def\next at action{%
-      \immediate\closein\mgl at in@stream%
-      \endlist%
-      \endgroup%
-    }%
+  \def\verbatim at processline{%
+    \item\the\verbatim at line%
+  }%
 %    \end{macrocode}
-% otherwise, |\next at action| is write the read line as an item of the |list| environment, and recursively call |\mglblock at read@line|.
+% The script is opened for reading.
 %    \begin{macrocode}
-  \else%
-    \def\next at action{%
-      \item\mbox{\this at line}%
-      \mglblock at read@line%
-    }%
-  \fi%
+  \immediate\openin\MGL at in@stream="\MGL at temp@a\MGL at script@name.mgl"%
 %    \end{macrocode}
-% Execute |\next at action|.
+% We call |\mglinclude@@@| to start the transcription.
 %    \begin{macrocode}
-  \next at action%
+  \mglinclude@@@%
 }
 %    \end{macrocode}
 % \end{macro}
-% \end{environment}
-% \subsection{Working with external scripts}
-% \begin{macro}{\mglgraphics}
-% This command allows to generate and include graphics from a external (not embedded) script.
-%    \begin{macrocode}
-
-\newcommand\mglgraphics[2][]{%
-%    \end{macrocode}
-%   Initialize |\graph at keys|, which will contain the \meta{key}=\meta{value} options for the |\includegraphics|command.
+% \begin{macro}{\mglinclude@@@}
+% This command transcripts the MGL code of the script and closes the list started in |\mglinclude@@|, adding the corresponding separation line to separate the code from normal text.
 %    \begin{macrocode}
-  \def\graph at keys{}%
+\def\mglinclude@@@{%
 %    \end{macrocode}
-% Process the \meta{key}=\meta{value} options passed by the user.
+% Since the transcription has to be done even when \textsf{\mglTeX} is off, instead of using the |\MGL at read| command ---which is inactive when the package is off---, we use the usual commands from \LaTeX{} to read from the file.
 %    \begin{macrocode}
-  \setkeys{mgl at keys}{#1}%
+  \immediate\read\MGL at in@stream to \MGL at temp@b%
 %    \end{macrocode}
-% Execute the program |mglconv| (included in MathGL) to compile the corresponding script.
+% If the end of file has been reached, we close the input stream, add the separation line, and end the |\list|.
 %    \begin{macrocode}
-  \mgl at write{18}{mglconv "\mgl at dir#2.mgl" -s "\mgl at dir\mglcommonscript.mgl" -o "\mgl at dir#2\mgl at image@ext"}
+  \ifeof\MGL at in@stream%
+    \immediate\closein\MGL at in@stream%
+    \item[\MGL at line@sep]\hskip-\labelsep\MGL at line@sep%
+    \endlist%
 %    \end{macrocode}
-% Include the generated image with the |\mgl at include@image| command.
+% Otherwise, we use |\verbatim at startline| to clean the |\verbatim at line| buffer, then we add the just read line to the buffer, and call |\verbatim at processline| to include it as an item of the list. Finally, we recursively call |\mglinclude@@@| to read the next line.
 %    \begin{macrocode}
-  \mgl at include@image{\mgl at dir#2}%
+  \else%
+    \verbatim at startline%
+    \expandafter\verbatim at addtoline\expandafter{\MGL at temp@b}%
+    \verbatim at processline%
+    \expandafter\mglinclude@@@%
+  \fi%
 }
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mglinclude}
-% This command copies verbatim the contents of an external script, and numerates each line of code.
+% \end{macro}\end{macro}
+%
+% \subsection{Additional commands}
+% \begin{macro}{\mglname}
+% \noindent The purpose of this command is to force the closure of the current main script, compile the corresponding figures, and open a new main script. At first, it is defined to only change the value of |\MGL at main@script at name| because the main script is not opened until the call of |\begin{document}|; but at that point, it is redefined to perform the described actions.
 %    \begin{macrocode}
-
-\def\mglinclude#1{%
+\def\mglname#1{\edef\MGL at main@script at name{#1}}
 %    \end{macrocode}
-% Initialize the line counter.
+% Here is the redefinition of |\mglname|.
 %    \begin{macrocode}
-  \setcounter{mgl at verb@line at no}{0}%
+\AtBeginDocument{%
+  \def\mglname#1{%
 %    \end{macrocode}
-% Open the script in the input stream.
+% We start a space hack, ince this function has no real effect on the document.
 %    \begin{macrocode}
-  \immediate\openin\mgl at in@stream="\mgl at dir#1.mgl"%
+    \@bsphack%
 %    \end{macrocode}
-% Here, we use the |list| environment to numerate each line of code as an item. We also set some length parameters.
+% The MGL functions created throughout the document are written.
 %    \begin{macrocode}
-  \begingroup%
-  \list{\itshape\footnotesize\arabic{mgl at verb@line at no}.}{}%
-  \setlength{\labelsep}{1em}%
-  \itemsep\z at skip%
-  \leftskip\z at skip\rightskip\z at skip%
-  \parindent\z@\parfillskip\@flushglue\parskip\z at skip%
+    \MGL at write@funcs%
 %    \end{macrocode}
-% We do the same changes of category as in the |mglcode| environment, and set the font to verbatim font.
+% We force the closure of the main script. We use |\immediate\closeout| instead of |\MGL at closeout| in case \textsf{\mglTeX} is off.
 %    \begin{macrocode}
-  \let\do\@makeother \dospecials%
-  \endlinechar`\^^M \catcode`\^^M\active%
-  \@vobeyspaces%
-  \verbatim at font%
+    \immediate\closeout{\MGL at main@stream}%
+%    \end{macrocode}
+% The closed script is compiled.
+%    \begin{macrocode}
+    \MGL at write{18}{%
+      mglconv -q \MGL at quality\space -S \MGL at scale\space%
+      -s "\MGL at dir\MGL at scripts@dir\mglcommonscriptname.mgl"\space%
+      -n "\MGL at dir\MGL at scripts@dir\MGL at main@script at name.mgl"%
+    }%
+%    \end{macrocode}
+% The name of the new main script is updated, and it is check for overwriting, using |\MGL at set@script at name| inside a local group, since this command defines |\MGL at script@name|, which we need undefined in some parts of the code of the package.
+%    \begin{macrocode}
+    \edef\MGL at main@script at name{#1}%
+    \bgroup\MGL at set@script at name{\MGL at main@script at name}\egroup%
+    \MGL at openout\MGL at main@stream{%
+      \MGL at dir\MGL at scripts@dir\MGL at main@script at name.mgl%
+    }%
 %    \end{macrocode}
-% We (re)use the |\mglblock at read@line| command to numerate and write each line of code.
+% The space hack is ended.
 %    \begin{macrocode}
-  \mglblock at read@line%
+    \@esphack%
+  }%
 }
 %    \end{macrocode}
 % \end{macro}
-% \subsection{Additional commands}
-% \begin{macro}{\mgldir}
-% A command to specify a directory to write the scripts and create the images.
-% First, we create a macro that will store the specified directory for later use.
+%
+% \begin{macro}{\listofmglscripts}
+% This command creates the \emph{list of MGL scripts} section. It has to be defined differently depending on whether the used document class defines the |\l at chapter| command or it only the |\l at section| command, which set the style for making a table of contents entry for the |\chapter| command and the |\section| command, respectively. If none of them are defined, we define our own style based on the latter.
 %    \begin{macrocode}
 
-\def\mgl at dir{}
+\ifx\l at chapter\@undefined%
 %    \end{macrocode}
-% The command |\mgldir| is the only way to modify |\mgl at dir|. This is done so the user won't be able to modify the default directory, dangerously altering the internal behavior of the package.
+% If |\l at chapter| is not defined, we check if |\l at section| is.
 %    \begin{macrocode}
-\def\mgldir#1{%
-  \def\mgl at dir{#1}%
-}
+  \ifx\l at section\@undefined%
 %    \end{macrocode}
-% Declare |\mgldir| so that it can only be used in the preamble. This is because the main script \meta{document}.mgl is opened at the moment of the |\begin{document}| instruction.
+% If |\l at section| is not defined, we set the |\lisofmglscripts| command to perform exactly as the |\section*{\listofmglscriptsname}| would do in the usual \textsf{book} and \textsf{article} \LaTeX{} classes, except that the type of section is |MGL at list|.
 %    \begin{macrocode}
-\@onlypreamble\mgldir
+    \def\listofmglscripts{%
+      \@startsection{MGL at list}%
+      {1}{0em}{-3.5ex plus -1ex minus -0.2ex}%
+      {2.5ex plus 0.2ex}%
+      {\centering\normalfont\bfseries\large}*%
+      {\listofmglscriptsname}%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\mgl at quality}
-% We define a macro to store the quality.
+% We use the |\@mkboth| command to set the page marks according to the current page style.
 %    \begin{macrocode}
-\def\mgl at quality{2}
+      \@mkboth{%
+        \MakeUpperCase\listofmglscriptsname%
+      }{%
+        \MakeUppercase\listofmglscriptsname%
+      }%
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\mglquality}
-% This is used to define the quality for MGL graphics.
+% The \emph{list of MGL scripts} is created by reading the document's |.lms| file.
 %    \begin{macrocode}
-\def\mglquality#1{%
+      \@starttoc{lms}%
+    }%
 %    \end{macrocode}
-% Write the quality command to a setup script.
-%    \begin{macrocode}
-  \def\mgl at quality{#1}%
-  \if at mgltex@on@%
-    \immediate\openout\mgl at out@stream="\mgl at dir\mglcommonscript.mgl"%
-    \mgl at write\mgl at out@stream{quality #1}%
-    \immediate\closeout\mgl at out@stream%
-%    \end{macrocode}
-% Print an info message about the corresponding quality, or a warning if the quality doesn't exist.
-%    \begin{macrocode}
-    \ifcase#1
-      \PackageInfo{mgltex}{Quality 0: No face drawing (fastest)}%
-    \or%
-      \PackageInfo{mgltex}{Quality 1: No color interpolation (fast)}%
-    \or%
-      \PackageInfo{mgltex}{Quality 2: High quality (normal)}%
-    \or%
-      \PackageInfo{mgltex}{Quality 3: High quality with 3d primitives (not implemented yet)}%
-    \or%
-      \PackageInfo{mgltex}{Quality 4: No face drawing, direct bitmap drawing (low memory usage)}%
-    \or%
-      \PackageInfo{mgltex}{Quality 5: No color interpolation, direct bitmap drawing (low memory usage)}%
-    \or%
-      \PackageInfo{mgltex}{Quality 6: High quality, direct bitmap drawing (low memory usage)}%
-    \or%
-      \PackageInfo{mgltex}{Quality 7: High quality with 3d primitives, direct bitmap drawing (not implemented yet)}%
-    \or%
-      \PackageInfo{mgltex}{Quality 8: Draw dots instead of primitives (extremely fast)}%
-    \else%
-      \PackageWarning{mgltex}{Quality #1 not available. Using default (2)}%
-    \fi%
+% The |\l at MGL@list| style has the same code as the |\l at section| style.
+%    \begin{macrocode}
+    \newcommand*\l at MGL@list[2]{%
+      \ifnum \c at tocdepth >\z@
+        \addpenalty\@secpenalty
+        \addvspace{1.0em \@plus\p@}%
+        \setlength\@tempdima{1.5em}%
+        \begingroup
+          \parindent \z@ \rightskip \@pnumwidth
+          \parfillskip -\@pnumwidth
+          \leavevmode \bfseries
+          \advance\leftskip\@tempdima
+          \hskip -\leftskip
+          #1\nobreak\hfil \nobreak\hb at xt@\@pnumwidth{\hss #2}\par
+        \endgroup
+      \fi%
+    }%
   \else%
-    \PackageWarning{mgltex}{mglTeX is off, quality changes won't have effect}%
+%    \end{macrocode}
+% If the |\l at section| style is defined, the \emph{list of MGL scripts} is just an unumbered section.
+%    \begin{macrocode}
+    \def\listofmglscripts{%
+      \section*{\listofmglscriptsname}%
+      \@mkboth{%
+        \MakeUppercase\listofmglscriptsname%
+      }{%
+        \MakeUppercase\listofmglscriptsname%
+      }%
+      \@starttoc{lms}%
+    }%
   \fi%
-}
+\else%
+%    \end{macrocode}
+% If the |\l at chapter| style is defined, the \emph{list of MGL scripts} is just an unumbered chapter.
+%    \begin{macrocode}
+  \def\listofmglscripts{%
+    \chapter*{\listofmglscriptsname}%
+    \@mkboth{%
+      \MakeUpperCase\listofmglscriptsname%
+    }{%
+      \MakeUppercase\listofmglscriptsname%
+    }%
+    \@starttoc{lms}%
+  }%
+\fi%
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mgltexon}
-% \changes{v.2.0}{2014/11/15}{Add the command \texttt{\textbackslash mgltexon}}
-% Has the same effect as the package option |on|, but its effect is local, meaning that works only from the point this command is called on.
+%
+% \begin{macro}{\mglTeX}
+% This macro pretty-prints the name of the package.
 %    \begin{macrocode}
 
-\def\mgltexon{
-  \@mgltex at on@true
-  \def\mgl at write##1##2{%
-    \immediate\write##1{##2}%
-  }
-}
+\def\mglTeX{mgl\TeX}
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mgltexoff}
-% \changes{v.2.0}{2014/11/15}{Add the command \texttt{\textbackslash mgltexoff}}
-% Has the same effect as the package option |off|, but its effect is local.
+% \begin{macro}{\mglTeXwVersion}
+% This macro pretty-prints the name of the package with its version in a coherent manner, and separated with an unbreakable space.
 %    \begin{macrocode}
-\def\mgltexoff{%
-  \@mgltex at on@false
-  \def\mgl at write##1##2{}%
-}
+
+\def\mglTeXwVer{\mglTeX~v4.0}
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mglcomments}
-% \changes{v2.0}{2014/11/22}{Add the command \texttt{\textbackslash mglcomments}}
-% Has the same effect as the package option |comments|, but its effect is local, meaning that works only from the point this command is called on.
+%
+% \begin{macro}{\mgldir}
+% This command is the interface for the user to change the value of |\MGL at dir|. It is an only-preamble macro, since using it elsewhere would cause faulty behavior.
 %    \begin{macrocode}
 
-\def\mglcomments{
-  \@mgl at comments@true
-}
+\def\mgldir#1{\def\MGL at dir{#1}}\@onlypreamble\mgldir
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mglnocomments}
-% \changes{v2.0}{2014/11/22}{Add the command \texttt{\textbackslash mglnocomments}}
-% Has the same effect as the package option |off|, but its effect is local.
+% \begin{macro}{\mglscriptsdir}
+% This command modifies the value of |\MGL at scripts@dir|. It is also an only-preamble macro.
 %    \begin{macrocode}
-\def\mglnocomments{%
-  \@mgl at comments@false
-}
+\def\mglscriptsdir#1{\def\MGL at scripts@dir{#1}}\@onlypreamble\mglscriptsdir
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\mglTeX}
-% Just pretty-prints the name of the package.
+% \begin{macro}{\mglgraphicsdir}
+% Modifies the value of |\MGL at graphics@dir|. It is an only-preamble macro.
 %    \begin{macrocode}
-
-\def\mglTeX{mgl\TeX}
+\def\mglgraphicsdir#1{\def\MGL at graphics@dir{#1}}\@onlypreamble\mglgraphicsdir
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mglbackupsdir}
+% Modifies the value of |\MGL at backups@dir|. It is an only-preamble macro.
+%    \begin{macrocode}
+\def\mglbackupsdir#1{\def\MGL at backups@dir{#1}}\@onlypreamble\mglbackupsdir
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mglpaths}
+% This command adds a list of search paths for scripts to the existing one (|\MGL at paths|).
+%    \begin{macrocode}
+\def\mglpaths#1{\g at addto@macro\MGL at paths{,#1}}
 %    \end{macrocode}
 % \end{macro}
+%
+% \begin{macro}{\mglcommonscriptname}\begin{macro}{\mglcommentname}\begin{macro}{\listofmglscriptsname}\begin{macro}{\mglverbatimname}\begin{macro}{\mgllinenostyle}\begin{macro}{\mgldashwidth}\begin{macro}{\mgllinethickness}\begin{macro}{\mglbreakindent}
+%    \begin{macrocode}
 
+\def\mglcommonscriptname{MGL_common_script}
+\def\mglcommentname{MGL commentary}
+\def\listofmglscriptsname{List of MGL scripts}
+\def\mglverbatimname{(Unnamed MGL verbatim script)}
+\def\mgllinenostyle{\footnotesize}
+\newdimen\mgldashwidth\mgldashwidth=0.75em
+\newdimen\mgllinethickness\mgllinethickness=0.25ex
+\newdimen\mglbreakindent\mglbreakindent=1em
+%    \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
+%
+% \subsection{Final adjustments}
+% To finish the code of \textsf{\mglTeX}, we set the behavior of the package at the call of the |\begin{document}| and |\end{document}| commands.
+%
+% We tell \LaTeX{} to check the name of the document's main script for overwriting. We do this by calling |\MGL at set@script at name| inside a local group, because it defines |\MGL at script@name|, which we need undefined in certain parts of the code. Then the script is opened. We use |\immediate\openout| instead of |\MGL at openout| for this purpose, since, otherwise, we run the risk of the main script not being created when needed, if the user turns off \textsf{\mglTeX} before the |\begin{documen [...]
+%    \begin{macrocode}
 
+\AtBeginDocument{%
+  \bgroup\MGL at set@script at name{\MGL at main@script at name}\egroup%
+  \immediate\openout\MGL at main@stream=%
+  \MGL at dir\MGL at scripts@dir\MGL at main@script at name.mgl%
+}
+%    \end{macrocode}
+% We also set the actions for the call of |\end{document}|
+%    \begin{macrocode}
+\AtEndDocument{%
+%    \end{macrocode}
+% |\MGL at write@funcs| will simply write the MGL functions throughout the \LaTeX{} document.
+%    \begin{macrocode}
+  \MGL at write@funcs%
+%    \end{macrocode}
+% The main script is closed. We use the |\immediate\closeout| construction instead of |\MGL at closeout|, since the script must be closed even when \textsf{\mglTeX} is off.
+%    \begin{macrocode}
+  \immediate\closeout\MGL at main@stream%
+%    \end{macrocode}
+% The main script is compiled.
+%    \begin{macrocode}
+  \MGL at write{18}{%
+    mglconv -q \MGL at quality\space -S \MGL at scale\space%
+    -s "\MGL at dir\MGL at scripts@dir\mglcommonscriptname.mgl"\space%
+    -n "\MGL at dir\MGL at scripts@dir\MGL at main@script at name.mgl"%
+  }%
+}
+%    \end{macrocode}
+%
 % \Finale
\ No newline at end of file
diff --git a/mgltex/mgltex.ins b/mgltex/mgltex.ins
index f780ff3..8dc591b 100644
--- a/mgltex/mgltex.ins
+++ b/mgltex/mgltex.ins
@@ -1,16 +1,17 @@
 %%
-%% Copyright (C) 2014 by Diego Sejas <diego.mathematician at gmail.com>
-%% 
+%% Copyright (C) 2014--2015 by Diego Sejas Viscarra <diego.mathematician at gmail.com>
+%% Copyright (C) 2014--2015 by Alexey Balakin <mathgl.abalakin at gmail.com>
+%%
 %% This program is free software: you can redistribute it and/or modify it
 %% under the terms of the GNU General Public License as published by the
 %% Free Software Foundation, either version 3 of the License, or (at your
 %% option) any later version.
-%% 
+%%
 %% This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
 %%
@@ -24,7 +25,8 @@
 
 This is a generated file.
 
-Copyright (C) 2014 by Diego Sejas <diego.mathematician at gmail.com>
+Copyright (C) 2014--2015 by Diego Sejas Viscarra <diego.mathematician at gmail.com>
+Copyright (C) 2014--2015 by Alexey Balakin <mathgl.abalakin at gmail.com>
 
 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
diff --git a/mgltex/mgltex.pdf b/mgltex/mgltex.pdf
index fb4fedf..fe33fb9 100644
Binary files a/mgltex/mgltex.pdf and b/mgltex/mgltex.pdf differ
diff --git a/mgltex/mgltex.sty b/mgltex/mgltex.sty
index 642aa1e..73fa21c 100644
--- a/mgltex/mgltex.sty
+++ b/mgltex/mgltex.sty
@@ -1,6 +1,15 @@
 %%
-%% Copyright (C) 2015 by Diego Sejas Viscarra <diego.mathematician at gmail.com>
-%% Copyright (C) 2015 by Alexey Balakin <mathgl.abalakin at gmail.com>
+%% This is file `mgltex.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% mgltex.dtx  (with options: `package')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2014--2015 by Diego Sejas Viscarra <diego.mathematician at gmail.com>
+%% Copyright (C) 2014--2015 by Alexey Balakin <mathgl.abalakin at gmail.com>
 %% 
 %% 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
@@ -14,13 +23,12 @@
 %% 
 %% You should have received a copy of the GNU General Public License along
 %% with this program.  If not, see <http://www.gnu.org/licenses/>.
-%%
+%% 
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mgltex}[/2015/03/29 v3.0 Embed MGL scripts in LaTeX documents]
+\ProvidesPackage{mgltex}[2015/11/02 v4.0 Embed MGL scripts into LaTeX documents]
 
-\RequirePackage{keyval}
-\RequirePackage{graphicx}
+\def\MGL at TeX@ext{.tex}
 
 \DeclareOption{draft}{%
   \PassOptionsToPackage{\CurrentOption}{graphicx}%
@@ -29,769 +37,846 @@
   \PassOptionsToPackage{\CurrentOption}{graphicx}%
 }
 
-\DeclareOption{epstopdf}{%
-  \DeclareGraphicsRule{.eps}{pdf}{.pdf}{`epstopdf #1}%
-}
-
-\DeclareOption{on}{%
-  \def\MGL at openout#1#2{%
-    \immediate\openout#1="#2"%
+\def\mgltexon{%
+  \def\MGL at openout##1##2{%
+    \immediate\openout##1="##2"%
+  }%
+  \def\MGL at openin##1##2{%
+    \immediate\openin##1="##2"%
   }%
-  \def\MGL at write#1#2{%
-    \immediate\write#1{#2}%
+  \def\MGL at write##1##2{%
+    \immediate\write##1{##2}%
+  }%
+  \def\MGL at read##1##2{%
+    \def##2{}%
+    \ifeof##1\else%
+      \bgroup%
+      \endlinechar=-1%
+      \immediate\global\read##1 to ##2%
+      \egroup%
+    \fi%
+  }%
+  \def\MGL at closeout##1{%
+    \immediate\closeout##1%
+  }
+  \def\MGL at closein##1{%
+    \immediate\closein##1%
+  }
+  \def\MGL at includegraphics{%
+    \IfFileExists{\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext}{%
+      \ifx\MGL at graph@ext\MGL at TeX@ext%
+        \include{\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext}%
+      \else%
+        \expandafter\includegraphics\expandafter[\MGL at graph@keys]{%
+          \MGL at dir\MGL at graphics@dir\MGL at script@name%
+        }%
+      \fi%
+    }{%
+      \PackageWarning{mgltex}{MGL image "\MGL at script@name" not found}%
+      \fbox{%
+        \centering%
+        \bfseries\Huge%
+        \begin{tabular}{c}MGL\\image\\not\\found\end{tabular}%
+      }%
+    }%
   }%
-  \def\MGL at graph@not at found@text{MGL\\image\\not\\found}%
-  \def\MGL at graph@not at found@message{MGL image "\MGL at this@code at label" not found}%
 }
-\DeclareOption{off}{%
-  \def\MGL at openout#1#2{}%
-  \def\MGL at write#1#2{}%
-  \def\MGL at graph@not at found@text{\mglTeX\\is off,\\no image\\generated}%
-  \def\MGL at graph@not at found@message{mglTeX is off, MGL image "\MGL at this@code at label" not generated}%
+\def\mgltexoff{%
+  \PackageWarning{mgltex}{mglTeX is off}%
+  \def\MGL at openout##1##2{}%
+  \def\MGL at openin##1##2{}%
+  \def\MGL at write##1##2{}%
+  \def\MGL at read##1##2{}%
+  \def\MGL at closeout##1{}
+  \def\MGL at closein##1{}
+  \def\MGL at includegraphics{%
+    \fbox{%
+      \centering%
+      \bfseries\Huge%
+      \begin{tabular}{c}\mglTeX\\is off;\\no image\\included\end{tabular}%
+    }%
+  }%
 }
+\DeclareOption{on}{\mgltexon}
+\DeclareOption{off}{\mgltexoff}
 
 \newif\if at MGL@comments@
-\DeclareOption{comments}{%
-  \@MGL at comments@true%
-}
-\DeclareOption{nocomments}{%
-  \@MGL at comments@false%
+\def\mglnocomments{\@MGL at comments@false}
+\def\mglcomments{\@MGL at comments@true}
+\DeclareOption{nocomments}{\mglnocomments}
+\DeclareOption{comments}{\mglcomments}
+
+\def\mglscale#1{
+  \def\MGL at scale{#1}%
+  \ifcase\MGL at scale\or\or\or\or\or\or\or\or\else%
+    \PackageWarning{mgltex}{%
+      Scaling value of \MGL at scale\space not allowed; using default (1)%
+    }%
+    \def\MGL at scale{1}%
+  \fi%
 }
+\DeclareOption{1x}{\mglscale{1}}
+\DeclareOption{2x}{\mglscale{2}}
+\DeclareOption{3x}{\mglscale{3}}
+\DeclareOption{4x}{\mglscale{4}}
+\DeclareOption{5x}{\mglscale{5}}
+\DeclareOption{6x}{\mglscale{6}}
+\DeclareOption{7x}{\mglscale{7}}
+\DeclareOption{8x}{\mglscale{8}}
+\DeclareOption{9x}{\mglscale{9}}
 
-\DeclareOption{1x}{\def\MGL at scale{1}}
-\DeclareOption{2x}{\def\MGL at scale{2}}
-\DeclareOption{3x}{\def\MGL at scale{3}}
-\DeclareOption{4x}{\def\MGL at scale{4}}
-\DeclareOption{5x}{\def\MGL at scale{5}}
-\DeclareOption{6x}{\def\MGL at scale{6}}
-\DeclareOption{7x}{\def\MGL at scale{7}}
-\DeclareOption{8x}{\def\MGL at scale{8}}
-\DeclareOption{9x}{\def\MGL at scale{9}}
-
-\DeclareGraphicsExtensions{%
-  .png,.eps,.jpg,.jpeg,.bps,.pdf,.epsz,.eps.gz,.bpsz,.bps.gz,.gif%
-}
-\DeclareOption{jpg}{\def\MGL at graphics@ext{.jpg}}
-\DeclareOption{jpeg}{\def\MGL at graphics@ext{.jpeg}}
-\DeclareOption{pdf}{\def\MGL at graphics@ext{.pdf}}
-\DeclareOption{png}{\def\MGL at graphics@ext{.png}}
-\DeclareOption{eps}{\def\MGL at graphics@ext{.eps}}
-\DeclareOption{epsz}{\def\MGL at graphics@ext{.eps.gz}}
-\DeclareOption{bps}{\def\MGL at graphics@ext{.bps}}
-\DeclareOption{bpsz}{\def\MGL at graphics@ext{.bps.gz}}
-\DeclareOption{gif}{\def\MGL at graphics@ext{.gif}}
-\DeclareOption{tex}{\def\MGL at graphics@ext{.tex}}
+\def\mglquality#1{%
+  \def\MGL at quality{#1}%
+  \ifcase\MGL at quality%
+    \PackageInfo{mgltex}{%
+      Quality 0: No face drawing (fastest)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 1: No color interpolation (fast)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 2: High quality (normal)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 3: High quality with 3d primitives (not implemented yet)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 4: No face drawing, direct bitmap drawing (low memory usage)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 5: No color interpolation, direct bitmap drawing (low memory usage)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 6: High quality, direct bitmap drawing (low memory usage)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 7: High quality with 3d primitives, direct bitmap drawing (not implemented yet)%
+    }%
+  \or%
+    \PackageInfo{mgltex}{%
+      Quality 8: Draw dots instead of primitives (extremely fast)%
+    }%
+  \else%
+    \PackageWarning{mgltex}{%
+      Quality #1 not available; using default (2)%
+    }%
+    \def\MGL at quality{2}%
+  \fi%
+}
+\DeclareOption{0q}{\mglquality{0}}
+\DeclareOption{1q}{\mglquality{1}}
+\DeclareOption{2q}{\mglquality{2}}
+\DeclareOption{3q}{\mglquality{3}}
+\DeclareOption{4q}{\mglquality{4}}
+\DeclareOption{5q}{\mglquality{5}}
+\DeclareOption{6q}{\mglquality{6}}
+\DeclareOption{7q}{\mglquality{7}}
+\DeclareOption{8q}{\mglquality{8}}
+
+\DeclareOption{eps}{\def\MGL at graph@ext{.eps}}
+\DeclareOption{epsz}{\def\MGL at graph@ext{.epsz}}
+\DeclareOption{epsgz}{\def\MGL at graph@ext{.eps.gz}}
+\DeclareOption{bps}{\def\MGL at graph@ext{.bps}}
+\DeclareOption{bpsz}{\def\MGL at graph@ext{.bpsz}}
+\DeclareOption{bpsgz}{\def\MGL at graph@ext{.bps.gz}}
+\DeclareOption{pdf}{\def\MGL at graph@ext{.pdf}}
+\DeclareOption{png}{\def\MGL at graph@ext{.png}}
+\DeclareOption{jpg}{\def\MGL at graph@ext{.jpg}}
+\DeclareOption{jpeg}{\def\MGL at graph@ext{.jpeg}}
+\DeclareOption{gif}{\def\MGL at graph@ext{.gif}}
+\DeclareOption{tex}{\def\MGL at graph@ext{.tex}}
 
 \DeclareOption*{\@unknownoptionerror}
 
-\ExecuteOptions{final,on,nocomments,1x,eps}
+\ExecuteOptions{final,on,nocomments,1x,2q,eps}
 \ProcessOptions*
 
-\define at key{MGL at keys}{dir}{\def\MGL at dir{#1}}
-\define at key{MGL at keys}{scriptsdir}{\def\MGL at scripts@dir{#1}}
-\define at key{MGL at keys}{graphicsdir}{\def\MGL at graphics@dir{#1}}
-\define at key{MGL at keys}{backupsdir}{\def\MGL at backups@dir{#1}}
-\define at key{MGL at keys}{quality}{\def\MGL at quality{#1}}
-\define at key{MGL at keys}{width}{\def\MGL at width{#1}}
-\define at key{MGL at keys}{height}{\def\MGL at height{#1}}
-
-\define at key{mgl at keys}{bb}{\g at addto@macro{\graph at keys}{bb=#1,}}
-\define at key{mgl at keys}{bbllx}{\g at addto@macro{\graph at keys}{bbllx=#1,}}
-\define at key{mgl at keys}{bblly}{\g at addto@macro{\graph at keys}{bblly=#1,}}
-\define at key{mgl at keys}{bburx}{\g at addto@macro{\graph at keys}{bburx=#1,}}
-\define at key{mgl at keys}{bbury}{\g at addto@macro{\graph at keys}{bbury=#1,}}
-\define at key{mgl at keys}{natwidth}{\g at addto@macro{\graph at keys}{natwidth=#1,}}
-\define at key{mgl at keys}{natheight}{\g at addto@macro{\graph at keys}{natheight=#1,}}
-\define at key{mgl at keys}{hiresbb}{\g at addto@macro{\graph at keys}{hiresbb=#1,}}
-\define at key{mgl at keys}{viewport}{\g at addto@macro{\graph at keys}{viewport=#1,}}
-\define at key{mgl at keys}{trim}{\g at addto@macro{\graph at keys}{trim=#1,}}
-\define at key{mgl at keys}{angle}{\g at addto@macro{\graph at keys}{angle=#1,}}
-\define at key{mgl at keys}{origin}{\g at addto@macro{\graph at keys}{origin=#1,}}
-\define at key{mgl at keys}{width}{\g at addto@macro{\graph at keys}{width=#1,}}
-\define at key{mgl at keys}{height}{\g at addto@macro{\graph at keys}{height=#1,}}
-\define at key{mgl at keys}{totalheight}{\g at addto@macro{\graph at keys}{totalheight=#1,}}
-\define at key{mgl at keys}{keepaspectratio}{\g at addto@macro{\graph at keys}{keepaspectratio=#1,}}
-\define at key{mgl at keys}{scale}{\g at addto@macro{\graph at keys}{scale=#1,}}
-\define at key{mgl at keys}{clip}[true]{\g at addto@macro{\graph at keys}{clip=#1,}}
-\define at key{mgl at keys}{draft}[false]{\g at addto@macro{\graph at keys}{draft=#1,}}
-\define at key{mgl at keys}{type}{\g at addto@macro{\graph at keys}{type=#1,}}
-\define at key{mgl at keys}{ext}{\g at addto@macro{\graph at keys}{ext=#1,}}
-\define at key{mgl at keys}{read}{\g at addto@macro{\graph at keys}{read=#1,}}
-\define at key{mgl at keys}{command}{\g at addto@macro{\graph at keys}{command=#1,}}
-\define at key{mgl at keys}{imgext}{\def\mgl at graphics@ext{.#1}}
-
-\define at key{mglplot at keys}{bb}{\g at addto@macro{\graph at keys}{bb=#1,}}
-\define at key{mglplot at keys}{bbllx}{\g at addto@macro{\graph at keys}{bbllx=#1,}}
-\define at key{mglplot at keys}{bblly}{\g at addto@macro{\graph at keys}{bblly=#1,}}
-\define at key{mglplot at keys}{bburx}{\g at addto@macro{\graph at keys}{bburx=#1,}}
-\define at key{mglplot at keys}{bbury}{\g at addto@macro{\graph at keys}{bbury=#1,}}
-\define at key{mglplot at keys}{natwidth}{\g at addto@macro{\graph at keys}{natwidth=#1,}}
-\define at key{mglplot at keys}{natheight}{\g at addto@macro{\graph at keys}{natheight=#1,}}
-\define at key{mglplot at keys}{hiresbb}{\g at addto@macro{\graph at keys}{hiresbb=#1,}}
-\define at key{mglplot at keys}{viewport}{\g at addto@macro{\graph at keys}{viewport=#1,}}
-\define at key{mglplot at keys}{trim}{\g at addto@macro{\graph at keys}{trim=#1,}}
-\define at key{mglplot at keys}{angle}{\g at addto@macro{\graph at keys}{angle=#1,}}
-\define at key{mglplot at keys}{origin}{\g at addto@macro{\graph at keys}{origin=#1,}}
-\define at key{mglplot at keys}{width}{\g at addto@macro{\graph at keys}{width=#1,}}
-\define at key{mglplot at keys}{height}{\g at addto@macro{\graph at keys}{height=#1,}}
-\define at key{mglplot at keys}{totalheight}{\g at addto@macro{\graph at keys}{totalheight=#1,}}
-\define at key{mglplot at keys}{keepaspectratio}{\g at addto@macro{\graph at keys}{keepaspectratio=#1,}}
-\define at key{mglplot at keys}{scale}{\g at addto@macro{\graph at keys}{scale=#1,}}
-\define at key{mglplot at keys}{clip}[true]{\g at addto@macro{\graph at keys}{clip=#1,}}
-\define at key{mglplot at keys}{draft}[false]{\g at addto@macro{\graph at keys}{draft=#1,}}
-\define at key{mglplot at keys}{type}{\g at addto@macro{\graph at keys}{type=#1,}}
-\define at key{mglplot at keys}{ext}{\g at addto@macro{\graph at keys}{ext=#1,}}
-\define at key{mglplot at keys}{read}{\g at addto@macro{\graph at keys}{read=#1,}}
-\define at key{mglplot at keys}{command}{\g at addto@macro{\graph at keys}{command=#1,}}
-\define at key{mglplot at keys}{imgext}{\def\MGL at graphics@ext{.#1}}
-\define at key{mglplot at keys}{setup}{\def\mglplot at setup{#1}}
-
-\def\mglsettings#1{%
-  \setkeys{MGL at keys}{#1}%
-}
-\@onlypreamble\mglsettings
+\RequirePackage{keyval}
+\RequirePackage{graphicx}
+\RequirePackage{verbatim}
+\DeclareGraphicsExtensions{%
+  .eps,.epsz,.eps.gz,.bps,.bpsz,.bps.gz,.pdf,.png,.jpg,.jpeg,.gif%
+}
+\let\verbatim at finish\relax
+
+\define at key{MGL at keys}{bb}{\g at addto@macro\MGL at graph@keys{bb=#1,}}
+\define at key{MGL at keys}{bbllx}{\g at addto@macro\MGL at graph@keys{bbllx=#1,}}
+\define at key{MGL at keys}{bblly}{\g at addto@macro\MGL at graph@keys{bblly=#1,}}
+\define at key{MGL at keys}{bburx}{\g at addto@macro\MGL at graph@keys{bburx=#1,}}
+\define at key{MGL at keys}{bbury}{\g at addto@macro\MGL at graph@keys{bbury=#1,}}
+\define at key{MGL at keys}{natwidth}{\g at addto@macro\MGL at graph@keys{natwidth=#1,}}
+\define at key{MGL at keys}{natheight}{\g at addto@macro\MGL at graph@keys{natheight=#1,}}
+\define at key{MGL at keys}{hiresbb}{\g at addto@macro\MGL at graph@keys{hiresbb=#1,}}
+\define at key{MGL at keys}{viewport}{\g at addto@macro\MGL at graph@keys{viewport=#1,}}
+\define at key{MGL at keys}{trim}{\g at addto@macro\MGL at graph@keys{trim=#1,}}
+\define at key{MGL at keys}{angle}{\g at addto@macro\MGL at graph@keys{angle=#1,}}
+\define at key{MGL at keys}{origin}{\g at addto@macro\MGL at graph@keys{origin=#1,}}
+\define at key{MGL at keys}{width}{\g at addto@macro\MGL at graph@keys{width=#1,}}
+\define at key{MGL at keys}{height}{\g at addto@macro\MGL at graph@keys{height=#1,}}
+\define at key{MGL at keys}{totalheight}{\g at addto@macro\MGL at graph@keys{totalheight=#1,}}
+\define at key{MGL at keys}{keepaspectratio}[true]{%
+  \g at addto@macro\MGL at graph@keys{keepaspectratio=#1,}%
+}
+\define at key{MGL at keys}{scale}{\g at addto@macro\MGL at graph@keys{scale=#1,}}
+\define at key{MGL at keys}{clip}[true]{\g at addto@macro\MGL at graph@keys{clip=#1,}}
+\define at key{MGL at keys}{draft}[true]{\g at addto@macro\MGL at graph@keys{draft=#1,}}
+\define at key{MGL at keys}{type}{\g at addto@macro\MGL at graph@keys{type=#1,}}
+\define at key{MGL at keys}{ext}{\g at addto@macro\MGL at graph@keys{ext=#1,}}
+\define at key{MGL at keys}{read}{\g at addto@macro\MGL at graph@keys{read=#1,}}
+\define at key{MGL at keys}{command}{\g at addto@macro\MGL at graph@keys{command=#1,}}
+\define at key{MGL at keys}{imgext}{\def\MGL at graph@ext{.#1}}
+
+\newif\if at MGL@lineno@
+\define at key{MGL at verb@keys}{lineno}[true]{\csname @MGL at lineno@#1\endcsname}
+
+\edef\MGL at main@script at name{\jobname}
 
 \def\MGL at dir{}
-\def\mgldir#1{%
-  \def\MGL at dir{#1}%
-}
-\@onlypreamble\mgldir
-
 \def\MGL at scripts@dir{}
-\def\mglscriptsdir#1{%
-  \def\MGL at scripts@dir{#1}%
-}
-\@onlypreamble\mglscriptsdir
-
 \def\MGL at graphics@dir{}
-\def\mglgraphicsdir#1{%
-  \def\MGL at graphics@dir{#1}%
-}
-\@onlypreamble\mglscriptsdir
-
 \def\MGL at backups@dir{}
-\def\mglbackupsdir#1{%
-  \def\MGL at backups@dir{#1}%
-}
-\@onlypreamble\mglbackupsdir
+\def\MGL at paths{\MGL at dir\MGL at scripts@dir,\MGL at dir\MGL at backups@dir}
 
-\def\TeX at ext{.tex}
-\def\MGL at include@graphics{%
-  \ifx\MGL at graphics@ext\TeX at ext%
-    \IfFileExists{\MGL at this@code at label.tex}{%
-      \include{\MGL at dir\MGL at graphics@dir\MGL at this@code at label}%
-    }{%
-      \MGL at graph@not at found%
-    }%
-  \else%
-  \def\MGL at next@action{\MGL at graph@not at found}%
-    \@for\MGL at graph@ext:=\Gin at extensions\do{%b
-      \IfFileExists{\MGL at dir\MGL at graphics@dir\MGL at this@code at label\MGL at graph@ext}{%
-        \def\MGL at next@action{%
-          \expandafter\includegraphics\expandafter[\graph at keys]{\MGL at dir\MGL at graphics@dir\MGL at this@code at label}%
-        }%
-      }{}%
-    }%
-    \MGL at next@action%
-  \fi%
-}
-\def\MGL at graph@not at found{%
-  \PackageWarning{mgltex}{\MGL at graph@not at found@message}%
-  \fbox{%
-    \centering%
-    \bfseries\Huge%
-    \begin{tabular}{c}\MGL at graph@not at found@text\end{tabular}%
-  }%
-}
-
-\def\MGL at openin#1#2{%
-  \immediate\openin#1="#2"%
-}
-\def\MGL at read#1#2{%
-  \def#2{}%
-  \ifeof#1\else%
-    \immediate\read#1 to #2%
-  \fi%
-}
-\def\MGL at closein#1{%
-  \immediate\closein#1%
-}
-\def\MGL at closeout#1{%
-  \immediate\closeout#1%
-}
-\def\MGL at unchanged#1{%
-  \global\@namedef{MGL@@@#1}{}%
-}
-\def\MGL at scripts@written{}
-\def\MGL at funcs{}
-
-\newwrite\MGL at script
-\newread\MGL at in@stream
+\newwrite\MGL at main@stream
 \newwrite\MGL at out@stream
+\newread\MGL at in@stream
+\newcounter{MGL at script@no}
+\newcounter{MGL at line@no}
+\newcounter{MGL at verb@script at no}
+\newif\if at MGL@list at script@
+\def\l at MGL@script{\@dottedtocline{1}{0em}{1.5em}}
 
-\AtBeginDocument{%
-  \MGL at openout{\MGL at script}{\MGL at dir\MGL at scripts@dir\jobname.mgl}%
-  \MGL at write\MGL at script{\MGL at signature}%
-}
-\AtEndDocument{%
-  \MGL at write\MGL at script{stop}%
-  \MGL at write\MGL at script{}%
-  \bgroup%
-    \endlinechar=-1\relax%
-    \MGL at funcs%
-  \egroup%
-  \MGL at closeout{\MGL at script}%
-  \MGL at write{18}{mglconv -n -q \MGL at quality\space -S \MGL at scale\space "\MGL at dir\MGL at scripts@dir\jobname.mgl"}%
-}
-
-%%%%% Anatomy of environments and commands %%%%%
 \def\MGL at setkeys#1#2{%
-  \def\graph at keys{}%
+  \def\MGL at graph@keys{}%
   \setkeys{#1}{#2}%
 }
 
-\newcounter{MGL at script@no}
-\def\MGL at create@code at label{%
-  \stepcounter{MGL at script@no}%
-  \edef\MGL at this@code at label{\jobname-MGL-\arabic{MGL at script@no}}%
-  \xdef\MGL at scripts@written{\MGL at scripts@written\MGL at this@code at label,}%
+\def\MGL at codes{%
+  \let\do\@makeother\dospecials%
+  \catcode`\^^M\active%
 }
 
-\def\MGL at test@code at label#1{%
-  \edef\MGL at this@code at label{#1}%
-  \@for\MGL at script@name:=\MGL at scripts@written\do{%
-    \ifx\MGL at this@code at label\MGL at script@name%
-      \PackageWarning{mgltex}{Overwriting MGL code labeled "\MGL at this@code at label"}%
+\def\MGL at document@scripts{}
+\def\MGL at set@script at name#1{%
+  \edef\MGL at script@name{#1}%
+  \@for\MGL at temp@a:=\MGL at document@scripts\do{%
+    \ifx\MGL at temp@a\MGL at script@name%
+      \PackageWarning{mgltex}{Multiple MGL scripts named "\MGL at script@name.mgl"}%
     \fi%
   }%
-  \xdef\MGL at scripts@written{\MGL at scripts@written\MGL at this@code at label,}%
+  \g at addto@macro\MGL at document@scripts{\MGL at script@name,}%
 }
 
-\def\MGL at codes{%
-  \let\do\@makeother\dospecials\relax%
-  \endlinechar`\^^M \catcode`\^^M\active\relax%
-  \catcode`\ =10\relax%
-}
-\def\MGL at verb@codes{%
-  \let\do\@makeother\dospecials\relax%
-  \endlinechar`\^^M\relax\catcode`\^^M\active\relax%
-}
-
-\def\MGL at test@end at env#1{%
-  \edef\MGL at this@line{#1}%
-  \ifx\MGL at this@line\MGL at end@env at cmd%
-    \def\MGL at next@action{\MGL at end@env}%
-  \fi%
+\def\MGL at unchanged#1{%
+  \global\@namedef{MGL@@@#1}{}%
 }
 
-\def\MGL at def@end at env@cmd#1{%
-  \def\MGL at end@env{\end{#1}}%
-  \begingroup%
-    \escapechar=-1 \relax%
-    \xdef\MGL at end@env at cmd{\string\\end\string\{#1\string\}}%
-  \endgroup%
+\def\MGL at process@script#1#2{%
+  \@ifundefined{MGL@@@\MGL at script@name}{%
+    #1%
+  }{%
+    \IfFileExists{\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext}{%
+      #2%
+    }{%
+      #1%
+    }%
+  }%
 }
 
-\def\MGL at set@write at script@out{%
-  \def\MGL at write@code at action##1{%
-    \MGL at write\MGL at script{##1}%
-    \MGL at write\MGL at out@stream{##1}%
+\def\MGL at def@for at loop#1{%
+  \long\def\MGL at for##1:=##2\do##3{%
+    \expandafter\def\expandafter\@fortmp\expandafter{##2}%
+    \ifx\@fortmp\@empty\else%
+      \expandafter\MGL at forloop##2#1\@nil#1\@nil\@@##1{##3}%
+    \fi%
   }%
-}
-\def\MGL at set@write at script{%
-  \def\MGL at write@code at action##1{%
-    \MGL at write\MGL at script{##1}%
+  \long\def\MGL at forloop##1#1##2#1##3\@@##4##5{%
+    \def##4{##1}%
+    \ifx##4\@nnil\else%
+      ##5\def##4{##2}%
+      \ifx##4\@nnil\else%
+        ##5\MGL at iforloop##3\@@##4{##5}%
+      \fi%
+    \fi%
   }%
-}
-\def\MGL at set@write at out{%
-  \def\MGL at write@code at action##1{%
-    \MGL at write\MGL at out@stream{##1}%
+  \long\def\MGL at iforloop##1#1##2\@@##3##4{%
+    \def##3{##1}%
+    \ifx##3\@nnil%
+      \expandafter\@fornoop%
+    \else%
+      ##4\relax\expandafter\MGL at iforloop%
+    \fi%
+    ##2\@@##3{##4}%
   }%
 }
-\begingroup%
-  \catcode`\^^M\active\relax%
-  \gdef\MGL at ignore@line#1^^M{%
-    \expandafter\MGL at write@line%
+\MGL at def@for at loop{^^J}
+
+\def\MGL at compare@code#1{%
+  \def\MGL at next{%
+    \MGL at closein\MGL at in@stream%
+    \MGL at write\@auxout{\string\MGL at unchanged{\MGL at script@name}}%
   }%
-  \gdef\MGL at write@line#1^^M{%
-    \def\MGL at next@action{%
-      \MGL at write@code at action{#1}%
-      \MGL at write@line%
-    }%
-    \MGL at test@end at env{#1}%
-    \MGL at next@action%
-  }%
-  \gdef\MGL at compare@line#1^^M{%
-    \def\MGL at next@action{%
-      \def\MGL at this@line{#1^^M}%
-      \MGL at read\MGL at in@stream{\MGL at this@code at line}%
-      \ifx\MGL at this@code at line\MGL at this@line\else%
-        \def\MGL at future@action{}%
-      \fi%
-      \MGL at compare@line%
-    }%
-    \edef\MGL at this@line{#1}%
-    \ifx\MGL at this@line\MGL at end@env at cmd%
-      \def\MGL at next@action{\MGL at end@env}%
-      \MGL at read\MGL at in@stream{\MGL at this@code at line}%
-      \ifeof\MGL at in@stream\else%
-        \def\MGL at future@action{}%
-      \fi%
+  \def\verbatim at processline{%
+    \MGL at read\MGL at in@stream{\MGL at temp@a}%
+    \edef\MGL at temp@b{\the\verbatim at line}%
+    \ifx\MGL at temp@a\MGL at temp@b\else%
+      \def\MGL at next{\MGL at closein\MGL at in@stream}%
+      \def\verbatim at processline{}%
     \fi%
-    \MGL at next@action%
   }%
-\endgroup
-
-\def\MGL at set@write at verb@out{%
-  \def\MGL at write@verb at code@action{%
-    \MGL at write\MGL at out@stream{\the\MGL at line}%
+  \def\verbatim at finish{%
+    \MGL at read\MGL at in@stream{\MGL at temp@a}%
+    \ifeof\MGL at in@stream\else%
+      \def\MGL at next{\MGL at closein\MGL at in@stream}%
+    \fi%
   }%
+  \MGL at openin\MGL at in@stream{#1}%
+  \verbatim at start%
 }
-\def\MGL at set@write at verb@to at doc{%
-  \def\MGL at write@verb at code@action{%
-    \stepcounter{MGL at verb@line at no}%
-    \item\mbox{\the\MGL at line}%
-  }%
+
+\def\MGL at write@funcs{\MGL at write\MGL at main@stream{stop^^J}}
+\def\MGL at func#1{%
+  \MGL at openin\MGL at in@stream{\MGL at dir\MGL at backups@dir#1.mgl}%
+  \MGL@@func%
 }
-\begingroup%
-  \catcode`\^^M\active\relax%
-  \gdef\MGL at ignore@verb at line#1^^M{%
-    \expandafter\MGL at write@verb at line%
-  }
-\endgroup%
-\newtoks\MGL at word
-\newtoks\MGL at line
-\def\MGL at write@verb at line#1{%
-  \let\MGL at next@action\MGL at write@verb at line%
-  \expandafter\if#1\^^M%
-    \MGL at write@verb at code@action%
-    \MGL at word{}%
-    \MGL at line{}%
-  \else\expandafter\if#1\space%
-    \MGL at word{}%
-    \MGL at line\expandafter{\the\MGL at line#1}%
-  \else%
-    \MGL at word\expandafter{\the\MGL at word#1}%
-    \MGL at line\expandafter{\the\MGL at line#1}%
-    \MGL at test@end at env{\the\MGL at word}%
-  \fi\fi%
-  \MGL at next@action%
-}
-\def\MGL at rewrite@code#1{%
-  \MGL at read\MGL at in@stream{\MGL at this@code at line}%
+\def\MGL@@func{%
+  \MGL at read\MGL at in@stream{\MGL at temp@a}%
   \ifeof\MGL at in@stream%
-    \MGL at closein{\MGL at in@stream}%
+    \MGL at closein\MGL at in@stream%
   \else%
-    \MGL at write#1{\MGL at this@code at line}%
-    \MGL at rewrite@code{#1}%
+    \MGL at write\MGL at main@stream{\MGL at temp@a}%
+    \expandafter\MGL@@func%
   \fi%
 }
-\begingroup%
-  \catcode`\^^M\active\relax%  
-  \gdef\MGL at compare@next at verb@line#1^^M{%
-    \expandafter\MGL at compare@verb at line%
-  }%
-\endgroup
-\def\MGL at compare@verb at line#1{%
-  \let\MGL at next@action\MGL at compare@verb at line%
-  \expandafter\if#1\^^M%
-    \MGL at line\expandafter{\the\MGL at line#1}%
-    \MGL at read\MGL at in@stream{\MGL at this@code at line}%
-    \edef\MGL at this@line{\the\MGL at line}%
-    \ifx\MGL at this@line\MGL at this@code at line\else%
-      \def\MGL at future@action{}%
-    \fi%
-    \MGL at word{}%
-    \MGL at line{}%
-  \else\expandafter\if#1\space%
-    \MGL at word{}%
-    \MGL at line\expandafter{\the\MGL at line#1}%
-  \else%
-    \MGL at word\expandafter{\the\MGL at word#1}%
-    \MGL at line\expandafter{\the\MGL at line#1}%
-    \edef\MGL at this@line{\the\MGL at word}%
-    \ifx\MGL at this@line\MGL at end@env at cmd%
-      \def\MGL at next@action{\MGL at end@env}%
-      \MGL at read\MGL at in@stream{\MGL at this@code at line}%
-      \ifeof\MGL at in@stream\else%
-        \def\MGL at future@action{}%
-      \fi%
+
+\def\MGL at set@verbatim at code{%
+  \if at minipage\else\vskip\parskip\fi%
+  \leftskip\@totalleftmargin\rightskip\z at skip%
+  \parindent\z@\parfillskip\@flushglue\parskip\z@%
+  \@@par%
+  \def\par{%
+    \if at tempswa%
+      \leavevmode\null\@@par\penalty\interlinepenalty%
+    \else%
+      \@tempswatrue%
+      \ifhmode\@@par\penalty\interlinepenalty\fi%
     \fi%
-  \fi\fi%
-  \MGL at next@action%
-}
-\newcounter{MGL at verb@line at no}
-\def\MGL at prepare@verb at env{%
-  \setcounter{MGL at verb@line at no}{0}%
-  \list{\itshape\footnotesize\arabic{MGL at verb@line at no}.}{}%
-  \setlength{\labelsep}{1em}%
-  \itemsep\z at skip%
-  \leftskip\z at skip\rightskip\z at skip%
-  \parindent\z@\parfillskip\@flushglue\parskip\z at skip%
-  \MGL at verb@codes%
-  \obeyspaces%
+  }%
+  \obeylines%
+  \let\do\@makeother\dospecials%
   \verbatim at font%
+  \frenchspacing%
+  \everypar\expandafter{\the\everypar\unpenalty}%
+  \def\@noitemerr{\PackageWarning{mglTeX}{Empty MGL script}}%
+  \labelsep1em%
+  \itemsep\z@%
+  \def\@xobeysp{\space}\@vobeyspaces%
+  \pretolerance\@M%
+  \hbadness\@M%
+  \advance\leftskip\mglbreakindent%
+  \itemindent-\mglbreakindent%
 }
-\def\MGL at rewrite@code at verb{%
-  \stepcounter{MGL at verb@line at no}%
-  \MGL at read\MGL at in@stream{\MGL at this@code at line}%
-  \ifeof\MGL at in@stream%
-    \def\MGL at next@action{%
-      \MGL at closein{\MGL at in@stream}%
-      \endlist%
-    }%
-  \else%
-    \def\MGL at next@action{%
-      \item\mbox{\MGL at this@code at line}%
-      \MGL at rewrite@code at verb%
-    }%
-  \fi%
-  \MGL at next@action%
-}
-%%%%% Anatomy of environments and commands %%%%%
+
+\def\MGL at line@sep{\leavevmode\cleaders\hrule height\mgllinethickness\hfill\kern\z@}
+\def\MGL at dash@sep{\leavevmode\cleaders\hb at xt@\mgldashwidth{\hss-\hss}\hfill\kern\z@}
 
 \newcommand\mgl[1][]{%
-  \MGL at setkeys{mgl at keys}{#1}%
-  \MGL at create@code at label%
+  \define at key{MGL at keys}{label}{\def\MGL at script@name{##1}}%
+  \MGL at setkeys{MGL at keys}{#1}%
+  \@ifundefined{MGL at script@name}{%
+    \stepcounter{MGL at script@no}%
+    \edef\MGL at script@name{\MGL at main@script at name-MGL-\arabic{MGL at script@no}}%
+  }{}%
+  \MGL at set@script at name{\MGL at script@name}%
   \MGL at codes%
-  \MGL at def@end at env@cmd{mgl}%
-  \def\MGL at future@action{%
-    \MGL at write\@auxout{\string\MGL at unchanged{\MGL at this@code at label}}%
-  }%
-  \MGL at set@write at script@out%
-  \@ifundefined{MGL@@@\MGL at this@code at label}{%
-    \MGL at write\MGL at script{quality \MGL at quality}%
-    \MGL at write\MGL at script{setsize \MGL at width\space\MGL at height}%
-    \MGL at openout{\MGL at out@stream}{\MGL at dir\MGL at backups@dir\MGL at this@code at label.mgl.backup}%
-    \def\MGL at save@action{%
-      \MGL at write\MGL at script{write '\MGL at dir\MGL at graphics@dir\MGL at this@code at label\MGL at graphics@ext'}%
-      \MGL at write\MGL at script{reset}%
-      \MGL at write\MGL at script{}%
-    }
-    \expandafter\MGL at write@line%
+  \MGL at process@script{%
+    \mgl at write@script%
   }{%
-    \def\MGL at save@action{}%
-    \MGL at openin{\MGL at in@stream}{\MGL at dir\MGL at backups@dir\MGL at this@code at label.mgl.backup}%
-    \expandafter\MGL at compare@line%
+    \MGL at compare@code{\MGL at dir\MGL at backups@dir\MGL at script@name.mgl}%
   }%
 }
+\def\mgl at write@script{%
+  \def\MGL at next{%
+    \MGL at closeout\MGL at out@stream%
+    \MGL at write\MGL at main@stream{%
+      write '\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext'^^J%
+      ^^Jreset^^J%
+    }%
+    \MGL at write\@auxout{\string\MGL at unchanged{\MGL at script@name}}%
+  }%
+  \def\verbatim at processline{%
+    \MGL at write\MGL at main@stream{\the\verbatim at line}%
+    \MGL at write\MGL at out@stream{\the\verbatim at line}%
+  }%
+  \MGL at write\MGL at main@stream{quality \MGL at quality}%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at backups@dir\MGL at script@name.mgl}%
+  \verbatim at start%
+}
 \def\endmgl{%
-  \MGL at closeout{\MGL at out@stream}%
-  \MGL at closein{\MGL at in@stream}%
-  \MGL at save@action%
-  \MGL at future@action%
-  \MGL at include@graphics%
+  \MGL at next%
+  \MGL at includegraphics%
 }
 
 \def\mgladdon{%
+  \@bsphack%
   \MGL at codes%
-  \MGL at def@end at env@cmd{mgladdon}%
-  \MGL at set@write at out%
-  \MGL at set@write at script%
-  \expandafter\MGL at write@line%
+  \def\verbatim at processline{%
+    \MGL at write\MGL at main@stream{\the\verbatim at line}%
+  }%
+  \verbatim at start%
 }
-\def\endmgladdon{%
-  \MGL at write\MGL at script{}%
+\def\endmgladdon{\@esphack}
+
+\newcommand\mglfunc[2][0]{%
+  \@bsphack%
+  \MGL at set@script at name{#2}%
+  \g at addto@macro\MGL at write@funcs{\MGL at func{#2}}%
+  \MGL at codes%
+  \def\verbatim at processline{\MGL at write\MGL at out@stream{\the\verbatim at line}}%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at backups@dir\MGL at script@name.mgl}%
+  \MGL at write\MGL at out@stream{func '\MGL at script@name' #1}%
+  \verbatim at start%
 }
+\def\endmglfunc{%
+  \MGL at write\MGL at out@stream{return^^J}%
+  \MGL at closeout\MGL at out@stream%
+  \@esphack%
+}%
 
 \newcommand\mglcode[2][]{%
-  \MGL at setkeys{mgl at keys}{#1}%
-  \MGL at test@code at label{#2}%
-  \MGL at verb@codes%
-  \MGL at def@end at env@cmd{mglcode}%
-  \@ifundefined{MGL@@@\MGL at this@code at label}{%
-    \def\MGL at future@action{%
-      \MGL at write{18}{%
-        mglconv -q \MGL at quality\space -S \MGL at scale\space -s "\MGL at dir\MGL at scripts@dir\mglcommonscript.mgl" -o "\MGL at dir\MGL at graphics@dir\MGL at this@code at label\MGL at graphics@ext" "\MGL at dir\MGL at scripts@dir\MGL at this@code at label.mgl"%
-      }%
-      \MGL at write\@auxout{\string\MGL at unchanged{\MGL at this@code at label}}%
-    }%
-    \MGL at set@write at verb@out%
-    \MGL at openout{\MGL at out@stream}{\MGL at dir\MGL at backups@dir\MGL at this@code at label.mgl.backup}%
-    \expandafter\MGL at ignore@verb at line%
+  \MGL at setkeys{MGL at keys}{#1}%
+  \MGL at set@script at name{#2}%
+  \MGL at codes%
+  \MGL at process@script{%
+    \mglcode at write@script%
   }{%
-    \def\MGL at future@action{%
-      \MGL at write\@auxout{\string\MGL at unchanged{\MGL at this@code at label}}%
+    \MGL at compare@code{\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl}%
+  }%
+}
+\def\mglcode at write@script{%
+  \def\MGL at next{%
+    \MGL at closeout\MGL at out@stream%
+    \MGL at write\@auxout{\string\MGL at unchanged{\MGL at script@name}}%
+    \MGL at write{18}{%
+      mglconv -q \MGL at quality\space -S \MGL at scale\space%
+      -s "\MGL at dir\MGL at scripts@dir\mglcommonscriptname.mgl"\space%
+      -o "\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext"\space%
+      "\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl"%
     }%
-    \MGL at openin{\MGL at in@stream}{\MGL at dir\MGL at backups@dir\MGL at this@code at label.mgl.backup}%
-    \expandafter\MGL at compare@next at verb@line%
   }%
+  \def\verbatim at processline{\MGL at write\MGL at out@stream{\the\verbatim at line}}%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl}%
+  \verbatim at start%
 }
 \def\endmglcode{%
-  \MGL at closeout{\MGL at out@stream}%
-  \MGL at closein{\MGL at in@stream}%
-  \bgroup%
-    \endlinechar=-1\relax%
-    \MGL at openin{\MGL at in@stream}{\MGL at dir\MGL at backups@dir\MGL at this@code at label.mgl.backup}%
-    \MGL at openout{\MGL at out@stream}{\MGL at dir\MGL at scripts@dir\MGL at this@code at label.mgl}%
-    \MGL at write\MGL at out@stream{\MGL at signature}%
-    \MGL at rewrite@code{\MGL at out@stream}%
-    \MGL at closein{\MGL at in@stream}%
-    \MGL at closeout{\MGL at out@stream}%
-  \egroup%
-  \MGL at future@action%
-  \MGL at include@graphics%
+  \MGL at next%
+  \MGL at includegraphics%
 }
 
 \def\mglscript#1{%
-  \MGL at test@code at label{#1}%
-  \MGL at verb@codes%
-  \MGL at def@end at env@cmd{mglscript}%
-  \MGL at set@write at verb@out%
-  \MGL at openout{\MGL at out@stream}{\MGL at dir\MGL at scripts@dir\MGL at this@code at label.mgl}%
-  \MGL at write\MGL at out@stream{\MGL at signature}%
-  \expandafter\MGL at ignore@verb at line%
+  \@bsphack%
+  \MGL at set@script at name{#1}%
+  \MGL at codes%
+  \def\verbatim at processline{\MGL at write\MGL at out@stream{\the\verbatim at line}}%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl}%
+  \verbatim at start%
 }
 \def\endmglscript{%
-  \MGL at closeout{\MGL at out@stream}%
+  \MGL at closeout\MGL at out@stream%
+  \@esphack%
 }
 
-\newcommand\mglfunc[2][0]{%
-  \MGL at test@code at label{#2}%
+\def\mglcommon{%
+  \@bsphack%
+  \MGL at set@script at name{\mglcommonscriptname}%
   \MGL at codes%
-  \MGL at def@end at env@cmd{mglfunc}%
-  \MGL at openout{\MGL at out@stream}{\MGL at dir\MGL at backups@dir\MGL at this@code at label.mgl.backup}%
-  \MGL at write\MGL at out@stream{func #2 #1}%
-  \g at addto@macro{\MGL at funcs}{\MGL at rewrite@func{#2}}%
-  \MGL at set@write at out%
-  \expandafter\MGL at ignore@line%
+  \def\verbatim at processline{\MGL at write\MGL at out@stream{\the\verbatim at line}}%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl}%
+  \verbatim at start%
 }
-\def\endmglfunc{%
-  \MGL at write\MGL at out@stream{return}%
-  \MGL at write\MGL at out@stream{}%
-  \MGL at closeout{\MGL at out@stream}%
-}
-\def\MGL at rewrite@func#1{%
-  \MGL at openin{\MGL at in@stream}{\MGL at dir\MGL at backups@dir#1.mgl.backup}%
-  \MGL at rewrite@code{\MGL at script}%
+\@onlypreamble\mglcommon
+\def\endmglcommon{%
+  \MGL at closeout\MGL at out@stream%
+  \@esphack%
 }
 
-\def\mglverbatim{%
-  \MGL at def@end at env@cmd{mglverbatim}%
-  \MGL at prepare@verb at env%
-  \MGL at set@write at verb@to at doc
-  \expandafter\MGL at ignore@verb at line%
-}
-\def\endmglverbatim{\endlist}
+\def\mglsetup#1{\mglfunc{#1}}%
+\let\endmglsetup\endmglfunc
 
-\def\mglblock#1{%
-  \MGL at test@code at label{#1}%
-  \MGL at verb@codes%
-  \obeyspaces%
-  \MGL at def@end at env@cmd{mglblock}%
-  \MGL at set@write at verb@out%
-  \MGL at openout{\MGL at out@stream}{\MGL at dir\MGL at scripts@dir\MGL at this@code at label.mgl}%
-  \MGL at write\MGL at out@stream{\MGL at signature}%
-  \expandafter\MGL at ignore@verb at line%
+\newcommand\mglplot[2][]{%
+  \define at key{MGL at keys}{label}{\edef\MGL at script@name{##1}}%
+  \define at key{MGL at keys}{setup}{\def\MGL at mglplot@setup{##1}}%
+  \define at key{MGL at keys}{separator}{%
+    \MGL at def@for at loop{##1}%
+  }%
+  \MGL at setkeys{MGL at keys}{#1}%
+  \@ifundefined{MGL at script@name}{%
+    \stepcounter{MGL at script@no}
+    \edef\MGL at script@name{\MGL at main@script at name-MGL-\arabic{MGL at script@no}}
+  }{}%
+  \MGL at set@script at name{\MGL at script@name}%
+  \@ifundefined{MGL at mglplot@setup}{%
+    \edef\MGL at temp@a{#2}%
+  }{%
+    \edef\MGL at temp@a{call '\MGL at mglplot@setup'^^J#2}%
+  }
+  \MGL at process@script{%
+    \mglplot at write@script%
+  }{%
+    \mglplot at compare@code%
+  }%
+  \MGL at includegraphics%
+}
+\def\mglplot at write@script{%
+  \MGL at write\MGL at main@stream{quality \MGL at quality}%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at backups@dir\MGL at script@name.mgl}%
+  \MGL at for\MGL at temp@b:=\MGL at temp@a\do{%
+    \MGL at write\MGL at main@stream{\MGL at temp@b}%
+    \MGL at write\MGL at out@stream{\MGL at temp@b}%
+  }%
+  \MGL at closeout\MGL at out@stream%
+  \MGL at write\MGL at main@stream{%
+    write '\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext'^^J%
+    ^^Jreset^^J%
+  }%
+  \MGL at write\@auxout{\string\MGL at unchanged{\MGL at script@name}}%
+}
+\def\mglplot at compare@code{%
+  \def\MGL at next{\MGL at write\@auxout{\string\MGL at unchanged{\MGL at script@name}}}%
+  \MGL at openin\MGL at in@stream{\MGL at dir\MGL at backups@dir\MGL at script@name.mgl}%
+  \MGL at for\MGL at temp@b:=\MGL at temp@a\do{%
+    \MGL at read\MGL at in@stream{\MGL at temp@c}%
+    \ifx\MGL at temp@b\MGL at temp@c\else%
+      \let\MGL at next\relax%
+    \fi%
+  }%
+  \MGL at closein\MGL at in@stream%
+  \MGL at next%
+}
+
+\def\mglblock{\@MGL at list@script at true\mglblock@}
+\@namedef{mglblock*}{\@MGL at list@script at false\mglblock@}
+\newcommand\mglblock@[2][]{%
+  \@MGL at lineno@true%
+  \setkeys{MGL at verb@keys}{#1}%
+  \MGL at set@script at name{#2}%
+  \if at MGL@list at script@%
+    \refstepcounter{MGL at verb@script at no}%
+    \addcontentsline{lms}{MGL at script}{%
+      \protect\numberline{\theMGL at verb@script at no.}%
+      {\ttfamily\protect\detokenize{\MGL at script@name.mgl}}%
+    }%
+  \fi%
+  \if at MGL@lineno@%
+    \list{\mgllinenostyle\arabic{MGL at line@no}.}{\usecounter{MGL at line@no}}%
+  \else%
+    \list{}{}%
+  \fi%
+  \MGL at set@verbatim at code%
+  \fboxrule=\mgllinethickness%
+  \item[\MGL at line@sep]\fbox{%
+    \bfseries\ttfamily\expandafter\detokenize\expandafter{\MGL at script@name.mgl}%
+  }\hskip\labelsep\MGL at line@sep\par\par%
+  \def\verbatim at processline{%
+    \item\the\verbatim at line%
+    \MGL at write\MGL at out@stream{\the\verbatim at line}%
+  }%
+  \MGL at openout\MGL at out@stream{\MGL at dir\MGL at scripts@dir\MGL at script@name.mgl}%
+  \verbatim at start%
 }
 \def\endmglblock{%
-  \MGL at closeout{\MGL at out@stream}%
-  \mglinclude{\MGL at this@code at label}%
+  \MGL at closeout\MGL at out@stream%
+  \item[\MGL at line@sep]\hskip-\labelsep\MGL at line@sep%
+  \endlist%
+}
+\expandafter\let\csname endmglblock*\endcsname\endmglblock
+
+\def\mglverbatim{\@MGL at list@script at true\mglverbatim@}
+\@namedef{mglverbatim*}{\@MGL at list@script at false\mglverbatim@}
+\newcommand\mglverbatim@[1][]{%
+  \@MGL at lineno@true%
+  \define at key{MGL at verb@keys}{label}{\edef\MGL at script@name{##1}}%
+  \setkeys{MGL at verb@keys}{#1}%
+  \if at MGL@lineno@%
+    \list{\mgllinenostyle\arabic{MGL at line@no}.}{\usecounter{MGL at line@no}}%
+  \else%
+    \list{}{}%
+  \fi%
+  \MGL at set@verbatim at code%
+  \fboxrule=\mgllinethickness%
+  \@ifundefined{MGL at script@name}{%
+    \edef\MGL at script@name{\mglverbatimname}%
+    \item[\MGL at line@sep]\hskip-\labelsep\MGL at line@sep%
+  }{%
+    \item[\MGL at line@sep]\fbox{%
+      \bfseries\ttfamily\expandafter\detokenize\expandafter{\MGL at script@name.mgl}%
+    }\hskip\labelsep\MGL at line@sep\par\par%
+  }%
+  \if at MGL@list at script@%
+    \refstepcounter{MGL at verb@script at no}%
+    \addcontentsline{lms}{MGL at script}{%
+      \protect\numberline{\theMGL at verb@script at no.}%
+      {\ttfamily\protect\detokenize{\MGL at script@name}}%
+    }%
+  \fi%
+  \def\verbatim at processline{%
+    \item\the\verbatim at line%
+  }%
+  \verbatim at start%
 }
+\def\endmglverbatim{%
+  \MGL at closeout\MGL at out@stream%
+  \item[\MGL at line@sep]\hskip-\labelsep\MGL at line@sep%
+  \endlist%
+}
+\expandafter\let\csname endmglverbatim*\endcsname\endmglverbatim
 
-\def\mglinclude#1{%
-  \bgroup%
-    \MGL at prepare@verb at env%
-    \MGL at openin{\MGL at in@stream}{\MGL at dir\MGL at scripts@dir#1.mgl}%
-    \MGL at rewrite@code at verb%
-  \egroup%
+\def\mglcomment{%
+  \if at MGL@comments@%
+    \list{}{}%
+    \MGL at set@verbatim at code%
+    \item\hskip-\labelsep<\MGL at dash@sep\mglcommentname\MGL at dash@sep>%
+    \def\verbatim at processline{\item\the\verbatim at line}%
+    \verbatim at start%
+  \else%
+    \@bsphack%
+    \MGL at codes%
+    \let\verbatim at startline\relax%
+    \let\verbatim at addtoline\@gobble%
+    \let\verbatim at processline\relax%
+    \let\verbatim at finish\relax%
+    \verbatim@%
+  \fi%
+}
+\def\endmglcomment{%
+  \if at MGL@comments@%
+    \item\hskip-\labelsep<\MGL at dash@sep\mglcommentname\MGL at dash@sep>%
+    \endlist%
+  \else%
+    \@esphack%
+  \fi%
 }
 
 \newcommand\mglgraphics[2][]{%
-  \MGL at setkeys{mgl at keys}{#1}%
-  \edef\MGL at this@code at label{#2}%
-  \IfFileExists{\MGL at dir\MGL at graphics@dir\MGL at this@code at label\MGL at graphics@ext}{}{%
-    \MGL at write{18}{mglconv -q \MGL at quality\space -S \MGL at scale\space -s "\MGL at dir\MGL at scripts@dir\mglcommonscript.mgl" -o "\MGL at dir\MGL at graphics@dir\MGL at this@code at label\MGL at graphics@ext" "\MGL at dir\MGL at scripts@dir\MGL at this@code at label.mgl"}
+  \bgroup%
+  \define at key{MGL at keys}{path}{\def\MGL at forced@path{##1}}%
+  \MGL at setkeys{MGL at keys}{#1}%
+  \edef\MGL at script@name{#2}%
+  \IfFileExists{\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext}{}{%
+    \@ifundefined{MGL at forced@path}{%
+      \@for\MGL at temp@a:=\MGL at paths\do{%
+        \IfFileExists{\MGL at temp@a\MGL at script@name.mgl}{%
+          \edef\MGL at temp@b{\MGL at temp@a}%
+        }{}%
+      }%
+    }{%
+      \IfFileExists{\MGL at forced@path\MGL at script@name.mgl}{%
+        \edef\MGL at temp@b{\MGL at forced@path}%
+      }{}%
+    }%
+    \@ifundefined{MGL at temp@b}{%
+      \PackageWarning{mgltex}{%
+        MGL script "\MGL at script@name.mgl" not found%
+      }%
+    }{%
+      \MGL at write{18}{%
+        mglconv -q \MGL at quality\space -S \MGL at scale\space%
+        -s "\MGL at dir\MGL at scripts@dir\mglcommonscriptname.mgl"\space%
+        -o "\MGL at dir\MGL at graphics@dir\MGL at script@name\MGL at graph@ext"\space%
+        "\MGL at temp@b\MGL at script@name.mgl"%
+      }%
+    }%
   }%
-  \MGL at write\@auxout{\string\MGL at unchanged{\MGL at this@code at label}}%
-  \MGL at include@graphics%
+  \MGL at includegraphics%
+  \egroup%
 }
 
-\def\mglcommonscript{common_script}
-\def\mglcommon{%
-  \MGL at test@code at label{\mglcommonscript}%
-  \MGL at codes%
-  \MGL at def@end at env@cmd{mglcommon}%
-  \MGL at set@write at out%
-  \MGL at openout{\MGL at out@stream}{\MGL at dir\MGL at scripts@dir\MGL at this@code at label.mgl}%
-  \MGL at write\MGL at out@stream{\MGL at signature}%
-  \MGL at write\MGL at out@stream{quality \MGL at quality}%
-  \MGL at write\MGL at out@stream{setsize \MGL at width\space\MGL at height}%
-  \expandafter\MGL at ignore@line%
-}
-\@onlypreamble\mglcommon
-\def\endmglcommon{%
-  \MGL at closeout\MGL at out@stream%
+\def\mglinclude{\@MGL at list@script at true\mglinclude@}
+\@namedef{mglinclude*}{\@MGL at list@script at false\mglinclude@}
+\newcommand\mglinclude@[2][]{%
   \bgroup%
-    \endlinechar=-1\relax%
-    \MGL at openin{\MGL at in@stream}{\MGL at dir\MGL at scripts@dir\MGL at this@code at label.mgl}%
-    \MGL at openout{\MGL at out@stream}{\MGL at dir\MGL at backups@dir\MGL at this@code at label.mgl.backup}%
-    \MGL at rewrite@code{\MGL at out@stream}%
-    \MGL at closein{\MGL at in@stream}%
-    \MGL at closeout{\MGL at out@stream}%
+  \@MGL at lineno@true%
+  \define at key{MGL at verb@keys}{path}{\def\MGL at forced@path{##1}}%
+  \setkeys{MGL at verb@keys}{#1}%
+  \edef\MGL at script@name{#2}%
+  \@ifundefined{MGL at forced@path}{%
+    \@for\MGL at temp@b:=\MGL at paths\do{%
+      \IfFileExists{\MGL at temp@b\MGL at script@name.mgl}{%
+        \edef\MGL at temp@a{\MGL at temp@b}%
+      }{}%
+    }%
+  }{%
+    \IfFileExists{\MGL at script@name.mgl}{%
+      \edef\MGL at temp@a{\MGL at forced@path}%
+    }{}%
+  }%
+  \@ifundefined{MGL at temp@a}{%
+    \PackageWarning{mgltex}{%
+      MGL script "\MGL at forced@path\MGL at script@name.mgl" not found%
+    }%
+    \center%
+      \fbox{%
+        \centering%
+        \bfseries\Huge%
+        \begin{tabular}{c}MGL\\script\\not\\found\end{tabular}%
+      }%
+    \endcenter%
+  }{%
+    \mglinclude@@%
+  }%
   \egroup%
 }
-
-\def\MGL at setups@written{}
-\def\mglsetup#1{%
-  \MGL at test@code at label{#1}%
-  \xdef\MGL at setups@written{\MGL at setups@written\MGL at this@code at label,}
-  \g at addto@macro{\MGL at funcs}{\MGL at rewrite@func{#1}}%
-  \MGL at codes%
-  \MGL at def@end at env@cmd{mglsetup}%
-  \MGL at openout{\MGL at out@stream}{\MGL at dir\MGL at backups@dir\MGL at this@code at label.mgl.backup}%
-  \MGL at write\MGL at out@stream{func #1}%
-  \MGL at set@write at out%
-  \expandafter\MGL at ignore@line%
-}
-\def\endmglsetup{%
-  \MGL at write\MGL at out@stream{return}%
-  \MGL at write\MGL at out@stream{}%
-  \MGL at closeout{\MGL at out@stream}%
-}
-
-\def\mglplot at call@setup{%
-  \ifx\mglplot at setup\@empty\else%
-    \def\MGL at future@action{%
-      \PackageWarning{mgltex}{No "\mglplot at setup" setup for \string\mglplot}%
-    }%
-    \@for\MGL at setup:=\MGL at setups@written\do{%
-      \ifx\MGL at setup\mglplot at setup%
-        \MGL at write\MGL at script{call '\mglplot at setup'}%
-        \MGL at write\MGL at out@stream{\mglplot at setup}%
-        \def\MGL at future@action{}%
-      \fi%
+\def\mglinclude@@{%
+  \@addtofilelist{\MGL at script@name.mgl}%
+  \if at MGL@list at script@%
+    \refstepcounter{MGL at verb@script at no}%
+    \addcontentsline{lms}{MGL at script}{%
+      \protect\numberline{\theMGL at verb@script at no.}%
+      {\ttfamily\protect\detokenize{\MGL at script@name.mgl}}%
     }%
   \fi%
+  \if at MGL@lineno@%
+    \list{\mgllinenostyle\arabic{MGL at line@no}.}{\usecounter{MGL at line@no}}%
+  \else%
+    \list{}{}%
+  \fi%
+  \MGL at set@verbatim at code%
+  \fboxrule=\mgllinethickness%
+  \item[\MGL at line@sep]\fbox{%
+    \bfseries\ttfamily\expandafter\detokenize\expandafter{\MGL at script@name.mgl}%
+  }\hskip\labelsep\MGL at line@sep\par\par%
+  \def\verbatim at processline{%
+    \item\the\verbatim at line%
+  }%
+  \immediate\openin\MGL at in@stream="\MGL at temp@a\MGL at script@name.mgl"%
+  \mglinclude@@@%
+}
+\def\mglinclude@@@{%
+  \immediate\read\MGL at in@stream to \MGL at temp@b%
+  \ifeof\MGL at in@stream%
+    \immediate\closein\MGL at in@stream%
+    \item[\MGL at line@sep]\hskip-\labelsep\MGL at line@sep%
+    \endlist%
+  \else%
+    \verbatim at startline%
+    \expandafter\verbatim at addtoline\expandafter{\MGL at temp@b}%
+    \verbatim at processline%
+    \expandafter\mglinclude@@@%
+  \fi%
+}
+\def\mglname#1{\edef\MGL at main@script at name{#1}}
+\AtBeginDocument{%
+  \def\mglname#1{%
+    \@bsphack%
+    \MGL at write@funcs%
+    \immediate\closeout{\MGL at main@stream}%
+    \MGL at write{18}{%
+      mglconv -q \MGL at quality\space -S \MGL at scale\space%
+      -s "\MGL at dir\MGL at scripts@dir\mglcommonscriptname.mgl"\space%
+      -n "\MGL at dir\MGL at scripts@dir\MGL at main@script at name.mgl"%
+    }%
+    \edef\MGL at main@script at name{#1}%
+    \bgroup\MGL at set@script at name{\MGL at main@script at name}\egroup%
+    \MGL at openout\MGL at main@stream{%
+      \MGL at dir\MGL at scripts@dir\MGL at main@script at name.mgl%
+    }%
+    \@esphack%
+  }%
 }
 
-\newcommand\mglplot[2][]{%
-  \bgroup%
-    \def\mglplot at setup{}%
-    \MGL at setkeys{mglplot at keys}{#1}%
-    \MGL at create@code at label%
-    \@ifundefined{MGL@@@\MGL at this@code at label}{%
-      \MGL at write\MGL at script{quality \MGL at quality}%
-      \MGL at write\MGL at script{setsize \MGL at width\space\MGL at height}%
-      \MGL at openout{\MGL at out@stream}{\MGL at dir\MGL at backups@dir\MGL at this@code at label.mgl.backup}%
-      \mglplot at call@setup%
-      \MGL at write\MGL at script{#2}%
-      \MGL at write\MGL at out@stream{#2}%
-      \MGL at closeout{\MGL at out@stream}%
-      \MGL at write\MGL at script{write '\MGL at dir\MGL at graphics@dir\MGL at this@code at label\MGL at graphics@ext'}%
-      \MGL at write\MGL at script{reset}%
-      \MGL at write\MGL at script{}%
-      \MGL at write\@auxout{\string\MGL at unchanged{\MGL at this@code at label}}%
-    }{%
-      \endlinechar=-1\relax%
-      \MGL at openin{\MGL at in@stream}{\MGL at dir\MGL at backups@dir\MGL at this@code at label.mgl.backup}%
-      \ifx\mglplot at setup\@empty\else%
-        \MGL at read\MGL at in@stream{\MGL at this@code at line}%
-        \ifx\MGL at this@code at line\mglplot at setup%
-          \MGL at read\MGL at in@stream{\MGL at this@code at line}%
-          \edef\MGL at this@line{#2}%
-          \ifx\MGL at this@code at line\MGL at this@line%
-            \MGL at write\@auxout{\string\MGL at unchanged{\MGL at this@code at label}}%
-          \fi%
-        \fi%
+\ifx\l at chapter\@undefined%
+  \ifx\l at section\@undefined%
+    \def\listofmglscripts{%
+      \@startsection{MGL at list}%
+      {1}{0em}{-3.5ex plus -1ex minus -0.2ex}%
+      {2.5ex plus 0.2ex}%
+      {\centering\normalfont\bfseries\large}*%
+      {\listofmglscriptsname}%
+      \@mkboth{%
+        \MakeUpperCase\listofmglscriptsname%
+      }{%
+        \MakeUppercase\listofmglscriptsname%
+      }%
+      \@starttoc{lms}%
+    }%
+    \newcommand*\l at MGL@list[2]{%
+      \ifnum \c at tocdepth >\z@
+        \addpenalty\@secpenalty
+        \addvspace{1.0em \@plus\p@}%
+        \setlength\@tempdima{1.5em}%
+        \begingroup
+          \parindent \z@ \rightskip \@pnumwidth
+          \parfillskip -\@pnumwidth
+          \leavevmode \bfseries
+          \advance\leftskip\@tempdima
+          \hskip -\leftskip
+          #1\nobreak\hfil \nobreak\hb at xt@\@pnumwidth{\hss #2}\par
+        \endgroup
       \fi%
-      \MGL at closein{\MGL at in@stream}
     }%
-  \egroup%
-}%
-
-\def\mglcomment{%
-  \MGL at codes%
-  \verbatim at font%
-  \small%
-  \mgl at comment%
-}
-\begingroup%
-  \catcode`|=0\catcode`[= 1\catcode`]=2\catcode`\{=12\catcode`\}=12\catcode`\\=12%
-  |gdef|mgl at comment#1\end{mglcomment}[%
-    |if at MGL@comments@%
-      |begin[center]%
-        <------------------ MGL comment ------------------>%
-        #1%
-        <------------------ MGL comment ------------------>%
-      |end[center]%
-    |fi%
-    |end[mglcomment]]%
-|endgroup%
-\def\endmglcomment{}
-
-\def\MGL at signature{}
-\begingroup%
-  \catcode`#=12\relax%
-  \gdef\MGL at comm@sym{#}
-\endgroup
-\def\mglsignature{%
-  \MGL at verb@codes%
-  \obeyspaces%
-  \MGL at def@end at env@cmd{mglsignature}%
-  \def\MGL at write@code at action##1{\g at addto@macro{\MGL at signature}{\MGL at comm@sym\space##1^^J}}%
-  \catcode`|=0\relax\catcode`[=1\relax\catcode`]=2\relax%
-  \expandafter\MGL at ignore@line%
-}
-\def\endmglsignature{}
-
-\def\MGL at quality{2}
-\def\mglquality#1{%
-  \def\MGL at quality{#1}%
-  \ifcase#1
-    \PackageInfo{mgltex}{Quality 0: No face drawing (fastest)}%
-  \or%
-    \PackageInfo{mgltex}{Quality 1: No color interpolation (fast)}%
-  \or%
-    \PackageInfo{mgltex}{Quality 2: High quality (normal)}%
-  \or%
-    \PackageInfo{mgltex}{Quality 3: High quality with 3d primitives (not implemented yet)}%
-  \or%
-    \PackageInfo{mgltex}{Quality 4: No face drawing, direct bitmap drawing (low memory usage)}%
-  \or%
-    \PackageInfo{mgltex}{Quality 5: No color interpolation, direct bitmap drawing (low memory usage)}%
-  \or%
-    \PackageInfo{mgltex}{Quality 6: High quality, direct bitmap drawing (low memory usage)}%
-  \or%
-    \PackageInfo{mgltex}{Quality 7: High quality with 3d primitives, direct bitmap drawing (not implemented yet)}%
-  \or%
-    \PackageInfo{mgltex}{Quality 8: Draw dots instead of primitives (extremely fast)}%
   \else%
-    \PackageWarning{mgltex}{Quality #1 not available. Using default (2)}%
+    \def\listofmglscripts{%
+      \section*{\listofmglscriptsname}%
+      \@mkboth{%
+        \MakeUppercase\listofmglscriptsname%
+      }{%
+        \MakeUppercase\listofmglscriptsname%
+      }%
+      \@starttoc{lms}%
+    }%
   \fi%
-}
-\@onlypreamble\mglquality
+\else%
+  \def\listofmglscripts{%
+    \chapter*{\listofmglscriptsname}%
+    \@mkboth{%
+      \MakeUpperCase\listofmglscriptsname%
+    }{%
+      \MakeUppercase\listofmglscriptsname%
+    }%
+    \@starttoc{lms}%
+  }%
+\fi%
 
-\def\MGL at width{640}
-\def\MGL at height{480}
-\def\mglsetsize#1#2{%
-  \def\MGL at width{#1}%
-  \def\MGL at height{#2}%
-}
-\@onlypreamble\mglsetsize
+\def\mglTeX{mgl\TeX}
 
-\def\mgltexon{
-  \def\MGL at openout##1##2{%
-    \immediate\openout##1="##2"%
-  }%
-  \def\MGL at write##1##2{%
-    \immediate\write##1{##2}%
-  }%
-  \def\MGL at graph@not at found@text{MGL\\image\\not\\found}%
-  \def\MGL at graph@not at found@message{MGL image "\MGL at this@code at label" not found}%
-}
-\def\mgltexoff{%
-  \def\MGL at openout##1##2{}%
-  \def\MGL at write##1##2{}%
-  \def\MGL at graph@not at found@text{\mglTeX\\is off,\\no image\\generated}%
-  \def\MGL at graph@not at found@message{mglTeX is off, MGL image "\MGL at this@code at label" not generated}%
-}
+\def\mglTeXwVer{\mglTeX~v4.0}
+
+\def\mgldir#1{\def\MGL at dir{#1}}\@onlypreamble\mgldir
+\def\mglscriptsdir#1{\def\MGL at scripts@dir{#1}}\@onlypreamble\mglscriptsdir
+\def\mglgraphicsdir#1{\def\MGL at graphics@dir{#1}}\@onlypreamble\mglgraphicsdir
+\def\mglbackupsdir#1{\def\MGL at backups@dir{#1}}\@onlypreamble\mglbackupsdir
+\def\mglpaths#1{\g at addto@macro\MGL at paths{,#1}}
 
-\def\mglcomments{
-  \@MGL at comments@true%
+\def\mglcommonscriptname{MGL_common_script}
+\def\mglcommentname{MGL commentary}
+\def\listofmglscriptsname{List of MGL scripts}
+\def\mglverbatimname{(Unnamed MGL verbatim script)}
+\def\mgllinenostyle{\footnotesize}
+\newdimen\mgldashwidth\mgldashwidth=0.75em
+\newdimen\mgllinethickness\mgllinethickness=0.25ex
+\newdimen\mglbreakindent\mglbreakindent=1em
+
+\AtBeginDocument{%
+  \bgroup\MGL at set@script at name{\MGL at main@script at name}\egroup%
+  \immediate\openout\MGL at main@stream=%
+  \MGL at dir\MGL at scripts@dir\MGL at main@script at name.mgl%
 }
-\def\mglnocomments{%
-  \@MGL at comments@false%
+\AtEndDocument{%
+  \MGL at write@funcs%
+  \immediate\closeout\MGL at main@stream%
+  \MGL at write{18}{%
+    mglconv -q \MGL at quality\space -S \MGL at scale\space%
+    -s "\MGL at dir\MGL at scripts@dir\mglcommonscriptname.mgl"\space%
+    -n "\MGL at dir\MGL at scripts@dir\MGL at main@script at name.mgl"%
+  }%
 }
-
-\def\mglTeX{mgl\TeX}
\ No newline at end of file
+\endinput
+%%
+%% End of file `mgltex.sty'.
diff --git a/mgltex/sample.tex b/mgltex/sample.tex
index 0fe9dc2..a44dedb 100644
--- a/mgltex/sample.tex
+++ b/mgltex/sample.tex
@@ -15,9 +15,9 @@
   define gravity 9.81
 \end{mglcommon}
 
-\begin{mglsignature}
-  This scripts was generated on date |today.
-\end{mglsignature}
+%\begin{mglsignature}
+%  This scripts was generated on date |today.
+%\end{mglsignature}
 
 
 \begin{document}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 504e7a8..a16a01c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -23,6 +23,9 @@ ${MathGL_BINARY_DIR}/include/mgl2/dllexport.h	cont.hpp
 )
 
 add_definitions(-DMGL_SRC)
+if(MGL_HAVE_GSL2)
+	add_definitions(-DMGL_HAVE_GSL2)
+endif(MGL_HAVE_GSL2)
 
 if(MGL_HAVE_PNG)
 	set(prc_src prc/PRCbitStream.cc prc/PRCdouble.cc prc/oPRCFile.cc prc/writePRC.cc prc.cpp )
@@ -40,20 +43,9 @@ endif(MGL_HAVE_OPENGL)
 
 include(GenerateExportHeader)
 add_compiler_export_flags()
-add_library(mgl SHARED ${mgl_src} ${mgl_hdr})
-add_library(mgl-static STATIC ${mgl_src} ${mgl_hdr})
-set_target_properties(mgl PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-set_target_properties(mgl-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-target_compile_definitions(mgl-static PUBLIC MGL_STATIC_DEFINE)
+mgl_add_lib(mgl ${mgl_src} ${mgl_hdr})
 generate_export_header(mgl EXPORT_FILE_NAME ../include/mgl2/dllexport.h)
 
-if(enable-mgl2)
-	set_target_properties(mgl PROPERTIES OUTPUT_NAME "mgl2")
-	set_target_properties(mgl-static PROPERTIES OUTPUT_NAME "mgl2")
-else(enable-mgl2)
-	set_target_properties(mgl-static PROPERTIES OUTPUT_NAME "mgl")
-endif(enable-mgl2)
-
 # if(MGL_HAVE_LTDL)
 # 	target_link_libraries(mgl ${LTDL_LIB})
 # 	include_directories(${LTDL_INCLUDE_DIR})
@@ -113,44 +105,14 @@ if(MGL_HAVE_ZLIB)
 	include_directories(${ZLIB_INCLUDE_DIR})
 endif(MGL_HAVE_ZLIB)
 
-if(MGL_HAVE_MPI)
-	add_library(mgl-mpi SHARED mpi.cpp ../include/mgl2/mpi.h)
-	add_library(mgl-mpi-static STATIC mpi.cpp ../include/mgl2/mpi.h)
-	set_target_properties(mgl-mpi PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	set_target_properties(mgl-mpi PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
-	set_target_properties(mgl-mpi-static PROPERTIES OUTPUT_NAME "mgl-mpi")
-	set_target_properties(mgl-mpi-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	target_compile_definitions(mgl-mpi-static PUBLIC MGL_STATIC_DEFINE)
-
-	if(enable-mgl2)
-		set_target_properties(mgl-mpi PROPERTIES OUTPUT_NAME "mgl2-mpi")
-		set_target_properties(mgl-mpi-static PROPERTIES OUTPUT_NAME "mgl2-mpi")
-	else(enable-mgl2)
-		set_target_properties(mgl-mpi-static PROPERTIES OUTPUT_NAME "mgl-mpi")
-	endif(enable-mgl2)
-
-	target_link_libraries(mgl-mpi ${MPI_LIBRARIES} )
-#	include_directories(${MPI_C_INCLUDE_PATH})
-	include_directories(${MPI_CXX_INCLUDE_PATH})
-
-	set_target_properties(mgl-mpi PROPERTIES SOVERSION ${MathGL_SOVERSION})
-	install(
-		TARGETS mgl-mpi mgl-mpi-static
-		RUNTIME DESTINATION bin
-		ARCHIVE DESTINATION ${MGL_LIB_INSTALL_DIR}
-		LIBRARY DESTINATION ${MGL_LIB_INSTALL_DIR}
-	)
-endif(MGL_HAVE_MPI)
-
 if(M_LIB)
 	target_link_libraries(mgl ${M_LIB})
 endif(M_LIB)
 
-set_target_properties(mgl PROPERTIES SOVERSION ${MathGL_SOVERSION})
-install(
-	TARGETS mgl mgl-static
-	RUNTIME DESTINATION bin
-	ARCHIVE DESTINATION ${MGL_LIB_INSTALL_DIR}
-	LIBRARY DESTINATION ${MGL_LIB_INSTALL_DIR}
-)
+if(MGL_HAVE_MPI)
+	mgl_add_lib(mpi mpi.cpp ../include/mgl2/mpi.h)
+	target_link_libraries(mgl-mpi ${MPI_LIBRARIES} )
+	target_include_directories(mgl-mpi SYSTEM PUBLIC ${MPI_CXX_INCLUDE_PATH})
+endif(MGL_HAVE_MPI)
+
 install(FILES ${MathGL_BINARY_DIR}/include/mgl2/dllexport.h DESTINATION ${MGL_INCLUDE_PATH})
diff --git a/src/addon.cpp b/src/addon.cpp
index 9537f09..c0f64d7 100644
--- a/src/addon.cpp
+++ b/src/addon.cpp
@@ -75,12 +75,12 @@ MGL_EXPORT char *mgl_fgetstr(FILE *fp)
 void MGL_EXPORT mgl_fgetpar(FILE *fp, const char *str, ...)
 {
 	if(!str || !str[0])	return;
-	long len=strlen(str);
+	const size_t len=strlen(str);
 	char *s, *t;
 	va_list lst;
 	va_start(lst,str);
 	t = mgl_fgetstr(fp);
-	for(long i=0;i<len;i++)
+	for(size_t i=0;i<len;i++)
 	{
 		if(str[i]=='%')
 		{
diff --git a/src/axis.cpp b/src/axis.cpp
index 0bdacba..36164ee 100644
--- a/src/axis.cpp
+++ b/src/axis.cpp
@@ -306,8 +306,7 @@ void mglCanvas::AdjustTicks(mglAxis &aa, bool ff)
 	{
 		d /= -aa.d;
 		long n = floor(log10(d));
-		int k = mgl_int(d*pow(10.,-n));
-		aa.dv = pow(10.,n)*k;
+		aa.dv = pow(10.,n)*mgl_int(d*pow(10.,-n));
 		aa.o=0;	aa.ds = pow(10.,n);
 	}
 	LabelTicks(aa);
@@ -553,7 +552,7 @@ void mglCanvas::DrawAxis(mglAxis &aa, bool text, char arr,const char *stl,mreal
 			for(long j=2;j<10 && v*j<aa.v1;j++)	tick_draw(o+d*(v*j),da,db,1);
 		if(dif_color)	SetPenPal(TickStl);
 	}
-	if(aa.ds>0 && !get(MGL_NOSUBTICKS))
+	if(aa.ds>0 && !get(MGL_NOSUBTICKS) && (fabs(aa.v1)>1e-150 || fabs(aa.v2)>1e-150))
 	{
 		if(aa.v2>aa.v1)	v0 = v0 - aa.ds*floor((v0-aa.v1)/aa.ds+1e-3);
 		else			v0 = v0 - aa.ds*floor((v0-aa.v2)/aa.ds+1e-3);
@@ -633,7 +632,7 @@ void mglCanvas::DrawLabels(mglAxis &aa, bool inv, const mglMatrix *M)
 		if(ux<0 || (ux==0 && uy<0))	{	ux=-ux;	uy=-uy;	pp.w=-pp.w;	}
 		pp.u = ux;	pp.v = uy;
 		mreal pu = p.x*ux+p.y*uy, pv = p.y*ux-p.x*uy; /*, su = ps.x*ux+ps.y*uy;*/
-		if(aa.ch!='c')	up[i] = ((pv>0) ^ inv) ? 'T':'t'; 
+		if(aa.ch!='c')	up[i] = ((pv>0) ^ inv) ? 'T':'t';
 		else		up[i]=(aa.ns==0 || aa.ns==3)?'t':'T';
 		int t=0;
 		if(algn)
diff --git a/src/base.cpp b/src/base.cpp
index a502780..bd605a3 100644
--- a/src/base.cpp
+++ b/src/base.cpp
@@ -187,11 +187,11 @@ const char *mglWarn[mglWarnEnd] = {"data dimension(s) is incompatible",	//mglWar
 								"axis ranges are incompatible",			//mglWarnTern
 								"pointer is NULL",						//mglWarnNull
 								"not enough space for plot",			//mglWarnSpc
-								"There are wrong argument(s) in script",//mglScrArg
-								"There are wrong command in script",	//mglScrCmd
-								"There are too long string in script",	//mglScrLong
-								"There are unbalanced ' in script",		//mglScrStr
-								"There are changing temporary data in script"};	//mglScrTemp
+								"There is wrong argument(s) in script",	//mglScrArg
+								"There is wrong command(s) in script",	//mglScrCmd
+								"There is too long string(s) in script",	//mglScrLong
+								"There is unbalanced ' in script",		//mglScrStr
+								"There is changing temporary data in script"};	//mglScrTemp
 //-----------------------------------------------------------------------------
 extern bool mglPrintWarn;
 void mglBase::SetWarn(int code, const char *who)
@@ -251,6 +251,17 @@ long mglBase::AddGlyph(int s, long j)
 //-----------------------------------------------------------------------------
 //		Add points to the buffer
 //-----------------------------------------------------------------------------
+void inline mgl_put_inbox(mreal a1, mreal a2, mreal &a)
+{
+	if(a1<a2)	{	if(a<a1)	a=a1;	if(a>a2)	a=a2;	}
+	else		{	if(a<a2)	a=a2;	if(a>a1)	a=a1;	}
+}
+void MGL_NO_EXPORT mgl_coor_box(HMGL gr, mglPoint &p)
+{
+	mgl_put_inbox(gr->Min.x, gr->Max.x, p.x);
+	mgl_put_inbox(gr->Min.y, gr->Max.y, p.y);
+	mgl_put_inbox(gr->Min.z, gr->Max.z, p.z);
+}
 long mglBase::AddPnt(const mglMatrix *mat, mglPoint p, mreal c, mglPoint n, mreal a, int scl)
 {
 	// scl=0 -- no scaling
@@ -258,9 +269,14 @@ long mglBase::AddPnt(const mglMatrix *mat, mglPoint p, mreal c, mglPoint n, mrea
 	// scl&2 -- disable NAN at scaling
 	// scl&4 -- disable NAN for normales if no light
 	// scl&8 -- bypass palette for enabling alpha
+	// scl&16 -- put points inside axis range
 	if(mgl_isnan(c) || mgl_isnan(a))	return -1;
 	bool norefr = mgl_isnan(n.x) && mgl_isnan(n.y) && !mgl_isnan(n.z);
-	if(scl>0)	ScalePoint(mat,p,n,!(scl&2));
+	if(scl>0)
+	{
+		if(scl&16)	mgl_coor_box(this, p);
+		ScalePoint(mat,p,n,!(scl&2));
+	}
 	if(mgl_isnan(p.x))	return -1;
 	a = (a>=0 && a<=1) ? a : AlphaDef;
 	c = (c>=0) ? c:CDef;
@@ -442,12 +458,36 @@ bool mglBase::ScalePoint(const mglMatrix *, mglPoint &p, mglPoint &n, bool use_n
 	}
 	else
 	{
-		if(x1<Min.x)	{x=Min.x;	n.Set(1,0,0);}
-		if(x2>Max.x)	{x=Max.x;	n.Set(1,0,0);}
-		if(y1<Min.y)	{y=Min.y;	n.Set(0,1,0);}
-		if(y2>Max.y)	{y=Max.y;	n.Set(0,1,0);}
-		if(z1<Min.z)	{z=Min.z;	n.Set(0,0,1);}
-		if(z2>Max.z)	{z=Max.z;	n.Set(0,0,1);}
+		if(Min.x<Max.x)
+		{
+			if(x1<Min.x)	{x=Min.x;	n.Set(1,0,0);}
+			if(x2>Max.x)	{x=Max.x;	n.Set(1,0,0);}
+		}
+		else
+		{
+			if(x1<Max.x)	{x=Max.x;	n.Set(1,0,0);}
+			if(x2>Min.x)	{x=Min.x;	n.Set(1,0,0);}
+		}
+		if(Min.y<Max.y)
+		{
+			if(y1<Min.y)	{y=Min.y;	n.Set(0,1,0);}
+			if(y2>Max.y)	{y=Max.y;	n.Set(0,1,0);}
+		}
+		else
+		{
+			if(y1<Max.y)	{y=Max.y;	n.Set(0,1,0);}
+			if(y2>Min.y)	{y=Min.y;	n.Set(0,1,0);}
+		}
+		if(Min.z<Max.z)
+		{
+			if(z1<Min.z)	{z=Min.z;	n.Set(0,0,1);}
+			if(z2>Max.z)	{z=Max.z;	n.Set(0,0,1);}
+		}
+		else
+		{
+			if(z1<Max.z)	{z=Max.z;	n.Set(0,0,1);}
+			if(z2>Min.z)	{z=Min.z;	n.Set(0,0,1);}
+		}
 	}
 
 	x1=x;	y1=y;	z1=z;
@@ -494,7 +534,7 @@ bool mglBase::ScalePoint(const mglMatrix *, mglPoint &p, mglPoint &n, bool use_n
 //-----------------------------------------------------------------------------
 void mglScaleAxis(mreal &v1, mreal &v2, mreal &v0, mreal x1, mreal x2)
 {
-	if(x1==x2 || v1==v2)	return;
+	if(!mgl_isrange(x1,x2) || !mgl_isrange(v1,v2))	return;
 	mreal dv,d0;	x2-=1;
 	if(v1*v2>0 && (v2/v1>=100 || v2/v1<=0.01))	// log scale
 	{
@@ -523,11 +563,11 @@ void mglBase::SetOrigin(mreal x0, mreal y0, mreal z0, mreal c0)
 //-----------------------------------------------------------------------------
 void mglBase::SetRanges(mglPoint m1, mglPoint m2)
 {
-	if(m1.x!=m2.x)	{	Min.x=m1.x;	Max.x=m2.x;	}
-	if(m1.y!=m2.y)	{	Min.y=m1.y;	Max.y=m2.y;	}
-	if(m1.z!=m2.z)	{	Min.z=m1.z;	Max.z=m2.z;	}
-	if(m1.c!=m2.c)	{	Min.c=m1.c;	Max.c=m2.c;	}
-	else			{	Min.c=Min.z;Max.c=Max.z;}
+	if(mgl_isrange(m1.x, m2.x))	{	Min.x=m1.x;	Max.x=m2.x;	}
+	if(mgl_isrange(m1.y, m2.y))	{	Min.y=m1.y;	Max.y=m2.y;	}
+	if(mgl_isrange(m1.z, m2.z))	{	Min.z=m1.z;	Max.z=m2.z;	}
+	if(mgl_isrange(m1.c, m2.c))	{	Min.c=m1.c;	Max.c=m2.c;	}
+	else	{	Min.c=Min.z;Max.c=Max.z;}
 
 	if(Org.x<Min.x && mgl_isnum(Org.x))	Org.x = Min.x;
 	if(Org.x>Max.x && mgl_isnum(Org.x))	Org.x = Max.x;
@@ -557,7 +597,7 @@ void mglBase::CRange(HCDT a,bool add, mreal fact)
 }
 void mglBase::CRange(mreal v1,mreal v2,bool add)
 {
-	if(v1==v2 && !add)	return;
+	if(!mgl_isrange(v1,v2) && !add)	return;
 	if(!add)
 	{
 		if(mgl_isnum(v1))	Min.c = v1;
@@ -592,7 +632,7 @@ void mglBase::XRange(HCDT a,bool add,mreal fact)
 }
 void mglBase::XRange(mreal v1,mreal v2,bool add)
 {
-	if(v1==v2 && !add)	return;
+	if(!mgl_isrange(v1,v2) && !add)	return;
 	if(!add)
 	{
 		if(mgl_isnum(v1))	Min.x = v1;
@@ -627,7 +667,7 @@ void mglBase::YRange(HCDT a,bool add,mreal fact)
 }
 void mglBase::YRange(mreal v1,mreal v2,bool add)
 {
-	if(v1==v2 && !add)	return;
+	if(!mgl_isrange(v1,v2) && !add)	return;
 	if(!add)
 	{
 		if(mgl_isnum(v1))	Min.y = v1;
@@ -663,7 +703,7 @@ void mglBase::ZRange(HCDT a,bool add,mreal fact)
 }
 void mglBase::ZRange(mreal v1,mreal v2,bool add)
 {
-	if(v1==v2 && !add)	return;
+	if(!mgl_isrange(v1,v2) && !add)	return;
 	if(!add)
 	{
 		if(mgl_isnum(v1))	Min.z = v1;
@@ -692,10 +732,10 @@ void mglBase::ZRange(mreal v1,mreal v2,bool add)
 //-----------------------------------------------------------------------------
 void mglBase::SetAutoRanges(mreal x1, mreal x2, mreal y1, mreal y2, mreal z1, mreal z2, mreal c1, mreal c2)
 {
-	if(x1!=x2)	{	Min.x = x1;	Max.x = x2;	}
-	if(y1!=y2)	{	Min.y = y1;	Max.y = y2;	}
-	if(z1!=z2)	{	Min.z = z1;	Max.z = z2;	}
-	if(c1!=c2)	{	Min.c = c1;	Max.c = c2;	}
+	if(mgl_isrange(x1,x2))	{	Min.x = x1;	Max.x = x2;	}
+	if(mgl_isrange(y1,y2))	{	Min.y = y1;	Max.y = y2;	}
+	if(mgl_isrange(z1,z2))	{	Min.z = z1;	Max.z = z2;	}
+	if(mgl_isrange(c1,c2))	{	Min.c = c1;	Max.c = c2;	}
 }
 //-----------------------------------------------------------------------------
 void mglBase::Ternary(int t)
diff --git a/src/canvas.cpp b/src/canvas.cpp
index c016c2d..ba7dfd2 100644
--- a/src/canvas.cpp
+++ b/src/canvas.cpp
@@ -223,7 +223,7 @@ int Height;			///< Height of the image
 int Depth;			///< Depth of the image
 int CurFrameId;		///< Number of automaticle created frames
 GifFileType *gif;*/
-	SetDrawReg(1,1,0);		Perspective(0);
+	SetDrawReg(1,1,0);		Perspective(0);	SetPenDelta(1);
 	memcpy(mgl_mask_val, mgl_mask_def, 16*sizeof(uint64_t));	// should be > 16*8
 	ax.Clear();	ay.Clear();	az.Clear();	ac.Clear();
 	mgl_clear_fft();		DefMaskAn=0;	ResetMask();
@@ -497,8 +497,7 @@ pthread_mutex_lock(&mutexPtx);
 			mglColor mc = Txt[long(col1)].GetC(col1);
 			mglPrim a(6);	a.n1 = p;
 			a.n2 = int(255*mc.r) + 256*(int(255*mc.g) + 256*int(255*mc.b));
-			mglText txt(text,font);
-			a.n3 = Ptx.size();	Ptx.push_back(txt);
+			a.n3 = Ptx.size();	Ptx.push_back(mglText(text,font));
 			a.s = size;	a.w = shift;	a.p=ftet;
 			add_prim(a);
 		}
@@ -530,6 +529,7 @@ pthread_mutex_lock(&mutexPtx);
 			pt.x=pt.xx=pp.x;	pt.y=pt.yy=pp.y;
 #pragma omp critical(pnt)
 			{k4=Pnt.size();	MGL_PUSH(Pnt,pt,mutexPnt);}
+			PDef = 0xffff;	// reset to solid line
 			line_plot(k1,k2);	line_plot(k1,k3);
 			line_plot(k4,k2);	line_plot(k4,k3);
 			mreal bl = AddTexture('w');
@@ -831,15 +831,18 @@ std::wstring MGL_EXPORT mgl_ftoa(double v, const char *fmt)
 
 	// clear exp format
 	int st = se[0]=='-'?1:0;
-	if(plus || se[3+st+dig]=='-')	// first remove zeros after 'e'
+	if(strcmp(sf,"nan"))
 	{
-		for(i=(dig>0?4:3)+st+dig;i<le && se[i]=='0';i++);
-		memmove(se+(dig>0?4:3)+st+dig,se+i,le-i+1);
-	}
-	else
-	{
-		for(i=(dig>0?3:2)+st+dig;i<le && (se[i]=='0' || se[i]=='+');i++);
-		memmove(se+(dig>0?3:2)+st+dig,se+i,le-i+1);
+		if(plus || se[3+st+dig]=='-')	// first remove zeros after 'e'
+		{
+			for(i=(dig>0?4:3)+st+dig;i<le && se[i]=='0';i++);
+			memmove(se+(dig>0?4:3)+st+dig,se+i,le-i+1);
+		}
+		else
+		{
+			for(i=(dig>0?3:2)+st+dig;i<le && (se[i]=='0' || se[i]=='+');i++);
+			memmove(se+(dig>0?3:2)+st+dig,se+i,le-i+1);
+		}
 	}
 	le=strlen(se);
 	// don't allow '+' at the end
diff --git a/src/canvas_cf.cpp b/src/canvas_cf.cpp
index 76f8448..f8b3af6 100644
--- a/src/canvas_cf.cpp
+++ b/src/canvas_cf.cpp
@@ -483,3 +483,7 @@ void MGL_EXPORT mgl_rasterize(HMGL gr)
 {	mglCanvas *g = dynamic_cast<mglCanvas *>(gr);	if(g)	g->Rasterize();	}
 void MGL_EXPORT mgl_rasterize_(uintptr_t *gr)	{	_GR_->Rasterize();	}
 //-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_pen_delta(HMGL gr, double d)
+{	mglCanvas *g = dynamic_cast<mglCanvas *>(gr);	if(g)	g->SetPenDelta(d);	}
+void MGL_EXPORT mgl_pen_delta_(uintptr_t *gr, double *d)	{	_GR_->SetPenDelta(*d);	}
+//-----------------------------------------------------------------------------
diff --git a/src/complex.cpp b/src/complex.cpp
index 7967e67..73dabab 100644
--- a/src/complex.cpp
+++ b/src/complex.cpp
@@ -22,6 +22,9 @@
 #include "mgl2/thread.h"
 
 #include "interp.hpp"
+#define mgl2 	mreal(2)
+#define mgl3 	mreal(3)
+#define mgl4 	mreal(4)
 
 //-----------------------------------------------------------------------------
 void MGL_EXPORT mglStartThreadC(void *(*func)(void *), void (*post)(mglThreadC *,dual *), long n,
diff --git a/src/complex_io.cpp b/src/complex_io.cpp
index 5ddb462..a1dee5d 100644
--- a/src/complex_io.cpp
+++ b/src/complex_io.cpp
@@ -236,41 +236,49 @@ void MGL_EXPORT mgl_datac_set_id_(uintptr_t *d, const char *eq,int l)
 {	char *s=new char[l+1];	memcpy(s,eq,l);	s[l]=0;
 	mgl_datac_set_id(_DC_, s);	delete []s;	}
 //-----------------------------------------------------------------------------
-void MGL_NO_EXPORT mgl_cprint(FILE *fp, mreal re, mreal im, char ch)
+std::string MGL_NO_EXPORT mgl_cprint(mreal re, mreal im, char ch)
 {
-	if(im>0)	fprintf(fp,"%g+i%g%c",re,im,ch);
-	else if(im<0)	fprintf(fp,"%g-i%g%c",re,-im,ch);
-	else	fprintf(fp,"%g%c",re,ch);
+	char buf[128];
+	if(im>0)	snprintf(buf,128,"%g+i%g%c",re,im,ch);
+	else if(im<0)	snprintf(buf,128,"%g-i%g%c",re,-im,ch);
+	else	snprintf(buf,128,"%g%c",re,ch);
+	return std::string(buf);
 }
-void MGL_EXPORT mgl_datac_save(HCDT d, const char *fname,long ns)
+std::string MGL_EXPORT mgl_datac_to_string(HCDT d, long ns)
 {
+	std::string out;
 	const mglDataC *dd = dynamic_cast<const mglDataC*>(d);
-	if(!dd)	{	mgl_data_save(d,fname,ns);	return;	}
-	FILE *fp = fopen(fname,"w");
-	if(!fp)	return;
+	if(!dd)	{	return	mgl_data_to_string(d,ns);	}
 	long nx=dd->nx, ny=dd->ny, nz=dd->nz;
 	const std::string loc = setlocale(LC_NUMERIC, NULL);	setlocale(LC_NUMERIC, "C");
 	if(ns<0 || (ns>=nz && nz>1))	for(long k=0;k<nz;k++)
 	{	// save whole data
 		for(long i=0;i<ny;i++)
 		{
-			for(long j=0;j<nx-1;j++)	mgl_cprint(fp, real(dd->a[j+nx*(i+ny*k)]), imag(dd->a[j+nx*(i+ny*k)]),'\t');
-			mgl_cprint(fp, real(dd->a[nx-1+nx*(i+ny*k)]), imag(dd->a[nx-1+nx*(i+ny*k)]),'\n');
+			for(long j=0;j<nx-1;j++)
+				out+=mgl_cprint(real(dd->a[j+nx*(i+ny*k)]), imag(dd->a[j+nx*(i+ny*k)]),'\t');
+			out+=mgl_cprint(real(dd->a[nx-1+nx*(i+ny*k)]), imag(dd->a[nx-1+nx*(i+ny*k)]),'\n');
 		}
-		fprintf(fp,"\n");
+		out += "\n";
 	}
 	else
 	{	// save selected slice
 		if(nz>1)	for(long i=0;i<ny;i++)
 		{
-			for(long j=0;j<nx-1;j++)	mgl_cprint(fp, real(dd->a[j+nx*(i+ny*ns)]), imag(dd->a[j+nx*(i+ny*ns)]),'\t');
-			mgl_cprint(fp, real(dd->a[nx-1+nx*(i+ny*ns)]), imag(dd->a[nx-1+nx*(i+ny*ns)]),'\n');
+			for(long j=0;j<nx-1;j++)
+				out+=mgl_cprint(real(dd->a[j+nx*(i+ny*ns)]), imag(dd->a[j+nx*(i+ny*ns)]),'\t');
+			out+=mgl_cprint(real(dd->a[nx-1+nx*(i+ny*ns)]), imag(dd->a[nx-1+nx*(i+ny*ns)]),'\n');
 		}
 		else if(ns<ny)	for(long j=0;j<nx;j++)
-			mgl_cprint(fp, real(dd->a[j+nx*ns]), imag(dd->a[j+nx*ns]),'\t');
+			out+=mgl_cprint(real(dd->a[j+nx*ns]), imag(dd->a[j+nx*ns]),'\t');
 	}
 	setlocale(LC_NUMERIC, loc.c_str());
-	fclose(fp);
+	return out;
+}
+void MGL_EXPORT mgl_datac_save(HCDT d, const char *fname,long ns)
+{
+	FILE *fp = fopen(fname,"w");
+	if(fp)	{	fprintf(fp,"%s",mgl_datac_to_string(d,ns).c_str());	fclose(fp);	}
 }
 void MGL_EXPORT mgl_datac_save_(uintptr_t *d, const char *fname,int *ns,int l)
 {	char *s=new char[l+1];	memcpy(s,fname,l);	s[l]=0;
@@ -607,7 +615,7 @@ MGL_NO_EXPORT void *mgl_cmodify(void *par)
 void MGL_EXPORT mgl_datac_modify(HADT d, const char *eq,long dim)
 {
 	long nx=d->nx, ny=d->ny, nz=d->nz, par[3]={nx,ny,nz};
-	if(dim<=0)	mgl_datac_modify_vw(d,eq,0,0);	// fastes variant for whole array
+	if(dim<=0)	mgl_datac_modify_vw(d,eq,0,0);	// fastest variant for whole array
 	mglFormulaC f(eq);
 	if(nz>1)	// 3D array
 	{
@@ -779,6 +787,22 @@ HMDT MGL_EXPORT mgl_datac_imag(HCDT d)
 uintptr_t MGL_EXPORT mgl_datac_imag_(uintptr_t *d)
 {	return uintptr_t(mgl_datac_imag(_DC_));	}
 //-----------------------------------------------------------------------------
+HMDT MGL_EXPORT mgl_datac_norm(HCDT d)
+{
+	long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
+	mglData *r=new mglData(nx,ny,nz);
+	const mglDataC *dd = dynamic_cast<const mglDataC*>(d);
+	if(dd)
+#pragma omp parallel for
+		for(long i=0;i<nx*ny*nz;i++)	r->a[i] = norm(dd->a[i]);
+	else
+#pragma omp parallel for
+		for(long i=0;i<nx*ny*nz;i++)	r->a[i] = mgl_ipow(d->vthr(i),2);
+	return r;
+}
+uintptr_t MGL_EXPORT mgl_datac_norm_(uintptr_t *d)
+{	return uintptr_t(mgl_datac_norm(_DC_));	}
+//-----------------------------------------------------------------------------
 HMDT MGL_EXPORT mgl_datac_abs(HCDT d)
 {
 	long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
@@ -871,18 +895,36 @@ int MGL_EXPORT mgl_datac_read_hdf(HADT d,const char *fname,const char *data)
 	if(hd<0)	return false;
 	hs = H5Dget_space(hd);
 	rank = H5Sget_simple_extent_ndims(hs);
-	if(rank>0 && rank<=3)
+	if(rank>0 && rank<=4)
 	{
 		H5Sget_simple_extent_dims(hs,dims,0);
-		if(rank==2)			{	dims[2]=dims[0];	dims[0]=dims[1]=1;	}
-		else if(rank==3)	{	dims[2]=dims[1];	dims[1]=dims[0];	dims[0]=1;	}
-//		else if(rank>3)		continue;
-		mgl_datac_create(d,dims[2],dims[1],dims[0]);
+		if(dims[rank-1]==2)
+		{
+			if(rank==1)			{	dims[2]=dims[0]=dims[1]=1;	}
+			else if(rank==2)	{	dims[2]=dims[0];	dims[0]=dims[1]=1;	}
+			else if(rank==3)	{	dims[2]=dims[1];	dims[1]=dims[0];	dims[0]=1;	}
+			mgl_datac_create(d,dims[2],dims[1],dims[0]);
 #if MGL_USE_DOUBLE
-		H5Dread(hd, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, d->a);
+			H5Dread(hd, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, d->a);
 #else
-		H5Dread(hd, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, d->a);
+			H5Dread(hd, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, d->a);
 #endif
+		}
+		else if(rank<=3)
+		{
+			if(rank==1)			{	dims[2]=dims[0];	dims[0]=dims[1]=1;	}
+			else if(rank==2)	{	dims[2]=dims[1];	dims[1]=dims[0];	dims[0]=1;	}
+			mgl_datac_create(d,dims[2],dims[1],dims[0]);
+			long nn = dims[2]*dims[1]*dims[0];
+			mreal *a = new mreal[nn];
+#if MGL_USE_DOUBLE
+			H5Dread(hd, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, a);
+#else
+			H5Dread(hd, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, a);
+#endif
+			for(long i=0;i<nn;i++)	d->a[i] = a[i];
+			delete []a;
+		}
 	}
 	H5Sclose(hs);	H5Dclose(hd);	H5Fclose(hf);	return true;
 }
diff --git a/src/crust.cpp b/src/crust.cpp
index 5c48f28..954f626 100644
--- a/src/crust.cpp
+++ b/src/crust.cpp
@@ -20,6 +20,7 @@
 #include <float.h>
 #include <math.h>
 #include <list>
+#include <limits>
 #include "mgl2/other.h"
 #include "mgl2/data.h"
 #include "mgl2/thread.h"
@@ -497,30 +498,72 @@ HMDT MGL_EXPORT mgl_triangulation_2d(HCDT x, HCDT y)
 	if(y->GetNN()!=n)	return nums;
 	// use s-hull here
 	std::vector<Shx> pts;
-	std::vector<long> out;
 	Shx pt;
 
-	double mx = 0, my = 0;
-	for(long i=0;i<n;i++)
-	{
-		register double t;
-		t = fabs(x->vthr(i));	if(t>mx)	mx=t;
-		t = fabs(y->vthr(i));	if(t>my)	my=t;
-	}
-	mx *= 1e-15;	my *= 1e-15;
+	// Filter NaNs and Infs and calculate axiswise ranges
+
+	double min_r =  std::numeric_limits<double>::infinity();
+	double max_r = -std::numeric_limits<double>::infinity();
+	double min_c =  std::numeric_limits<double>::infinity();
+	double max_c = -std::numeric_limits<double>::infinity();
+
 	for(long i=0;i<n;i++)
 	{
 		pt.r = x->vthr(i);	pt.c = y->vthr(i);
 		if(mgl_isbad(pt.r) || mgl_isbad(pt.c))	continue;
-		if(fabs(pt.r)<mx)	pt.r=0;
-		if(fabs(pt.c)<my)	pt.c=0;
 		pt.id = i;    pts.push_back(pt);
+
+		min_r = std::min(min_r, pt.r);
+		min_c = std::min(min_c, pt.c);
+		max_r = std::max(max_r, pt.r);
+		max_c = std::max(max_c, pt.c);
 	}
 
 	std::vector<Triad> triads;
-	if(de_duplicate(pts, out))
-		mgl_set_global_warn("There are duplicated points for triangulation.");
-	s_hull_pro(pts, triads);
+
+	static const double float_eps = std::numeric_limits<float>::epsilon();
+	Dupex grid_step(float_eps*std::max((max_r - min_r), std::max(std::abs(max_r), std::abs(min_r))), 
+			float_eps * std::max((max_c - min_c), std::max(std::abs(max_c), std::abs(min_c))));
+
+	const size_t original_size = pts.size();
+
+	if(pts.size() >= 3u && 0. < grid_step.r && 0. < grid_step.c) {
+		std::vector<long> out;
+		de_duplicate(pts, out, grid_step);
+
+		if (pts.size() >= 3u && s_hull_pro(pts, triads) < 0) {
+			// Error occured. It may be caused by degenerated dataset. Well, let's try to increment rounding grid step.
+			// Why 4? Why not. There are no particular reasons for this.
+			grid_step.r *= 4.; 
+			grid_step.c *= 4.;
+
+			out.clear();
+			triads.clear();
+
+			de_duplicate(pts, out, grid_step);
+
+			if (pts.size() >= 3u && s_hull_pro(pts, triads) < 0) {
+				// Last try. Let's assume uniform points distribution and use range / sqrt(pts.size()) * 2 as epsilon. 
+				// It removes a 3/4 of points in optimal case but in the worst case it merges all points to the one.
+				const double density = 1. + floor(0.5 + std::sqrt(static_cast<double>(pts.size())));
+				grid_step.r = (max_r - min_r) / density * 2.;
+				grid_step.c = (max_c - min_c) / density * 2.;
+  				
+				out.clear();
+				de_duplicate(pts, out, grid_step);
+
+				triads.clear();
+				s_hull_pro(pts, triads);
+			}
+		}
+	}
+
+	if (triads.empty()) {
+		mgl_set_global_warn("Cannot triangulate this set!");
+	} else if(original_size > pts.size()) {
+		mgl_set_global_warn("There are duplicated or indistinguishably adjacent points for triangulation.");
+	}
+
 	long m = triads.size();
 	nums=new mglData(3,m);
 	for(long i=0;i<m;i++)
@@ -682,7 +725,7 @@ long MGL_NO_EXPORT mgl_get_next(long k1,long n,long *,long *set,mglPoint *qq)
 	for(i=0;i<n;i++)
 	{
 		if(i==k1 || set[i]>0)	continue;
-		r = mgl_norm(qq[i]-qq[k1]);
+		r = mgl_anorm(qq[i]-qq[k1]);
 		if(r<rm)	{	rm=r;	j=i;	}
 	}
 	return j;
@@ -698,7 +741,7 @@ long MGL_NO_EXPORT mgl_crust(long n,mglPoint *pp,long **nn,mreal ff)
 		for(rm = FLT_MAX,j=0;j<n;j++)
 		{
 			if(i==j)	continue;
-			r = mgl_norm(pp[i]-pp[j]);
+			r = mgl_anorm(pp[i]-pp[j]);
 			if(rm>r)	rm = r;
 		}
 		rs += sqrt(rm);
@@ -712,7 +755,7 @@ long MGL_NO_EXPORT mgl_crust(long n,mglPoint *pp,long **nn,mreal ff)
 		memset(set,0,100*sizeof(long));
 		for(ii=0,j=0;j<n;j++)	// find close vertexes
 		{
-			r = mgl_norm(pp[i]-pp[j]);
+			r = mgl_anorm(pp[i]-pp[j]);
 			if(r<=rs && j!=i)	{	ind[ii] = j;	ii++;	if(ii==99)	break;}
 		}
 		if(ii<3)	continue;	// nothing to do
diff --git a/src/data.cpp b/src/data.cpp
index fca5a20..aca5500 100644
--- a/src/data.cpp
+++ b/src/data.cpp
@@ -1053,36 +1053,13 @@ mreal MGL_EXPORT mgl_data_linear(HCDT d, mreal x,mreal y,mreal z)
 mreal MGL_EXPORT mgl_data_spline(HCDT d, mreal x,mreal y,mreal z)
 {
 	if(mgl_isbad(x) || mgl_isbad(y) || mgl_isbad(z))	return NAN;
-	mreal res = 0;
-	const mglData *dd=dynamic_cast<const mglData *>(d);
-	if(dd)	res = dd->ny*dd->nz==1?mglSpline1st<mreal>(dd->a,dd->nx,x):mglSpline3st<mreal>(dd->a,dd->nx,dd->ny,dd->nz,x,y,z);
-	const mglDataC *dc=dynamic_cast<const mglDataC *>(d);
-	if(dc)	res = abs(dc->ny*dc->nz==1?mglSpline1st<dual>(dc->a,dc->nx,x):mglSpline3st<dual>(dc->a,dc->nx,dc->ny,dc->nz,x,y,z));
-	const mglDataV *dv=dynamic_cast<const mglDataV *>(d);
-	if(dv)	res = dv->value(x,y,z);
-	const mglDataF *df=dynamic_cast<const mglDataF *>(d);
-	if(df)	res = df->value(x,y,z);
-	return res;	// TODO non-mglData: spline mglDataT, mglDataR
+	return d->value(x,y,z);
 }
 //-----------------------------------------------------------------------------
 mreal MGL_EXPORT mgl_data_spline_ext(HCDT d, mreal x,mreal y,mreal z, mreal *dx,mreal *dy,mreal *dz)
 {
 	if(mgl_isbad(x) || mgl_isbad(y) || mgl_isbad(z))	return NAN;
-	mreal res = 0;
-	const mglData *dd=dynamic_cast<const mglData *>(d);
-	if(dd)	res = mglSpline3t<mreal>(dd->a,dd->nx,dd->ny,dd->nz,x,y,z,dx,dy,dz);
-	const mglDataC *dc=dynamic_cast<const mglDataC *>(d);
-	if(dc)
-	{	dual a,ax,ay,az;	mreal res;
-		a = mglSpline3t<dual>(dc->a,dc->nx,dc->ny,dc->nz,x,y,z,&ax,&ay,&az);	res = abs(a);
-		if(dx)	*dx = res?(real(a)*real(ax)+imag(a)*imag(ax))/res:0;
-		if(dy)	*dy = res?(real(a)*real(ay)+imag(a)*imag(ay))/res:0;
-		if(dz)	*dz = res?(real(a)*real(az)+imag(a)*imag(az))/res:0;	}
-	const mglDataV *dv=dynamic_cast<const mglDataV *>(d);
-	if(dv)	res = dv->value(x,y,z,dx,dy,dz);
-	const mglDataF *df=dynamic_cast<const mglDataF *>(d);
-	if(df)	res = df->value(x,y,z,dx,dy,dz);
-	return res;	// TODO non-mglData: spline mglDataT, mglDataR
+	return d->valueD(x,y,z,dx,dy,dz);
 }
 //-----------------------------------------------------------------------------
 mreal MGL_EXPORT mgl_data_spline_(uintptr_t *d, mreal *x,mreal *y,mreal *z)
diff --git a/src/data_ex.cpp b/src/data_ex.cpp
index 031c0b1..2a6a92c 100644
--- a/src/data_ex.cpp
+++ b/src/data_ex.cpp
@@ -826,3 +826,164 @@ mreal MGL_EXPORT mgl_find_root_txt_(const char *func, mreal *ini, const char *va
 	mreal r = mgl_find_root_txt(s,*ini,*var);
 	delete []s;	return r;	}
 //-----------------------------------------------------------------------------
+MGL_NO_EXPORT void *mgl_pulse_z(void *par)
+{
+	mglThreadD *t=(mglThreadD *)par;
+	long nz=t->p[2], nn=t->n;
+	mreal *b=t->a;
+	const mreal *a=t->b;
+#if !MGL_HAVE_PTHREAD
+#pragma omp parallel for
+#endif
+	for(long i=t->id;i<nn;i+=mglNumThr)
+	{
+		long j0=0;	mreal m=a[i];
+		for(long j=1;j<nz;j++)	// get maximum
+		{	register long i0=i+nn*j;
+			if(m<a[i0])	{	m=a[i0];	j0=j;	}
+		}
+		if(j0>0 && j0<nz-1)
+		{
+			register long i0=i+nn*j0;
+			mreal A = (a[i0-nn]-2*a[i0]+a[i0+nn])/2;
+			mreal B = (a[i0+nn]-a[i0-nn])/2;
+			mreal C = a[i0] - B*B/(4*A);
+			b[i]=C;	b[i+nn]=j0-B/(2*A);	b[i+2*nn]=sqrt(fabs(C/A));	C /= 2;
+			mreal j1=NAN,j2=NAN;
+			for(long j=j0;j<nz-1;j++)
+			{	register long i0 = i+nn*j;
+				if((a[i0]-C)*(a[i0+nn]-C)<0)	j2 = j + (a[i0]-C)/(a[i0]-a[i0+nn]);
+			}
+			for(long j=j0;j>0;j--)
+			{	register long i0=i+nn*j;
+				if((a[i0]-C)*(a[i0-nn]-C)<0)	j1 = j - (a[i0]-C)/(a[i0]-a[i0-nn]);
+			}
+			b[i+3*nn]=j2-j1;	b[i+4*nn]=0;
+			if(j2>j1)	for(long j = j1;j<=j2;j++)	b[i+4*nn] += a[i+nn*j];
+		}
+		else	// maximum at the edges
+		{	b[i]=m;	b[i+nn]=j0;	b[i+2*nn]=b[i+3*nn]=b[i+4*nn]=NAN;	}
+	}
+	return 0;
+}
+MGL_NO_EXPORT void *mgl_pulse_y(void *par)
+{
+	mglThreadD *t=(mglThreadD *)par;
+	long nx=t->p[0], ny=t->p[1], nn=t->n;
+	mreal *b=t->a;
+	const mreal *a=t->b;
+#if !MGL_HAVE_PTHREAD
+#pragma omp parallel for
+#endif
+	for(long i=t->id;i<nn;i+=mglNumThr)
+	{
+		long k = (i%nx)+nx*ny*(i/nx), j0=0;	mreal m=a[k];
+		long ki = (i%nx)+5*nx*(i/nx);
+		for(long j=1;j<ny;j++)	// get maximum
+		{	register long i0=k+nx*j;
+			if(m<a[i0])	{	m=a[i0];	j0=j;	}
+		}
+		if(j0>0 && j0<ny-1)
+		{
+			register long i0=k+nx*j0;
+			mreal A = (a[i0-nx]-2*a[i0]+a[i0+nx])/2;
+			mreal B = (a[i0+nx]-a[i0-nx])/2;
+			mreal C = a[i0] - B*B/(4*A);
+			b[ki]=C;	b[ki+nx]=j0-B/(2*A);	b[ki+2*nx]=sqrt(fabs(C/A));	C /= 2;
+			mreal j1=NAN,j2=NAN;
+			for(long j=j0;j<ny-1;j++)
+			{	register long i0 = k+nx*j;
+				if((a[i0]-C)*(a[i0+nx]-C)<0)	j2 = j + (a[i0]-C)/(a[i0]-a[i0+nx]);
+			}
+			for(long j=j0;j>0;j--)
+			{	register long i0=k+nx*j;
+				if((a[i0]-C)*(a[i0-nx]-C)<0)	j1 = j - (a[i0]-C)/(a[i0]-a[i0-nx]);
+			}
+			b[ki+3*nx]=j2-j1;	b[ki+4*nx]=0;
+			if(j2>j1)	for(long j = j1;j<=j2;j++)	b[ki+4*nx] += a[k+nx*j];
+		}
+		else	// maximum at the edges
+		{	b[ki]=m;	b[ki+nx]=j0;	b[ki+2*nx]=b[ki+3*nx]=b[ki+4*nx]=NAN;	}
+	}
+	return 0;
+}
+MGL_NO_EXPORT void *mgl_pulse_x(void *par)
+{
+	mglThreadD *t=(mglThreadD *)par;
+	long nx=t->p[0], nn=t->n;
+	mreal *b=t->a;
+	const mreal *a=t->b;
+#if !MGL_HAVE_PTHREAD
+#pragma omp parallel for
+#endif
+	for(long i=t->id;i<nn;i+=mglNumThr)
+	{
+		long k = i*nx, j0=0;	mreal m=a[k];
+		for(long j=1;j<nx;j++)	// get maximum
+		{	register long i0=j+k;
+			if(m<a[i0])	{	m=a[i0];	j0=j;	}
+		}
+		if(j0>0 && j0<nx-1)
+		{
+			register long i0=j0+k;
+			mreal A = (a[i0-1]-2*a[i0]+a[i0+1])/2;
+			mreal B = (a[i0+1]-a[i0-1])/2;
+			mreal C = a[i0] - B*B/(4*A);
+			b[5*i]=C;	b[5*i+1]=j0-B/(2*A);	b[5*i+2]=sqrt(fabs(C/A));	C /= 2;
+			mreal j1=NAN,j2=NAN;
+			for(long j=j0;j<nx-1;j++)
+			{	register long i0 = j+k;
+				if((a[i0]-C)*(a[i0+1]-C)<0)	j2 = j + (a[i0]-C)/(a[i0]-a[i0+1]);
+			}
+			for(long j=j0;j>0;j--)
+			{	register long i0=j+k;
+				if((a[i0]-C)*(a[i0-1]-C)<0)	j1 = j - (a[i0]-C)/(a[i0]-a[i0-1]);
+			}
+			b[5*i+3]=j2-j1;	b[5*i+4]=0;
+			if(j2>j1)	for(long j = j1;j<=j2;j++)	b[5*i+4] += a[j+k];
+		}
+		else	// maximum at the edges
+		{	b[5*i]=m;	b[5*i+1]=j0;	b[5*i+2]=b[5*i+3]=b[5*i+4]=NAN;	}
+	}
+	return 0;
+}
+HMDT MGL_EXPORT mgl_data_pulse(HCDT dat, char dir)
+{
+//	if(!dir || *dir==0)	return 0;
+	long nx=dat->GetNx(),ny=dat->GetNy(),nz=dat->GetNz();
+	long p[3]={nx,ny,nz};
+	mreal *c = new mreal[nx*ny*nz], *b=0;
+
+	const mglData *d=dynamic_cast<const mglData *>(dat);
+	if(d)	memcpy(c,d->a,nx*ny*nz*sizeof(mreal));
+	else
+#pragma omp parallel for
+		for(long i=0;i<nx*ny*nz;i++)	c[i]=dat->vthr(i);
+
+	if(dir=='z' && nz>1)
+	{
+		b = new mreal[nx*ny*5];
+		mglStartThread(mgl_pulse_z,0,nx*ny,b,c,0,p);	p[2] = 5;
+	}
+	else if(dir=='y' && ny>1)
+	{
+		b = new mreal[5*nx*nz];
+		mglStartThread(mgl_pulse_y,0,nx*p[2],b,c,0,p);	p[1] = 5;
+	}
+	else if(dir=='x' && nx>1)
+	{
+		b = new mreal[5*ny*nz];
+		mglStartThread(mgl_pulse_x,0,p[1]*p[2],b,c,0,p);	p[0] = 5;
+	}
+	mglData *r=0;
+	if(b)
+	{
+		r=new mglData(p[0],p[1],p[2]);
+		memcpy(r->a,b,p[0]*p[1]*p[2]*sizeof(mreal));
+		delete []b;
+	}
+	delete []c;	return r;
+}
+uintptr_t MGL_EXPORT mgl_data_pulse_(uintptr_t *d, const char *dir,int l)
+{	return uintptr_t(mgl_data_pulse(_DT_,dir[0]));	}
+//-----------------------------------------------------------------------------
diff --git a/src/data_io.cpp b/src/data_io.cpp
index 5761256..6929912 100644
--- a/src/data_io.cpp
+++ b/src/data_io.cpp
@@ -286,37 +286,45 @@ void MGL_EXPORT mgl_data_set_name_(uintptr_t *d, const char *name,int l)
 void MGL_EXPORT mgl_data_set_func(mglDataA *dat, void (*func)(void *), void *par)
 {	dat->func = func;	dat->o = par;	}
 //-----------------------------------------------------------------------------
-void MGL_EXPORT mgl_data_save(HCDT d, const char *fname,long ns)
+std::string MGL_EXPORT mgl_data_to_string(HCDT d, long ns)
 {
-	FILE *fp = fopen(fname,"w");
-	if(!fp)	return;
 	long nx=d->GetNx(), ny=d->GetNy(), nz=d->GetNz();
 	const std::string loc = setlocale(LC_NUMERIC, NULL);	setlocale(LC_NUMERIC, "C");
+	std::string out;	char buf[512];
 	if(ns<0 || (ns>=nz && nz>1))	for(long k=0;k<nz;k++)
 	{	// save whole data
 		const mglData *dr = dynamic_cast<const mglData *>(d);
-		if(dr && !dr->id.empty())	fprintf(fp,"## %s\n",dr->id.c_str());
+		if(dr && !dr->id.empty())
+		{	snprintf(buf,512,"## %s\n",dr->id.c_str());	out += buf;	}
 		const mglDataC *dc = dynamic_cast<const mglDataC *>(d);
-		if(dc && !dc->id.empty())	fprintf(fp,"## %s\n",dc->id.c_str());
+		if(dc && !dc->id.empty())
+		{	snprintf(buf,512,"## %s\n",dc->id.c_str());	out += buf;	}
 		for(long i=0;i<ny;i++)
 		{
-			for(long j=0;j<nx-1;j++)	fprintf(fp,"%g\t",d->v(j,i,k));
-			fprintf(fp,"%g\n",d->v(nx-1,i,k));
+			for(long j=0;j<nx-1;j++)	
+			{	snprintf(buf,512,"%g\t",d->v(j,i,k));	out += buf;	}
+			snprintf(buf,512,"%g\n",d->v(nx-1,i,k));	out += buf;
 		}
-		fprintf(fp,"\n");
+		out += "\n";
 	}
 	else
 	{	// save selected slice
 		if(nz>1)	for(long i=0;i<ny;i++)
 		{
-			for(long j=0;j<nx-1;j++)	fprintf(fp,"%g\t",d->v(j,i,ns));
-			fprintf(fp,"%g\n",d->v(nx-1,i,ns));
+			for(long j=0;j<nx-1;j++)
+			{	snprintf(buf,512,"%g\t",d->v(j,i,ns));	out += buf;	}
+			snprintf(buf,512,"%g\n",d->v(nx-1,i,ns));	out += buf;
 		}
 		else if(ns<ny)	for(long j=0;j<nx;j++)
-			fprintf(fp,"%g\t",d->v(j,ns));
+		{	snprintf(buf,512,"%g\t",d->v(j,ns));	out += buf;	}
 	}
 	setlocale(LC_NUMERIC, loc.c_str());
-	fclose(fp);
+	return out;
+}
+void MGL_EXPORT mgl_data_save(HCDT d, const char *fname,long ns)
+{
+	FILE *fp = fopen(fname,"w");
+	if(fp)	{	fprintf(fp,"%s",mgl_data_to_string(d,ns).c_str());	fclose(fp);	}
 }
 void MGL_EXPORT mgl_data_save_(uintptr_t *d, const char *fname,int *ns,int l)
 {	char *s=new char[l+1];	memcpy(s,fname,l);	s[l]=0;
diff --git a/src/evalc.cpp b/src/evalc.cpp
index 1eca3d9..6be9232 100644
--- a/src/evalc.cpp
+++ b/src/evalc.cpp
@@ -30,6 +30,9 @@ EQ_NUM=0,	// a variable substitution
 EQ_RND,		// random number
 EQ_A,		// numeric constant
 // normal functions of 2 arguments
+EQ_LT,		// comparison x<y			!!! MUST BE FIRST 2-PLACE FUNCTION
+EQ_GT,		// comparison x>y
+EQ_EQ,		// comparison x=y
 EQ_ADD,		// addition x+y
 EQ_SUB,		// substraction x-y
 EQ_MUL,		// multiplication x*y
@@ -91,6 +94,17 @@ mglFormulaC::mglFormulaC(const char *string)
 		len-=2;	str[len]=0;
 	}
 	len=strlen(str);
+	n=mglFindInText(str,"<>=");				// low priority -- conditions
+	if(n>=0)
+	{
+		if(str[n]=='<') Kod=EQ_LT;
+		else if(str[n]=='>') Kod=EQ_GT;
+		else Kod=EQ_EQ;
+		str[n]=0;
+		Left=new mglFormulaC(str);
+		Right=new mglFormulaC(str+n+1);
+		delete []str;	return;
+	}
 	n=mglFindInText(str,"+-");				// normal priority -- additions
 	if(n>=0 && (n<2 || str[n-1]!='e' || (str[n-2]!='.' && !isdigit(str[n-2]))))
 	{
@@ -208,6 +222,9 @@ dual mglFormulaC::Calc(const dual var[MGL_VS]) const
 	return CalcIn(var);
 }
 //-----------------------------------------------------------------------------
+dual MGL_LOCAL_CONST ceqc(dual a,dual b)	{return a==b?1:0;}
+dual MGL_LOCAL_CONST cltc(dual a,dual b)	{return real(a-b)<0?1:0;}
+dual MGL_LOCAL_CONST cgtc(dual a,dual b)	{return real(a-b)>0?1:0;}
 dual MGL_LOCAL_CONST addc(dual a,dual b)	{return a+b;}
 dual MGL_LOCAL_CONST subc(dual a,dual b)	{return a-b;}
 dual MGL_LOCAL_CONST mulc(dual a,dual b)	{return a*b;}
@@ -241,12 +258,12 @@ dual MGL_LOCAL_CONST lgc(dual x)	{	return log10(x);}
 //-----------------------------------------------------------------------------
 typedef dual (*func_1)(dual);
 typedef dual (*func_2)(dual, dual);
+static const func_2 f2[EQ_SIN-EQ_LT] = {cltc,cgtc,ceqc,addc,subc,mulc,divc,ipwc,powc,llgc};
+static const func_1 f1[EQ_LAST-EQ_SIN] = {sinc,cosc,tanc,asinc,acosc,atanc,sinhc,coshc,tanhc,
+					asinhc,acoshc,atanhc,sqrtc,expc,expi,logc,lgc,absc,argc,conjc};
 // evaluation of embedded (included) expressions
 dual mglFormulaC::CalcIn(const dual *a1) const
 {
-	func_2 f2[EQ_SIN-EQ_ADD] = {addc,subc,mulc,divc,ipwc,powc,llgc};
-	func_1 f1[EQ_LAST-EQ_SIN] = {sinc,cosc,tanc,asinc,acosc,atanc,sinhc,coshc,tanhc,
-					asinhc,acoshc,atanhc,sqrtc,expc,expi,logc,lgc,absc,argc,conjc};
 //	if(Error)	return 0;
 	if(Kod==EQ_A)	return a1[(int)Res.real()];
 	if(Kod==EQ_RND)	return mgl_rnd();
@@ -258,7 +275,7 @@ dual mglFormulaC::CalcIn(const dual *a1) const
 		if(Kod<EQ_SIN)
 		{
 			dual b = Right->CalcIn(a1);
-			b = mgl_isfin(b)?f2[Kod-EQ_ADD](a,b):NAN;
+			b = mgl_isfin(b)?f2[Kod-EQ_LT](a,b):NAN;
 			return mgl_isfin(b)?b:NAN;
 		}
 		else
diff --git a/src/evalp.cpp b/src/evalp.cpp
index af4d016..0499fa0 100644
--- a/src/evalp.cpp
+++ b/src/evalp.cpp
@@ -714,9 +714,9 @@ HMDT MGL_NO_EXPORT mglFormulaCalc(std::wstring str, mglParser *arg, const std::v
 	HMDT res = new mglData;	res->a[0]=NAN;	return res;
 }
 //-----------------------------------------------------------------------------
-dual MGL_LOCAL_CONST ceqc(dual a,dual b)	{return a==b?1:0;}
-dual MGL_LOCAL_CONST cltc(dual a,dual b)	{return real(a-b)<0?1:0;}
-dual MGL_LOCAL_CONST cgtc(dual a,dual b)	{return real(a-b)>0?1:0;}
+dual MGL_LOCAL_CONST ceqc(dual a,dual b);	//{return a==b?1:0;}
+dual MGL_LOCAL_CONST cltc(dual a,dual b);	//{return real(a-b)<0?1:0;}
+dual MGL_LOCAL_CONST cgtc(dual a,dual b);	//{return real(a-b)>0?1:0;}
 dual MGL_LOCAL_CONST ipwc(dual a,dual b);	//{return mgl_ipowc(a,int(b.real()));}
 dual MGL_LOCAL_CONST powc(dual a,dual b);	//{return exp(b*log(a));	}
 dual MGL_LOCAL_CONST llgc(dual a,dual b);	//{return log(a)/log(b);	}
diff --git a/src/exec.cpp b/src/exec.cpp
index 98e8b0a..6213155 100644
--- a/src/exec.cpp
+++ b/src/exec.cpp
@@ -66,6 +66,13 @@ int MGL_NO_EXPORT mgls_alpha(mglGraph *gr, long , mglArg *a, const char *k, cons
 	else res = 1;	return res;
 }
 //-----------------------------------------------------------------------------
+int MGL_NO_EXPORT mgls_pendelta(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+{
+	int res=0;
+	if(!strcmp(k,"n"))	gr->SetPenDelta(a[0].v);
+	else res = 1;	return res;
+}
+//-----------------------------------------------------------------------------
 int MGL_NO_EXPORT mgls_plotid(mglGraph *gr, long , mglArg *a, const char *k, const char *)
 {
 	int res=0;
@@ -426,7 +433,7 @@ int MGL_NO_EXPORT mgls_copy(mglGraph *gr, long , mglArg *a, const char *k, const
 		mglData *D = dynamic_cast<mglData *>(a[1].d);
 		mglDataC *C = dynamic_cast<mglDataC *>(a[2].d);
 		if(D && C)	{	d->Set(C->Real());	D->Set(C->Imag());	}
-		else	res = 1;		
+		else	res = 1;
 	}
 	else if(!strcmp(k,"dn"))	*d = a[1].v;
 	else res = 1;	return res;
@@ -1096,6 +1103,26 @@ int MGL_NO_EXPORT mgls_line(mglGraph *gr, long , mglArg *a, const char *k, const
 	else res = 1;	gr->Self()->LoadState();	return res;
 }
 //-----------------------------------------------------------------------------
+int MGL_NO_EXPORT mgls_lamerey(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+{
+	int res=0;
+	if(!strcmp(k,"nd"))	gr->Lamerey(a[0].v,*(a[1].d),"",opt);
+	else if(!strcmp(k,"nds"))	gr->Lamerey(a[0].v,*(a[1].d),a[2].s.c_str(),opt);
+	else if(!strcmp(k,"ns"))	gr->Lamerey(a[0].v,a[1].s.c_str(),"",opt);
+	else if(!strcmp(k,"nss"))	gr->Lamerey(a[0].v,a[1].s.c_str(),a[2].s.c_str(),opt);
+	else res = 1;	return res;
+}
+//-----------------------------------------------------------------------------
+int MGL_NO_EXPORT mgls_bifurcation(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+{
+	int res=0;
+	if(!strcmp(k,"nd"))	gr->Bifurcation(a[0].v,*(a[1].d),"",opt);
+	else if(!strcmp(k,"nds"))	gr->Bifurcation(a[0].v,*(a[1].d),a[2].s.c_str(),opt);
+	else if(!strcmp(k,"ns"))	gr->Bifurcation(a[0].v,a[1].s.c_str(),"",opt);
+	else if(!strcmp(k,"nss"))	gr->Bifurcation(a[0].v,a[1].s.c_str(),a[2].s.c_str(),opt);
+	else res = 1;	return res;
+}
+//-----------------------------------------------------------------------------
 int MGL_NO_EXPORT mgls_errbox(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
 {
 	int res=0;	gr->Self()->SaveState(opt);
@@ -1222,6 +1249,18 @@ int MGL_NO_EXPORT mgls_mark(mglGraph *gr, long , mglArg *a, const char *k, const
 	else res = 1;	return res;
 }
 //-----------------------------------------------------------------------------
+int MGL_NO_EXPORT mgls_pmap(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+{
+	int res=0;
+	if(!strcmp(k,"dd"))	gr->Pmap(*(a[0].d), *(a[1].d), "",opt);
+	else if(!strcmp(k,"dds"))	gr->Pmap(*(a[0].d), *(a[1].d), a[2].s.c_str(),opt);
+	else if(!strcmp(k,"ddd")) 	gr->Pmap(*(a[0].d), *(a[1].d), *(a[2].d), "",opt);
+	else if(!strcmp(k,"ddds"))	gr->Pmap(*(a[0].d), *(a[1].d), *(a[2].d), a[3].s.c_str(),opt);
+	else if(!strcmp(k,"dddd")) 	gr->Pmap(*(a[0].d),*(a[1].d),*(a[2].d),*(a[3].d), "",opt);
+	else if(!strcmp(k,"dddds"))	gr->Pmap(*(a[0].d),*(a[1].d),*(a[2].d),*(a[3].d), a[4].s.c_str(),opt);
+	else res = 1;	return res;
+}
+//-----------------------------------------------------------------------------
 int MGL_NO_EXPORT mgls_map(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
 {
 	int res=0;
@@ -1325,6 +1364,7 @@ int MGL_NO_EXPORT mgls_savehdf(mglGraph *, long , mglArg *a, const char *k, cons
 {
 	int res=0;
 	if(!strcmp(k,"dss"))	a[0].d->SaveHDF(a[1].s.c_str(), a[2].s.c_str());
+	else if(!strcmp(k,"dssn"))	a[0].d->SaveHDF(a[1].s.c_str(), a[2].s.c_str(),mgl_int(a[3].v));
 	else res = 1;	return res;
 }
 //-----------------------------------------------------------------------------
@@ -1431,6 +1471,24 @@ int MGL_NO_EXPORT mgls_save(mglGraph *, long , mglArg *a, const char *k, const c
 {
 	int res=0;
 	if(!strcmp(k,"ds"))	a[0].d->Save(a[1].s.c_str());
+	else if(!strcmp(k,"ss"))
+	{
+		FILE *fp = fopen(a[1].s.c_str(),"a");
+		size_t pos;	std::string s=a[0].s;
+		while((pos=s.find("\\n"))!=std::string::npos)
+		{	s[pos]=' ';	s[pos+1]='\n';	}
+		while((pos=s.find("\b\b"))!=std::string::npos)	s.erase(pos,2);
+		fprintf(fp,"%s\n",s.c_str());	fclose(fp);
+	}
+	else if(!strcmp(k,"sss"))
+	{
+		FILE *fp = fopen(a[1].s.c_str(),a[2].s.c_str());
+		size_t pos;	std::string s=a[0].s;
+		while((pos=s.find("\\n"))!=std::string::npos)
+		{	s[pos]=' ';	s[pos+1]='\n';	}
+		while((pos=s.find("\b\b"))!=std::string::npos)	s.erase(pos,2);
+		fprintf(fp,"%s\n",s.c_str());	fclose(fp);
+	}
 	else res = 1;	return res;
 }
 //-----------------------------------------------------------------------------
@@ -2267,6 +2325,22 @@ int MGL_NO_EXPORT mgls_info(mglGraph *gr, long , mglArg *a, const char *k, const
 	else res = 1;	return res;
 }
 //-----------------------------------------------------------------------------
+int MGL_NO_EXPORT mgls_print(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+{
+	int res=0;
+	if(!strcmp(k,"d"))	printf("%s\n",a[0].d->PrintInfo());
+	else if(!strcmp(k,"s"))	printf("%s\n",a[0].s.c_str());
+	else if(!strcmp(k,"n"))	printf("value = %g\n",a[0].v);
+	else res = 1;	fflush(stdout);	return res;
+}
+//-----------------------------------------------------------------------------
+int MGL_NO_EXPORT mgls_echo(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+{
+	int res=0;
+	if(!strcmp(k,"d"))	gr->SetWarn(-1,a[0].d->Get().c_str());
+	else res = 1;	return res;
+}
+//-----------------------------------------------------------------------------
 int MGL_NO_EXPORT mgls_integrate(mglGraph *, long , mglArg *a, const char *k, const char *)
 {
 	int res=0;
@@ -2529,6 +2603,15 @@ int MGL_NO_EXPORT mgls_momentum(mglGraph *, long , mglArg *a, const char *k, con
 	else res = 1;	return res;
 }
 //-----------------------------------------------------------------------------
+int MGL_NO_EXPORT mgls_pulse(mglGraph *, long , mglArg *a, const char *k, const char *)
+{
+	int res=0;
+	if(k[0]=='d' && a[0].d->temp)	return 5;
+	mglData *d = dynamic_cast<mglData *>(a[0].d);
+	if(d && !strcmp(k,"dds"))	*d = mglData(true,mgl_data_pulse(a[1].d,a[2].s[0]));
+	else res = 1;	return res;
+}
+//-----------------------------------------------------------------------------
 int MGL_NO_EXPORT mgls_fit(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
 {
 	int res=0;
@@ -2666,10 +2749,10 @@ int MGL_NO_EXPORT mgls_fsurf(mglGraph *gr, long , mglArg *a, const char *k, cons
 	else res = 1;	return res;
 }
 //-----------------------------------------------------------------------------
-int MGL_NO_EXPORT mgls_fgets(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)		// NOTE don't use options -- Puts can be part of group
+int MGL_NO_EXPORT mgls_fgets(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
 {
 	int res=0;	gr->Self()->SaveState(opt);
-	char buf[1024];
+	char buf[4096];
 	FILE *fp;
 	if(!strncmp(k,"nns",3))
 	{
@@ -2680,9 +2763,9 @@ int MGL_NO_EXPORT mgls_fgets(mglGraph *gr, long , mglArg *a, const char *k, cons
 			gr->SetWarn(mglWarnOpen,a[2].s.c_str());
 			return res;
 }
-		for(i=0;i<n;i++)	if(!fgets(buf,1024,fp))	continue;
-		memset(buf,0,1024);
-		if(!fgets(buf,1024,fp))
+		for(i=0;i<n;i++)	if(!fgets(buf,4096,fp))	continue;
+		memset(buf,0,4096);
+		if(!fgets(buf,4096,fp))
 		{
 			char b[32];	snprintf(b,32,"%d",n);	b[31]=0;
 			gr->SetWarn(mglWarnOpen,(a[2].s+" - line "+b).c_str());
@@ -2700,9 +2783,9 @@ int MGL_NO_EXPORT mgls_fgets(mglGraph *gr, long , mglArg *a, const char *k, cons
 			gr->SetWarn(mglWarnOpen,a[3].s.c_str());
 			return res;
 		}
-		for(i=0;i<n;i++)	if(!fgets(buf,1024,fp))	continue;
-		memset(buf,0,1024);
-		if(!fgets(buf,1024,fp))
+		for(i=0;i<n;i++)	if(!fgets(buf,4096,fp))	continue;
+		memset(buf,0,4096);
+		if(!fgets(buf,4096,fp))
 		{
 			char b[32];	snprintf(b,32,"%d",n);	b[31]=0;
 			gr->SetWarn(mglWarnOpen,(a[3].s+" - line "+b).c_str());
@@ -2714,6 +2797,59 @@ int MGL_NO_EXPORT mgls_fgets(mglGraph *gr, long , mglArg *a, const char *k, cons
 	else res = 1;	gr->Self()->LoadState();	return res;
 }
 //-----------------------------------------------------------------------------
+int MGL_NO_EXPORT mgls_fscanf(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+{
+	int res=0;
+	if(!strcmp(k,"dss"))
+	{
+		mglData *d = dynamic_cast<mglData *>(a[0].d);
+		if(!d)	return 1;
+		// first scan for all "%g"
+		char *buf=new char[a[2].s.length()],*s=buf;
+		strcpy(buf,a[2].s.c_str());
+		std::vector<std::string> strs;
+		for(size_t i=0;buf[i];i++)
+		{
+			if(buf[i]=='%' && buf[i+1]=='%')	i++;
+			else if(buf[i]=='%' && buf[i+1]=='g')
+			{	buf[i]=0;	strs.push_back(s);	s = buf+i+2;	}
+		}
+		delete []buf;
+		if(strs.size()<1)	return 0;
+		// read proper lines from file
+		std::vector<std::string> bufs;
+		FILE *fp=fopen(a[1].s.c_str(),"r");
+		if(!fp)
+		{
+			gr->SetWarn(mglWarnOpen,a[3].s.c_str());
+			return res;
+		}
+		while(!feof(fp))
+		{
+			s = mgl_fgetstr(fp);
+			if(!strncmp(s,strs[0].c_str(),strs[0].length()))
+				bufs.push_back(s);
+		}
+		fclose(fp);
+		// parse lines and collect data
+		const size_t nx=strs.size(), ny=bufs.size();
+		if(ny<1)	return 0;
+		d->Create(nx,ny);
+		for(size_t j=0;j<ny;j++)
+		{
+			const char *c = bufs[j].c_str();
+			for(size_t i=0;i<nx;i++)
+			{
+				const char *p = strstr(c,strs[i].c_str());
+				if(!p)	break;
+				p += strs[i].length();	c=p;
+				d->a[i+nx*j] = atof(p);
+			}
+		}
+	}
+	else res = 1;	return res;
+}
+//-----------------------------------------------------------------------------
 int MGL_NO_EXPORT mgls_import(mglGraph *, long , mglArg *a, const char *k, const char *)
 {
 	int res=0;
@@ -3266,6 +3402,7 @@ mglCommand mgls_base_cmd[] = {
 	{"barwidth","Set default bars width","barwidth val", mgls_barwidth ,2},
 	{"beam","Draw quasioptical beam","beam Tr G1 G2 Adat r ['sch' flag num] ", mgls_beam ,9},
 	{"belt","Draw belts","belt Zdat ['fmt']|Xdat Ydat Zdat ['fmt']", mgls_belt ,8},
+	{"bifurcation","Draw Bifurcation diagram","bifurcation dx Func ['fmt']|dx 'func' ['fmt']", mgls_bifurcation,13},
 	{"box","Draw bounding box","box ['fmt' ticks]", mgls_box ,12},
 	{"boxplot","Draw boxplot for 2D data","boxplot Ydat ['fmt']|Xdat Ydat ['fmt']", mgls_boxplot ,7},
 	{"boxs","Draw boxes","boxs Zdat ['fmt']|Xdat Ydat Zdat ['fmt']", mgls_boxs ,8},
@@ -3328,6 +3465,7 @@ mglCommand mgls_base_cmd[] = {
 	{"dots","Draw dots for arbitrary data points","dots Xdat Ydat Zdat ['fmt']|Xdat Ydat Zdat Adat ['fmt']|Xdat Ydat Zdat Cdat Adat ['fmt']", mgls_dots ,9},
 	{"drawreg","Set draw region for quality&4","drawreg|nx ny m", mgls_drawreg ,2},
 	{"drop","Draw drop","drop x0 y0 dx dy r ['col' sh asp]|x0 y0 z0 dx dy dz r ['col' sh asp]", mgls_drop ,13},
+	{"echo","Print content of the data","echo Dat", mgls_echo ,3},
 	{"ellipse","Draw ellipse","ellipse x1 y1 x2 y2 r ['fmt']|x1 y1 z1 x2 y2 z2 r ['fmt']", mgls_ellipse ,13},
 	{"else","Execute if condition is false","else", 0, 6},
 	{"elseif","Conditional operator","elseif val|Dat ['cond']", 0, 6},
@@ -3355,8 +3493,9 @@ mglCommand mgls_base_cmd[] = {
 	{"font","Setup font","font 'fmt' [size]", mgls_font ,15},
 	{"for","For cycle","for $N v1 v2 [dv] | $N Dat", 0, 6},
 	{"fourier","In-place Fourier transform","fourier ReDat ImDat 'dir'|Cmplx 'dir'", mgls_fourier , 16},
-	{"fplot","Plot curve by formula","fplot 'y_x' ['fmt']|'x_t' 'y_t' 'z_t' ['fmt']", mgls_fplot ,1},
-	{"fsurf","Plot surface by formula","fsurf 'z_xy' ['fmt']|'x_uv' 'y_uv' 'z_uv' ['fmt']", mgls_fsurf ,1},
+	{"fplot","Plot curve by formula","fplot 'y(x)' ['fmt']|'x(t)' 'y(t)' 'z(t)' ['fmt']", mgls_fplot ,1},
+	{"fscanf","Get fromated data from file","fscanf Dat 'fname 'templ'", mgls_fscanf ,4},
+	{"fsurf","Plot surface by formula","fsurf 'z(x,y)' ['fmt']|'x(u,v)' 'y(u,v)' 'z(u,v)' ['fmt']", mgls_fsurf ,1},
 	{"func","Start function definition and stop execution of main script","func 'name' [narg]", 0, 6},
 	{"grad","Draw gradient lines for scalar field","grad Phi ['fmt' num]|Xdat Ydat Phi ['fmt' num]|Xdat Ydat Zdat Phi ['fmt' num]", mgls_grad ,8},
 	{"grid","Draw grid","grid ['dir' 'fmt']", mgls_grid ,12},
@@ -3369,13 +3508,14 @@ mglCommand mgls_base_cmd[] = {
 	{"idset","Set column id for data","idset Dat 'ids'", mgls_idset ,3},
 	{"if","Conditional operator","if val|Dat ['cond']", 0, 6},
 	{"import","Import data from PNG picture","import Dat 'fname' 'scheme' [v1 v2]", mgls_import ,4},
-	{"info","Print information about data","info Dat [detail]|'message'", mgls_info ,3},
+	{"info","Print message or information about the data","info Dat [detail]|'message'|const", mgls_info ,3},
 	{"inplot","Set position of plot in picture","x1 x2 y1 y2 [rel]", mgls_inplot ,5},
 	{"insert","Insert slice of data","insert Dat 'dir' [pos=0 num=1]", mgls_insert ,3},
 	{"integrate","Integrate data","integrate Dat 'dir'", mgls_integrate ,16},
 	{"jacobian","Get Jacobian","jacobian Res Xdat Ydat [Zdat]", mgls_jacobian ,4},
 	{"join","Join data arrays","join Dat Add", mgls_join ,3},
 	{"label","Draw label at arbitrary position","label Ydat 'txt' ['fmt'='']|Xdat Ydat 'txt' ['fmt'='']|Xdat Ydat Zdat 'txt' ['fmt'='']", mgls_label ,7},
+	{"lamerey","Draw Lamerey diagram","lamerey x0 Func ['fmt']|x0 'func' ['fmt']", mgls_lamerey ,13},
 	{"legend","Draw legend","legend [pos 'fmt']|x y ['fmt']", mgls_legend ,15},
 	{"legendmarks","Set number of marks in the legend","legendmarks val", mgls_legendmarks ,15},
 	{"light","Setup light","light [val] | val num | num xpos ypos zpos ['fmt' br]", mgls_light ,2},
@@ -3408,11 +3548,15 @@ mglCommand mgls_base_cmd[] = {
 	{"origintick","Set tick labels drawing at origin","origintick val", mgls_origintick ,14},
 	{"palette","Set palette for 1D plots","palette 'colors'", mgls_palette ,2},
 	{"pde","Solve PDE","pde Res 'ham' IniRe IniIm [dz k0]", mgls_pde ,4},
+	{"pendelta","Set size of semi-transparent area","pen_delta val", mgls_pendelta ,2},
 	{"perspective","Set perspective","perspective val", mgls_perspective ,2},
 	{"pipe","Draw flow pipes for vector field","pipe Udat Vdat ['fmt' rad num]|Xdat Ydat Udat Vdat ['fmt' rad num]|Udat Vdat Wdat ['fmt' rad num]|Xdat Ydat Zdat Udat Vdat Wdat ['fmt' rad num]", mgls_pipe ,11},
 	{"plot","Draw usual plot for 1D data","plot Ydat ['fmt']|Xdat Ydat ['fmt']|Xdat Ydat Zdat ['fmt']", mgls_plot ,7},
 	{"plotid","Set default filename","plotid 'name'", mgls_plotid ,2},
+	{"pmap","Draw Poincare map","pmap Ydat Rdat ['fmt']|Xdat Ydat Rdat ['fmt']|Xdat Ydat Zdat Rdat ['fmt']", mgls_pmap ,7},
 	{"polygon","Draw polygon","polygon x1 y1 x2 y2 num ['fmt']|x1 y1 z1 x2 y2 z2 num ['fmt']", mgls_polygon ,13},
+	{"print","Immediately print the message","info 'message'|Dat [detail]|const", mgls_print ,3},
+	{"pulse","Get pulse properties","pulse Res Dat 'dir'", mgls_pulse ,4},
 	{"put","Put value (numeric or array) to given data element","put Dat val [i j k] | Dat Val [i j k]", mgls_put ,3},
 	{"putsfit","Print fitted formula","putsfit x y ['pre' 'font' size]|x y z ['pre' 'font' size]", mgls_putsfit ,15},
 	{"qo2d","Solve PDE in accompanied coordinates for 2d case","qo2d Res 'ham' IniRe IniIm Ray [r k0 Xout Yout]", mgls_qo2d ,4},
@@ -3440,7 +3584,7 @@ mglCommand mgls_base_cmd[] = {
 	{"roots", "Find roots using data as initial values", "roots Res 'func' Ini ['var']|Res 'func' ini ['var']", mgls_roots ,4},
 	{"rotate","Rotate plot","rotate tetz tetx [tety] | tet x y z", mgls_rotate ,5},
 	{"rotatetext","Set to auto rotate text or not","rotatetext val", mgls_rotatetext ,15},
-	{"save","Save data to file","save Dat 'file'", mgls_save ,3},
+	{"save","Save data to file","save Dat 'file'|'str' 'file'|'str' 'file' 'how'", mgls_save ,3},
 	{"savehdf","Save data to HDF5 file","savehdf Dat 'file' 'id'", mgls_savehdf ,3},
 	{"setsize","Set picture size","setsize width height", mgls_setsize ,2},
 	{"sew","Remove jump into the data, like phase jumps","sew Dat ['dir' da]", mgls_sew ,16},
diff --git a/src/export_2d.cpp b/src/export_2d.cpp
index 4c6c7a2..b8013f4 100644
--- a/src/export_2d.cpp
+++ b/src/export_2d.cpp
@@ -190,7 +190,7 @@ void MGL_EXPORT mgl_write_eps(HMGL gr, const char *fname,const char *descr)
 		fprintf(fb, "%%%%BoundingBox: 0 0 %d %d\n", w, h);
 		fclose(fb);	delete []buf;
 	}
-	
+
 	const std::string loc = setlocale(LC_NUMERIC, NULL);	setlocale(LC_NUMERIC, "C");
 	mgl_printf(fp, gz, "%%!PS-Adobe-3.0 EPSF-3.0\n%%%%BoundingBox: 0 0 %d %d\n", w, h);
 	mgl_printf(fp, gz, "%%%%Created by MathGL library\n%%%%Title: %s\n",descr ? descr : fname);
@@ -248,7 +248,7 @@ void MGL_EXPORT mgl_write_eps(HMGL gr, const char *fname,const char *descr)
 	if(m_P)	mgl_printf(fp, gz, "/m_P {m_p 0 sm rm m_s} def\n");
 	if(m_X)	mgl_printf(fp, gz, "/m_X {m_x ss sm rm m_s} def\n");
 	//	if(m_C)	mgl_printf(fp, gz, "/m_C {m_c m_o} def\n");
-	mgl_printf(fp, gz, "\n");
+	mgl_printf(fp, gz, "1 setlinecap\n1 setlinejoin\n\n");	// manual setting round line cap
 
 	// Write background image first
 	const unsigned char *img = mgl_get_background(gr);
@@ -434,7 +434,7 @@ void MGL_EXPORT mgl_write_svg(HMGL gr, const char *fname,const char *descr)
 
 
 	// currentColor -> inherit ???
-	mgl_printf(fp, gz, "<g fill=\"none\" stroke=\"none\" stroke-width=\"0.5\">\n");
+	mgl_printf(fp, gz, "<g fill=\"none\" stroke=\"none\" stroke-width=\"0.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n");
 	// write primitives
 	mreal wp=-1;
 	register long i;
diff --git a/src/fft.cpp b/src/fft.cpp
index 7ea43f8..f100f57 100644
--- a/src/fft.cpp
+++ b/src/fft.cpp
@@ -1072,12 +1072,12 @@ void MGL_EXPORT mgl_data_hankel_(uintptr_t *d, const char *dir,int l)
 void MGL_EXPORT mgl_data_fill_sample(HMDT d, const char *how)
 {
 	if(!how || *how==0)	return;
-	bool kk = strchr(how,'k');
+	bool kk = mglchr(how,'k');
 	long n=d->nx,dn=1;
 	mreal *aa=d->a;
-	if(strchr(how,'y'))	{	n=d->ny;	dn=d->nx;	}
-	if(strchr(how,'z'))	{	n=d->nz;	dn=d->nx*d->ny;	}
-	if(strchr(how,'h'))	// Hankel
+	if(mglchr(how,'y'))	{	n=d->ny;	dn=d->nx;	}
+	if(mglchr(how,'z'))	{	n=d->nz;	dn=d->nx*d->ny;	}
+	if(mglchr(how,'h'))	// Hankel
 	{
 #if MGL_HAVE_GSL
 		gsl_dht *dht = gsl_dht_new(n,0,1);
diff --git a/src/fit.cpp b/src/fit.cpp
index 6a42a4b..d4f62e3 100644
--- a/src/fit.cpp
+++ b/src/fit.cpp
@@ -192,14 +192,23 @@ mreal MGL_NO_EXPORT mgl_fit_base(mglFitData &fd, mreal *ini)
 		status = gsl_multifit_test_delta (s->dx, s->x, 1e-4, 1e-4 );
 	}
 	while ( status == GSL_CONTINUE && iter < 500 );
+
 	gsl_matrix *covar = gsl_matrix_alloc(m, m);
-	gsl_multifit_covar (s->J, 0.0, covar );
+#ifdef HAVE_GSL_2
+	gsl_matrix *J = gsl_matrix_alloc(s->fdf->n, s->fdf->p);
+	gsl_multifit_fdfsolver_jac(s, J);
+	gsl_multifit_covar (J, 0.0, covar);
+	gsl_matrix_free (J);
+#else
+	gsl_multifit_covar(s->J, 0.0, covar);
+#endif
 	mglFitCovar.Set(covar);
+	gsl_matrix_free(covar);
+
 	mreal res = gsl_blas_dnrm2(s->f);
 	for(i=0;i<m;i++)	ini[i] = gsl_vector_get(s->x, i);
 	// free memory
-	gsl_multifit_fdfsolver_free (s);
-	gsl_matrix_free (covar);
+	gsl_multifit_fdfsolver_free(s);
 	delete []x_init;
 	return res;
 #else
diff --git a/src/interp.hpp b/src/interp.hpp
index 46eee6d..61b2a33 100644
--- a/src/interp.hpp
+++ b/src/interp.hpp
@@ -39,22 +39,20 @@ template <class Treal> Treal mglLineart(const Treal *a, long nx, long ny, long n
 //-----------------------------------------------------------------------------
 template <class Treal> Treal mgl_spline3t(const Treal y[4], long n, mreal dx, Treal &dy)
 {
-	Treal d[3], t0,t1, f0,d0;
+	Treal d[3];
 	d[0] = -(y[2]-mreal(4)*y[1]+mreal(3)*y[0])/mreal(2);
 	d[1] = (y[2]-y[0])/mreal(2);
 	d[2] = (y[3]-y[1])/mreal(2);
-//	d[3] = (mreal(3)*y[3]-mreal(4)*y[2]+y[1])/mreal(2);
 
-	t0 = (y[2]+y[0])/mreal(2)-y[1];
-	t1 = (y[3]+y[1])/mreal(2)-y[2];
-	f0 = y[n];		d0 = d[n];
-	Treal res = 0;
+	Treal t0 = (y[2]+y[0])/mreal(2)-y[1];
+	Treal t1 = (y[3]+y[1])/mreal(2)-y[2];
+	Treal f0 = y[n], d0 = d[n], res = 0;
 	if(n==1)
 	{
-		Treal f1 = y[2], d1 = d[2];
-		Treal b3 = mreal(10)*(f1-f0)+t1-mreal(3)*t0-mreal(4)*d1-mreal(6)*d0;
-		Treal b4 = mreal(15)*(f0-f1)-mreal(2)*t1+mreal(3)*t0+mreal(7)*d1+mreal(8)*d0;
-		Treal b5 = mreal(6)*(f1-f0)+t1-t0-mreal(3)*d1-mreal(3)*d0;
+		Treal df = y[2]-f0, d1 = d[2];
+		Treal b3 = mreal(10)*df+t1-mreal(3)*t0-mreal(4)*d1-mreal(6)*d0;
+		Treal b4 = mreal(-15)*df-mreal(2)*t1+mreal(3)*t0+mreal(7)*d1+mreal(8)*d0;
+		Treal b5 = mreal(6)*df+t1-t0-mreal(3)*d1-mreal(3)*d0;
 		dy = d0 + dx*(mreal(2)*t0+dx*(mreal(3)*b3+dx*(mreal(4)*b4+dx*mreal(5)*b5)));
 //		d2y = mreal(2)*t0 + dx*(mreal(6)*b3+dx*(mreal(12)*b4+dx*mreal(20)*b5));	// 2nd derivative for future
 		res = f0 + dx*(d0+dx*(t0+dx*(b3+dx*(b4+dx*b5))));
@@ -68,22 +66,20 @@ template <class Treal> Treal mgl_spline3t(const Treal y[4], long n, mreal dx, Tr
 //-----------------------------------------------------------------------------
 template <class Treal> Treal mgl_spline3st(const Treal y[4], long n, mreal dx)
 {
-	Treal d[3], t0,t1, f0,d0;
+	Treal d[3];
 	d[0] = -(y[2]-mreal(4)*y[1]+mreal(3)*y[0])/mreal(2);
 	d[1] = (y[2]-y[0])/mreal(2);
 	d[2] = (y[3]-y[1])/mreal(2);
-//	d[3] = (mreal(3)*y[3]-mreal(4)*y[2]+y[1])/mreal(2);
 
-	Treal res;
-	f0 = y[n];		d0 = d[n];
-	t0 = (y[2]+y[0])/mreal(2)-y[1];
-	t1 = (y[3]+y[1])/mreal(2)-y[2];
+	Treal f0 = y[n], d0 = d[n], res;
+	Treal t0 = (y[2]+y[0])/mreal(2)-y[1];
+	Treal t1 = (y[3]+y[1])/mreal(2)-y[2];
 	if(n==1)
 	{
-		Treal f1 = y[2], d1 = d[2];
-		Treal b3 = mreal(10)*(f1-f0)+t1-mreal(3)*t0-mreal(4)*d1-mreal(6)*d0;
-		Treal b4 = mreal(15)*(f0-f1)-mreal(2)*t1+mreal(3)*t0+mreal(7)*d1+mreal(8)*d0;
-		Treal b5 = mreal(6)*(f1-f0)+t1-t0-mreal(3)*d1-mreal(3)*d0;
+		Treal df = y[2]-f0, d1 = d[2];
+		Treal b3 = mreal(10)*df+t1-mreal(3)*t0-mreal(4)*d1-mreal(6)*d0;
+		Treal b4 = mreal(-15)*df-mreal(2)*t1+mreal(3)*t0+mreal(7)*d1+mreal(8)*d0;
+		Treal b5 = mreal(6)*df+t1-t0-mreal(3)*d1-mreal(3)*d0;
 		res = f0 + dx*(d0+dx*(t0+dx*(b3+dx*(b4+dx*b5))));
 	}
 	else	res = f0 + dx*(d0+dx*(n<1?t0:t1));
diff --git a/src/opengl.cpp b/src/opengl.cpp
index abdf610..f0bc699 100644
--- a/src/opengl.cpp
+++ b/src/opengl.cpp
@@ -79,7 +79,6 @@ void mglCanvasGL::Finish()
 		PDef=pdef;	pPos=ss;	PenWidth=ww;
 	}
 	glFinish();
-//	glBegin(GL_LINES);	glColor3f(0,0,1);	glVertex2f(0.1,0.1);	glVertex2f(0.9,0.9);	glEnd();
 }
 //-----------------------------------------------------------------------------
 bool mglCanvasGL::Alpha(bool enable)
diff --git a/src/parser.cpp b/src/parser.cpp
index 7d34b41..7d5070a 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -59,6 +59,7 @@ void mglParser::ScanFunc(const wchar_t *line)
 	if(!line)
 	{	func.clear();	num=0;	return;	}
 	num++;
+	while(*line<=' ' && *line!=0)	line++;
 	if(wcsncmp(line,L"func",4) || line[4]>' ')	return;
 	register long i;
 	for(i=4;line[i]<=' ' || line[i]=='\'';i++);
@@ -167,6 +168,9 @@ mglParser::mglParser(bool setsize)
 mglParser::~mglParser()
 {
 	DeleteAll();	delete []fval;
+	for(size_t i=0;i<NumList.size();i++)	// force delete built-in variables
+		if(NumList[i])	delete NumList[i];
+	NumList.clear();
 #if MGL_HAVE_LTDL
 	lt_dlexit();
 #endif
@@ -897,7 +901,6 @@ void mglParser::Execute(mglGraph *gr, FILE *fp, bool print)
 	std::wstring str;
 	wchar_t ch;
 	while(!feof(fp) && size_t(ch=fgetwc(fp))!=WEOF)	str.push_back(ch);
-//	while(!feof(fp))	str.push_back(fgetwc(fp));
 	Execute(gr,str.c_str());
 	if(print)	printf("%s\n",gr->Message());
 }
diff --git a/src/pixel.cpp b/src/pixel.cpp
index 3a753ed..0427ef7 100644
--- a/src/pixel.cpp
+++ b/src/pixel.cpp
@@ -31,16 +31,18 @@ inline mreal get_pfact(float pf, float Depth)
 void mglCanvas::SetSize(int w,int h,bool clf)
 {
 	if(w<=0 || h<=0)	{	SetWarn(mglWarnSize,"SetSize");	return;	}
-	if(Width==w || Height==h)
+	if(Width==w && Height==h)
 	{
 		InPlot(0,1,0,1,false);
 		if(clf || (Quality&4))	Clf();
 		return;
 	}
 
-	double dx = double(w)/Width, dy = double(h)/Height, dz = sqrt(double(w*h))/Depth;
+	const double dx = double(w)/Width;
+	const double dy = double(h)/Height;
+	const double dz = sqrt(double(w*h))/Depth;
 	Width = w;	Height = h;	Depth = long(sqrt(double(w*h)));
-	long s = long(w)*long(h);
+	const long s = long(w)*long(h);
 #if MGL_HAVE_PTHREAD
 	pthread_mutex_lock(&mutexClf);
 #elif MGL_HAVE_OMP
@@ -71,7 +73,7 @@ void mglCanvas::SetSize(int w,int h,bool clf)
 #elif MGL_HAVE_OMP
 		omp_set_lock(&lockClf);
 #endif
-		long n = long(Pnt.size());
+		const long n = long(Pnt.size());
 #pragma omp parallel for
 		for(long i=0;i<n;i++)
 		{
@@ -86,7 +88,7 @@ void mglCanvas::SetSize(int w,int h,bool clf)
 		for(size_t k=0;k<DrwDat.size();k++)	// scale frames too
 		{
 			mglStack<mglPnt>  &pnt = DrwDat[k].Pnt;
-			n = long(pnt.size());
+			const long n = long(pnt.size());
 #pragma omp parallel for
 			for(long i=0;i<n;i++)
 			{
@@ -122,7 +124,7 @@ void mglCanvas::PutDrawReg(mglDrawReg *d, const mglCanvas *gr)
 {
 	if(gr)
 	{
-		int dd = d->x2 - d->x1;
+		const int dd = d->x2 - d->x1;
 		for(long j=d->y1;j<d->y2;j++)
 		{
 			register long i = d->x1+Width*(Height-1-j);
@@ -161,7 +163,7 @@ long mglCanvas::ProjScale(int nf, long id, bool text)
 	const mglPnt &pi = Pnt[id];
 	mglPoint pp(pi.x,pi.y,pi.z), nn(pi.u,pi.v,pi.w), p, n;
 	if(mgl_isnan(pp.x))	return -1;
-	mreal w=B1.b[0]/2, h=B1.b[4]/2, d=B1.b[8]/2, xx=B1.x-w/2, yy=B1.y-h/2;
+	const mreal w=B1.b[0]/2, h=B1.b[4]/2, d=B1.b[8]/2, xx=B1.x-w/2, yy=B1.y-h/2;
 	if(pi.sub>=0)
 	{
 		mglPoint q(RestorePnt(pp)/(2*B.pf));
@@ -206,23 +208,23 @@ void mglCanvas::LightScale(const mglMatrix *M)
 // NOTE: Perspective is not fully supported now !!! Also it use LAST InPlot parameters!!!
 mglPoint mglCanvas::RestorePnt(mglPoint ps, bool norm) const
 {
-	mreal s3 = 2*B.pf;
+	const mreal s3 = 2*B.pf;
 	mglPoint p;
 
-	mreal W=Width/2, H=Height/2, D=Depth/2;
+	const mreal W=Width/2, H=Height/2, D=Depth/2;
 	const mreal *b=B.b,*d=Bp.b;
 	mreal cx = B.z*d[2]+B.y*d[1]+B.x*d[0]-Bp.x*W-d[0]*W+W-d[1]*H-d[2]*D;
-	mreal c0 = b[6]*d[2]+b[3]*d[1]+b[0]*d[0];
-	mreal c1 = b[7]*d[2]+b[4]*d[1]+b[1]*d[0];
-	mreal c2 = b[8]*d[2]+b[5]*d[1]+b[2]*d[0];
+	const mreal c0 = b[6]*d[2]+b[3]*d[1]+b[0]*d[0];
+	const mreal c1 = b[7]*d[2]+b[4]*d[1]+b[1]*d[0];
+	const mreal c2 = b[8]*d[2]+b[5]*d[1]+b[2]*d[0];
 	mreal cy = B.z*d[5]+B.y*d[4]+B.x*d[3]-d[3]*W-Bp.y*H-d[4]*H+H-d[5]*D;
-	mreal c3 = b[6]*d[5]+b[3]*d[4]+b[0]*d[3];
-	mreal c4 = b[7]*d[5]+b[4]*d[4]+b[1]*d[3];
-	mreal c5 = b[8]*d[5]+b[5]*d[4]+b[2]*d[3];
+	const mreal c3 = b[6]*d[5]+b[3]*d[4]+b[0]*d[3];
+	const mreal c4 = b[7]*d[5]+b[4]*d[4]+b[1]*d[3];
+	const mreal c5 = b[8]*d[5]+b[5]*d[4]+b[2]*d[3];
 	mreal cz = B.z*d[8]+B.y*d[7]+B.x*d[6]-d[6]*W-d[7]*H-Bp.z*D-d[8]*D+D;
-	mreal c6 = b[6]*d[8]+b[3]*d[7]+b[0]*d[6];
-	mreal c7 = b[7]*d[8]+b[4]*d[7]+b[1]*d[6];
-	mreal c8 = b[8]*d[8]+b[5]*d[7]+b[2]*d[6];
+	const mreal c6 = b[6]*d[8]+b[3]*d[7]+b[0]*d[6];
+	const mreal c7 = b[7]*d[8]+b[4]*d[7]+b[1]*d[6];
+	const mreal c8 = b[8]*d[8]+b[5]*d[7]+b[2]*d[6];
 	if(norm)	cx=cy=cz=0;
 
 	if(mgl_isnum(ps.z))	// try to take into account perspective if z-value is provided
@@ -231,8 +233,8 @@ mglPoint mglCanvas::RestorePnt(mglPoint ps, bool norm) const
 		ps.x = Width/2 + (ps.x-Width/2)/dd;
 		ps.y = Height/2+ (ps.y-Height/2)/dd;
 	}
-	mreal xx = ps.x-cx, yy = ps.y-cy, zz = ps.z-cz;
-	mreal d1=c0*c4-c1*c3, d2=c1*c5-c2*c4, d3=c0*c5-c2*c3;
+	const mreal xx = ps.x-cx, yy = ps.y-cy, zz = ps.z-cz;
+	const mreal d1=c0*c4-c1*c3, d2=c1*c5-c2*c4, d3=c0*c5-c2*c3;
 
 	if(mgl_isnum(zz))	// try to use z-values
 	{
@@ -291,7 +293,7 @@ void MGL_NO_EXPORT mgl_prm_swap(mglPrim &s1,mglPrim &s2,mglPrim *buf)
 	memcpy(&s1, &s2, sizeof(mglPrim));
 	memcpy(&s2, buf, sizeof(mglPrim));
 }
-void MGL_NO_EXPORT sort_prm_c(size_t l0, size_t r0, mglStack<mglPrim> &s, mglPrim *buf)
+void MGL_NO_EXPORT sort_prm_c(const size_t l0, const size_t r0, mglStack<mglPrim> &s, mglPrim *buf)
 {
 	if(l0==r0)	return;
 	if(l0+1==r0)
@@ -303,7 +305,7 @@ void MGL_NO_EXPORT sort_prm_c(size_t l0, size_t r0, mglStack<mglPrim> &s, mglPri
 	if(del)	buf = (mglPrim*)malloc(sizeof(mglPrim));
 
 	size_t l=l0, r=r0;
-	long v = s[(l+r)/2].n1;
+	const long v = s[(l+r)/2].n1;
 
 	for(size_t i=l0;i<=r0;i++)	// first collect <0
 		if(s[i].n1<v)
@@ -336,11 +338,10 @@ void mglStartThread(void (mglCanvas::*func)(long i, long n, const void *p), mglC
 	{
 		pthread_t *tmp=new pthread_t[mglNumThr];
 		mglThreadG *par=new mglThreadG[mglNumThr];
-		register long i;
-		for(i=0;i<mglNumThr;i++)	// put parameters into the structure
+		for(long i=0;i<mglNumThr;i++)	// put parameters into the structure
 		{	par[i].gr=gr;	par[i].f=func;	par[i].n=n;	par[i].p=p;	par[i].id=i;	}
-		for(i=0;i<mglNumThr;i++)	pthread_create(tmp+i, 0, mgl_canvas_thr, par+i);
-		for(i=0;i<mglNumThr;i++)	pthread_join(tmp[i], 0);
+		for(long i=0;i<mglNumThr;i++)	pthread_create(tmp+i, 0, mgl_canvas_thr, par+i);
+		for(long i=0;i<mglNumThr;i++)	pthread_join(tmp[i], 0);
 		delete []tmp;	delete []par;
 	}
 	else
@@ -382,7 +383,7 @@ void mglCanvas::pxl_backgr(long id, long n, const void *)
 void mglCanvas::pxl_transform(long id, long n, const void *)
 {
 	const mreal *b = Bp.b;
-	mreal dx = -Bp.x*Width/2, dy = -Bp.y*Height/2, dz = Depth/2.;
+	const mreal dx = -Bp.x*Width/2, dy = -Bp.y*Height/2, dz = Depth/2.;
 #if !MGL_HAVE_PTHREAD
 #pragma omp parallel for
 #endif
@@ -513,7 +514,7 @@ void mglCanvas::PreparePrim(int fast)
 void mglCanvas::pxl_primdr(long id, long , const void *)
 {
 #define Q	4	// should be >= sqrt(2*num_thr) ???
-	int nx=Q,ny=Q;		// TODO find dependence on Q for 1, 2, 4, 8 threads. Try to select optimal
+	const int nx=Q,ny=Q;	// TODO find dependence on Q for 1, 2, 4, 8 threads. Try to select optimal
 	if(!(Quality&3))
 #if !MGL_HAVE_PTHREAD
 #pragma omp parallel for
@@ -628,7 +629,7 @@ void mglCanvas::pxl_primpx(long id, long n, const void *)	// NOTE this variant i
 void mglCanvas::pxl_dotsdr(long id, long n, const void *)
 {
 	const mreal *b = Bp.b;
-	mreal dx = -Bp.x*Width/2, dy = -Bp.y*Height/2, dz = Depth/2.;
+	const mreal dx = -Bp.x*Width/2, dy = -Bp.y*Height/2, dz = Depth/2.;
 #if !MGL_HAVE_PTHREAD
 #pragma omp parallel for
 #endif
@@ -813,6 +814,11 @@ void mglCanvas::pnt_plot(long x,long y,mreal z,const unsigned char ci[4], int ob
 				{	combine(c,cc+8);	memcpy(cc+8,c,4);	}
 			}
 		}
+		if(Quality&MGL_DRAW_FAST)
+		{
+			if(z>=zz[0])	// point upper the background
+			{	zz[0]=z;	combine(cc,c);	OI[i0]=obj_id;	}
+		}
 		else
 		{
 			if(z>=zz[0])	// point upper the background
@@ -826,16 +832,15 @@ unsigned char* mglCanvas::col2int(const mglPnt &p,unsigned char *r, int obj_id)
 //	if(!r)	return r;	// NOTE r must be provided!
 	if(p.a<=0)	{	memset(r,0,4);	return r;	}
 	register float b0=0,b1=0,b2=0, ar,ag,ab,dif;
-	size_t nl = p.sub>=0?p.sub:1-p.sub;
-	bool glob = !get(MGL_LOCAL_LIGHT);
+	const size_t nl = p.sub>=0?p.sub:1-p.sub;
+	const bool glob = !get(MGL_LOCAL_LIGHT);
 	ar = ag = ab = glob?AmbBr:Sub[nl].AmbBr;
 	dif = glob?DifBr:Sub[nl].DifBr;
 
 	if(mgl_isnum(p.u+p.v+p.w))
 	{
 		float d0,d1,d2,nn;
-		register long i;
-		for(i=0;i<10;i++)
+		for(long i=0;i<10;i++)
 		{
 			const mglLight &ll=glob?light[i]:Sub[nl].light[i];
 			if(!ll.n)	continue;
@@ -897,7 +902,7 @@ void mglCanvas::combine(unsigned char *c1, const unsigned char *c2) const
 {
 	if(c2[3])
 	{
-		register unsigned a1=c1[3], a2=c2[3];
+		const register unsigned a1=c1[3], a2=c2[3];
 		if(a2==255 || a1==0)	{	memcpy(c1,c2,4);	return; }
 		if((Flag&3)==0)
 		{
@@ -937,7 +942,7 @@ unsigned char **mglCanvas::GetRGBLines(long &w, long &h, unsigned char *&f, bool
 	return p;
 }
 //-----------------------------------------------------------------------------
-bool MGL_LOCAL_PURE visible(long i, long j, const unsigned char m[8], mreal pw, int a)	// Check if pixel visible
+bool inline visible(long i, long j, const unsigned char m[8], mreal pw, int a)	// Check if pixel visible
 {
 	register float c = mgl_cos[(a+360)%360], s = mgl_cos[(a+450)%360];
 //	register int ii = int(0.5+(i*c+j*s)/pw)%8, jj = int(0.5+(j*c-i*s)/pw)%8;
@@ -960,7 +965,6 @@ void mglCanvas::quad_draw(const mglPnt &p1, const mglPnt &p2, const mglPnt &p3,
 	}
 	unsigned char r[4];
 	long y1,x1,y2,x2;
-	float dd,dsx,dsy;
 	mglPnt d1(p2-p1), d2(p3-p1), d3(p4+p1-p2-p3);
 
 	if(d1.x==0 && d1.y==0)	{	trig_draw(p1,p3,p4,true,d);	return;	}
@@ -974,18 +978,18 @@ void mglCanvas::quad_draw(const mglPnt &p1, const mglPnt &p2, const mglPnt &p3,
 	y1=mgl_max(y1,d->y1);	y2=mgl_min(y2,d->y2);
 //	if(x1>x2 || y1>y2)	return;
 
-	dd = d1.x*d2.y-d1.y*d2.x;
-	dsx =-4*(d2.y*d3.x - d2.x*d3.y)*d1.y;
-	dsy = 4*(d2.y*d3.x - d2.x*d3.y)*d1.x;
+	const float dd = d1.x*d2.y-d1.y*d2.x;
+	const float dsx =-4*(d2.y*d3.x - d2.x*d3.y)*d1.y;
+	const float dsy = 4*(d2.y*d3.x - d2.x*d3.y)*d1.x;
 
 	mglPoint n1(mglPoint(p2.x-p1.x,p2.y-p1.y,p2.z-p1.z)^mglPoint(p3.x-p1.x,p3.y-p1.y,p3.z-p1.z));
 	mglPoint n2(mglPoint(p2.x-p4.x,p2.y-p4.y,p2.z-p4.z)^mglPoint(p3.x-p4.x,p3.y-p4.y,p3.z-p4.z));
 	mglPoint nr((n1.x+n2.x)*0.5,(n1.y+n2.y)*0.5,(n1.z+n2.z)*0.5);
 
-	float x0 = p1.x, y0 = p1.y;
-	int oi = d->ObjId, ang=d->angle;
-	mreal pw = d->PenWidth;
-	uint64_t pd = d->PDef;
+	const float x0 = p1.x, y0 = p1.y;
+	const int oi = d->ObjId, ang=d->angle;
+	const mreal pw = d->PenWidth;
+	const uint64_t pd = d->PDef;
 	for(long j=y1;j<=y2;j++)	for(long i=x1;i<=x2;i++)
 	{
 		if(pd==MGL_SOLID_MASK || visible(i,j,d->m, pw,ang))
@@ -1068,13 +1072,12 @@ void mglCanvas::trig_draw(const mglPnt &p1, const mglPnt &p2, const mglPnt &p3,
 	{	fast_draw(p1,p2,d);	fast_draw(p1,p3,d);	fast_draw(p2,p3,d);	return;	}
 	unsigned char r[4];
 	long y1,x1,y2,x2;
-	float dxu,dxv,dyu,dyv;
-	mglPnt d1(p2-p1), d2(p3-p1), p;
+	const mglPnt d1(p2-p1), d2(p3-p1);
 
-	dxu = d2.x*d1.y - d1.x*d2.y;
-	if(fabs(dxu)<1e-5)	return;		// points lies on the same line
-	dyv =-d1.x/dxu;	dxv = d1.y/dxu;
-	dyu = d2.x/dxu;	dxu =-d2.y/dxu;
+	const float tmp = d2.x*d1.y - d1.x*d2.y;
+	if(fabs(tmp)<1e-5)	return;		// points lies on the same line
+	const float dyv =-d1.x/tmp,	dxv = d1.y/tmp;
+	const float dyu = d2.x/tmp,	dxu =-d2.y/tmp;
 
 	x1 = long(mgl_min(p1.x<p2.x?p1.x:p2.x, p3.x));	// bounding box
 	y1 = long(mgl_min(p1.y<p2.y?p1.y:p2.y, p3.y));
@@ -1084,13 +1087,13 @@ void mglCanvas::trig_draw(const mglPnt &p1, const mglPnt &p2, const mglPnt &p3,
 	y1=y1>d->y1?y1:d->y1;	y2=y2<d->y2?y2:d->y2;
 //	if(x1>x2 || y1>y2)	return;
 	// default normale
-	mglPoint nr(mglPoint(p2.x-p1.x,p2.y-p1.y,p2.z-p1.z)^mglPoint(p3.x-p1.x,p3.y-p1.y,p3.z-p1.z));
-	float x0 = p1.x, y0 = p1.y;
-	float dz = Width>2 ? 1 : 1e-5*Width;	// provide additional height to be well visible on the surfaces
-	if(anorm)	dz=0;
-	int oi = d->ObjId, ang=d->angle;
-	mreal pw = d->PenWidth;
-	uint64_t pd = d->PDef;
+	const mglPoint nr(mglPoint(p2.x-p1.x,p2.y-p1.y,p2.z-p1.z)^mglPoint(p3.x-p1.x,p3.y-p1.y,p3.z-p1.z));
+	const float x0 = p1.x, y0 = p1.y;
+	// provide additional height to be well visible on the surfaces
+	const float dz = anorm? 0 : (Width>2 ? 1 : 1e-5*Width);
+	const int oi = d->ObjId, ang=d->angle;
+	const mreal pw = d->PenWidth;
+	const uint64_t pd = d->PDef;
 	if(Quality&MGL_DRAW_NORM)	for(long j=y1;j<=y2;j++)	for(long i=x1;i<=x2;i++)
 	{
 		if(pd==MGL_SOLID_MASK || visible(i,j,d->m, pw,ang))
@@ -1098,7 +1101,7 @@ void mglCanvas::trig_draw(const mglPnt &p1, const mglPnt &p2, const mglPnt &p3,
 			register float xx = (i-x0), yy = (j-y0);
 			register float u = dxu*xx+dyu*yy, v = dxv*xx+dyv*yy;
 			if(u<0 || v<0 || u+v>1)	continue;
-			p = p1+d1*u+d2*v;
+			mglPnt p(p1+d1*u+d2*v);
 			if(mgl_isnan(p.u) && mgl_isnum(p.v) && anorm)
 			{	p.u = nr.x;	p.v = nr.y;	p.w = nr.z;	}
 			pnt_plot(i,j,p.z+dz,col2int(p,r,oi),oi);
@@ -1143,37 +1146,35 @@ inline unsigned char mgl_sline(unsigned char c,float x)
 {	x*=x/2;	return (unsigned char)((c)/(1+x+x*x/5));	}
 void mglCanvas::line_draw(const mglPnt &p1, const mglPnt &p2, const mglDrawReg *dr)
 {
-	if((Quality&3)<2)	{	fast_draw(p1,p2,dr);	return;	}
+	if((Quality&3)==MGL_DRAW_WIRE)	{	fast_draw(p1,p2,dr);	return;	}	// previously was <2. This may slightly slow down for Quality=1
 	unsigned char r[4];
 	long y1,x1,y2,x2;
 
-	float pw=dr->PenWidth, dxu,dxv,dyu,dyv,dd,dpw=3;
-	float dz = Width>2 ? 1 : 1e-5*Width;		// provide additional height to be well visible on the surfaces
-	int oi = dr->ObjId;
-
-	if(oi==HighId)	{	pw *= 2;	dpw=2;	}
-	mglPnt d(p2-p1), p;
+	const float dz = Width>2 ? 1 : 1e-5*Width;		// provide additional height to be well visible on the surfaces
+	const int oi = dr->ObjId;
+	const float pw=dr->PenWidth*(oi==HighId?2:1), dpw=pen_delta*(oi==HighId?2:3);
+	const mglPnt d(p2-p1);
 	bool hor = fabs(d.x)>fabs(d.y);
 
 	x1 = long(p1.x<p2.x?p1.x:p2.x);	y1 = long(p1.y<p2.y?p1.y:p2.y);	// bounding box
 	x2 = long(p1.x>p2.x?p1.x:p2.x);	y2 = long(p1.y>p2.y?p1.y:p2.y);
-	x1 -= pw+3.5;	x2 += pw+3.5;
-	y1 -= pw+3.5;	y2 += pw+3.5;
+	x1 -= pw+10/dpw;	x2 += pw+10/dpw;
+	y1 -= pw+10/dpw;	y2 += pw+10/dpw;
 	x1=x1>dr->x1?x1:dr->x1;	x2=x2<dr->x2?x2:dr->x2;
 	y1=y1>dr->y1?y1:dr->y1;	y2=y2<dr->y2?y2:dr->y2;
-	dd = hypot(d.x, d.y);
+	const float dd = hypot(d.x, d.y);
 //	if(x1>x2 || y1>y2 || dd<1e-5)	return;
 	if(dd<1e-5)	return;
 
-	dxv = d.y/dd;	dyv =-d.x/dd;
-	dxu = d.x/dd;	dyu = d.y/dd;
+	const float dxv = d.y/dd, dyv =-d.x/dd;
+	const float dxu = d.x/dd, dyu = d.y/dd;
 
-	uint64_t pd = dr->PDef;
-	mreal pp = dr->pPos;
+	const uint64_t pd = dr->PDef;
+	const mreal pp = dr->pPos;
 	if(hor)	for(long i=x1;i<=x2;i++)
 	{
-		y1 = int(p1.y+d.y*(i-p1.x)/d.x - pw - 3.5);
-		y2 = int(p1.y+d.y*(i-p1.x)/d.x + pw + 3.5);
+		y1 = int(p1.y+d.y*(i-p1.x)/d.x - pw - 10/dpw);
+		y2 = int(p1.y+d.y*(i-p1.x)/d.x + pw + 10/dpw);
 		y1=y1>dr->y1?y1:dr->y1;	y2=y2<dr->y2?y2:dr->y2;
 		if(y1>y2)	continue;
 		for(long j=y1;j<=y2;j++)
@@ -1182,17 +1183,17 @@ void mglCanvas::line_draw(const mglPnt &p1, const mglPnt &p2, const mglDrawReg *
 			register float u = dxu*xx+dyu*yy, v = dxv*xx+dyv*yy;	v = v*v;
 			if(u<0)			v += u*u;
 			else if(u>dd)	v += (u-dd)*(u-dd);
-			if(v>pw*pw)		continue;
+//			if(v>pw*pw)		continue;
 			if(!(pd & ( 1L<<long(fmod(pp+u/pw/1.5, 16)) ) ))	continue;
-			p = p1+d*(u/dd);	col2int(p,r,oi);
+			mglPnt p(p1+d*(u/dd));	col2int(p,r,oi);
 			r[3] = v<(pw-1)*(pw-1)/4 ? 255 : mgl_sline(255,dpw*(sqrt(v)+(1-pw)/2));
 			pnt_plot(i,j,p.z+dz,r,oi);
 		}
 	}
 	else	for(long j=y1;j<=y2;j++)
 	{
-		x1 = int(p1.x+d.x*(j-p1.y)/d.y - pw - 3.5);
-		x2 = int(p1.x+d.x*(j-p1.y)/d.y + pw + 3.5);
+		x1 = int(p1.x+d.x*(j-p1.y)/d.y - pw - 10/dpw);
+		x2 = int(p1.x+d.x*(j-p1.y)/d.y + pw + 10/dpw);
 		x1=x1>dr->x1?x1:dr->x1;	x2=x2<dr->x2?x2:dr->x2;
 		if(x1>x2)	continue;
 
@@ -1202,9 +1203,9 @@ void mglCanvas::line_draw(const mglPnt &p1, const mglPnt &p2, const mglDrawReg *
 			register float u = dxu*xx+dyu*yy, v = dxv*xx+dyv*yy;	v = v*v;
 			if(u<0)			v += u*u;
 			else if(u>dd)	v += (u-dd)*(u-dd);
-			if(v>pw*pw)		continue;
+//			if(v>pw*pw)		continue;
 			if(!(pd & (1L<<long(fmod(pp+u/pw/1.5, 16)))))		continue;
-			p = p1+d*(u/dd);	col2int(p,r,oi);
+			mglPnt p(p1+d*(u/dd));	col2int(p,r,oi);
 			r[3] = v<(pw-1)*(pw-1)/4 ? 255 : mgl_sline(255,dpw*(sqrt(v)+(1-pw)/2));
 			pnt_plot(i,j,p.z+dz,r,oi);
 		}
@@ -1221,19 +1222,19 @@ void mglCanvas::pnt_fast(long x,long y,mreal z,const unsigned char ci[4], int ob
 void mglCanvas::fast_draw(const mglPnt &p1, const mglPnt &p2, const mglDrawReg *dr)
 {
 	if(p1.x==p2.x && p1.y==p2.y) return;
-	mglPnt d(p2-p1);
-	int oi = dr->ObjId;
+	const mglPnt d(p2-p1);
+	const int oi = dr->ObjId;
 	unsigned char r[4];	col2int(p1,r,oi);
 	long y1,x1,y2,x2;
 
-	bool hor = fabs(d.x)>fabs(d.y);
+	const bool hor = fabs(d.x)>fabs(d.y);
 
 	x1 = long(p1.x<p2.x?p1.x:p2.x);	y1 = long(p1.y<p2.y?p1.y:p2.y);	// bounding box
 	x2 = long(p1.x>p2.x?p1.x:p2.x);	y2 = long(p1.y>p2.y?p1.y:p2.y);
 	x1=x1>dr->x1?x1:dr->x1;	x2=x2<dr->x2?x2:dr->x2;
 	y1=y1>dr->y1?y1:dr->y1;	y2=y2<dr->y2?y2:dr->y2;
 	if(x1>x2 || y1>y2)	return;
-	float dz = Width>2 ? 1 : 1e-5*Width;		// provide additional height to be well visible on the surfaces
+	const float dz = Width>2 ? 1 : 1e-5*Width;	// provide additional height to be well visible on the surfaces
 
 	if(hor)	for(long i=x1;i<=x2;i++)
 	{
@@ -1258,8 +1259,8 @@ void mglCanvas::line_pix(long i, long j, const mglPnt &p1, const mglPnt &p2, con
 	register float u = dxu*xx+dyu*yy, v = dxv*xx+dyv*yy;	v = v*v;
 	if(u<0)			v += u*u;
 	else if(u>dd)	v += (u-dd)*(u-dd);
-	register float pw=dr->PenWidth, dpw=3;
-	if(dr->ObjId==HighId)	{	pw *= 2;	dpw=2;	}
+	register float pw=dr->PenWidth, dpw=3*pen_delta;
+	if(dr->ObjId==HighId)	{	pw *= 2;	dpw=2*pen_delta;	}
 	if(v>pw*pw || !(dr->PDef & ( 1L<<long(fmod(dr->pPos+u/pw/1.5, 16)) ) ))	return;
 	mglPnt p(p1+d*(u/dd));
 	unsigned char r[4];
@@ -1272,14 +1273,14 @@ void mglCanvas::line_pix(long i, long j, const mglPnt &p1, const mglPnt &p2, con
 void mglCanvas::pnt_draw(const mglPnt &p, const mglDrawReg *dr)
 {
 //	if(k<0 || !dr)	return;
-	float pw=3*dr->PenWidth,dpw=3;
-	int oi = dr->ObjId;
-	if(oi==HighId)	{	pw *= 2;	dpw=2;	}
+	const int oi = dr->ObjId;
+	const float pw=(oi==HighId?6:3)*dr->PenWidth,dpw=(oi==HighId?2:3)*pen_delta;
 	unsigned char cs[4], cc;
 	col2int(p,cs,oi);	cc = cs[3];
 	if(cc==0)	return;
-	long s = long(5.5+fabs(pw));
-	long i1=mgl_max(-s,dr->x1-p.x),i2=mgl_min(s,dr->x2-p.x), j1=mgl_max(-s,dr->y1-p.y),j2=mgl_min(s,dr->y2-p.y);
+	const long s = long(pw+10/dpw+fabs(pw));
+	const long i1=mgl_max(-s,dr->x1-p.x),i2=mgl_min(s,dr->x2-p.x);
+	const long j1=mgl_max(-s,dr->y1-p.y),j2=mgl_min(s,dr->y2-p.y);
 	if(!(Quality&3))	for(long j=j1;j<=j2;j++)	for(long i=i1;i<=i2;i++)	// fast draw
 	{
 		register float v = i*i+j*j;
@@ -1296,33 +1297,36 @@ void mglCanvas::pnt_draw(const mglPnt &p, const mglDrawReg *dr)
 //-----------------------------------------------------------------------------
 void mglCanvas::pnt_pix(long i, long j, const mglPnt &p, const mglDrawReg *dr)
 {
-	register float pw=3*dr->PenWidth,dpw=3;
-	if(dr->ObjId==HighId)	{	pw *= 2;	dpw=2;	}
+	register float pw=3*dr->PenWidth,dpw=3*pen_delta;
+	if(dr->ObjId==HighId)	{	pw *= 2;	dpw=2*pen_delta;	}
 	unsigned char cs[4];
 	col2int(p,cs,dr->ObjId);
 	register float xx = (i-p.x), yy = (j-p.y), v = xx*xx+yy*yy;
-	if(cs[3]==0 || v>(5.5+pw)*(5.5+pw))	return;
+	if(cs[3]==0 || v>(10/dpw+pw)*(10/dpw+pw))	return;
 	if(v<(pw-1)*(pw-1)/4)	cs[3] = mgl_sline(cs[3],dpw*(sqrt(v)+(1-pw)/2));
 	pnt_plot(i,j,p.z,cs,dr->ObjId);
 }
 //-----------------------------------------------------------------------------
 void mglCanvas::mark_draw(const mglPnt &q, char type, mreal size, mglDrawReg *d)
 {
-	int oi = d->ObjId;
-	unsigned char cs[4], ca;	col2int(q,cs,oi);	ca = cs[3];// = size>0 ? 255 : 255*q.t;
-	mreal ss=fabs(size), pw=1,dpw=3;
+	const int oi = d->ObjId;
+	unsigned char cs[4];	col2int(q,cs,oi);
+	const unsigned char ca = cs[3];// = size>0 ? 255 : 255*q.t;
+	const mreal ss=(strchr("xsSoO",type)?1:1.1)*fabs(size), dpw=(oi==HighId?2:3)*pen_delta;
+	mreal PW=1;
 
 	if(type=='.' || ss==0)
 	{
-		if(d)	pw = 3*(ss?ss:sqrt(font_factor/400));
-		register mreal dd = pw+3.5;
+		if(d)	PW = 3*(ss?ss:sqrt(font_factor/400));
+		if(oi==HighId)	PW *= 2;
+		const mreal pw = PW;
+		register mreal dd = pw+10/dpw;
 		long x1 = long(q.x-dd), y1 = long(q.y-dd);	// bounding box
 		long x2 = long(q.x+dd), y2 = long(q.y+dd);
 		x1=x1>d->x1?x1:d->x1;	x2=x2<d->x2?x2:d->x2;
 		y1=y1>d->y1?y1:d->y1;	y2=y2<d->y2?y2:d->y2;
 		if(x1>x2 || y1>y2)	return;
 
-		if(oi==HighId)	{	pw *= 2;	dpw=2;	}
 		for(long j=y1;j<=y2;j++)	for(long i=x1;i<=x2;i++)
 		{
 			register float dx=i-q.x, dy=j-q.y, v=dx*dx+dy*dy;
@@ -1336,13 +1340,13 @@ void mglCanvas::mark_draw(const mglPnt &q, char type, mreal size, mglDrawReg *d)
 		if(d)
 		{
 			d->PDef = MGL_SOLID_MASK;	d->angle = 0;
-			pw = d->PenWidth*sqrt(fabs(50*size));
-			if(pw<1)	pw=1;
+			PW = d->PenWidth*sqrt(fabs(50*size));
+			if(PW<1)	PW=1;
 		}
-		if(!strchr("xsSoO",type))	ss *= 1.1;
-		if(oi==HighId)	{	pw *= 2;	dpw=2;	}
+		if(oi==HighId)	PW *= 2;
+		const mreal pw = PW;
 
-		register mreal dd = ss+pw+3.5;
+		register mreal dd = ss+pw+10/dpw;
 		long x1 = long(q.x-dd), y1 = long(q.y-dd);	// bounding box
 		long x2 = long(q.x+dd), y2 = long(q.y+dd);
 		x1=x1>d->x1?x1:d->x1;	x2=x2<d->x2?x2:d->x2;
@@ -1811,7 +1815,7 @@ void mglCanvas::mark_pix(long i, long j, const mglPnt &q, char type, mreal size,
 				register float pw=d->PenWidth;
 				register float xx = (i-q.x), yy = (j-q.y), v = hypot(xx,yy);
 				v = (v-ss)*(v-ss);
-				if(v>pw*pw)	return;
+//				if(v>pw*pw)	return;
 				if(v>(pw-1)*(pw-1)/4)	cs[3] = mgl_sline(cs[3],2*(sqrt(v)+(1-pw)/2));
 				register float dz = Width>2 ? 1 : 1e-5*Width;		// provide additional height to be well visible on the surfaces
 				pnt_plot(i,j,q.z+dz,cs,d->ObjId);
@@ -1823,7 +1827,7 @@ void mglCanvas::mark_pix(long i, long j, const mglPnt &q, char type, mreal size,
 				register float pw=d->PenWidth;
 				register float xx = (i-q.x), yy = (j-q.y), v = hypot(xx,yy);
 				v = (v-ss)*(v-ss);
-				if(v>pw*pw)	return;
+//				if(v>pw*pw)	return;
 				if(v>(pw-1)*(pw-1)/4)	cs[3] = mgl_sline(cs[3],2*(sqrt(v)+(1-pw)/2));
 				register float dz = Width>2 ? 1 : 1e-5*Width;		// provide additional height to be well visible on the surfaces
 				pnt_plot(i,j,q.z+dz,cs,d->ObjId);
diff --git a/src/plot.cpp b/src/plot.cpp
index c0c6787..4226c31 100644
--- a/src/plot.cpp
+++ b/src/plot.cpp
@@ -511,15 +511,15 @@ void MGL_EXPORT mgl_area_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, c
 
 		nn.Set(-y->dvx(0,my),x->dvx(0,mx));
 		mglPoint p(x->v(0,mx),y->v(0,my),z->v(0,mz));
-		long n1 = gr->AddPnt(p,c1,nn,-1,11);	p.z = z0;
-		long n2 = gr->AddPnt(p,c2,nn,-1,11);
+		long n1 = gr->AddPnt(p,c1,nn,-1,27);	p.z = z0;
+		long n2 = gr->AddPnt(p,c2,nn,-1,27);
 		for(long i=1;i<n;i++)
 		{
 			long n3=n1, n4=n2;
 			nn.Set(-y->dvx(i,my),x->dvx(i,mx));
 			p.Set(x->v(i,mx),y->v(i,my),z->v(i,mz));
 			if(sh)	c2=c1=gr->NextColor(pal,i);
-			n1 = gr->AddPnt(p,c1,nn,-1,11);	p.z = z0;	n2 = gr->AddPnt(p,c2,nn,-1,11);
+			n1 = gr->AddPnt(p,c1,nn,-1,27);	p.z = z0;	n2 = gr->AddPnt(p,c2,nn,-1,27);
 			if(wire)
 			{
 				gr->line_plot(n1,n2);	gr->line_plot(n3,n4);
@@ -556,14 +556,14 @@ void MGL_EXPORT mgl_area_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char
 		mreal z0 = zm + (m-1-j)*(gr->Max.z-zm)/m;
 
 		mglPoint p(x->v(0,mx),y->v(0,my),z0);
-		long n1 = gr->AddPnt(p,c1,nn,-1,11);	p.y = y0;
-		long n2 = gr->AddPnt(p,c2,nn,-1,11);
+		long n1 = gr->AddPnt(p,c1,nn,-1,27);	p.y = y0;
+		long n2 = gr->AddPnt(p,c2,nn,-1,27);
 		for(long i=1;i<n;i++)
 		{
 			long n3=n1, n4=n2;
 			p.Set(x->v(i,mx),y->v(i,my),z0);
 			if(sh)	c2=c1=gr->NextColor(pal,i);
-			n1 = gr->AddPnt(p,c1,nn,-1,11);	p.y = y0;	n2 = gr->AddPnt(p,c2,nn,-1,11);
+			n1 = gr->AddPnt(p,c1,nn,-1,27);	p.y = y0;	n2 = gr->AddPnt(p,c2,nn,-1,27);
 			if(wire)
 			{
 				gr->line_plot(n1,n2);	gr->line_plot(n3,n4);
@@ -631,14 +631,14 @@ void MGL_EXPORT mgl_region_3d(HMGL gr, HCDT x1, HCDT y1, HCDT z1, HCDT x2, HCDT
 		long mz = (zhave && j<z1->GetNy()) ? j:0;
 		mreal z0 = zm + (m-1-j)*(gr->Max.z-zm)/m;
 
-		long n1 = gr->AddPnt(mglPoint(x1->v(0,mx),y1->v(0,my),zhave?z1->v(0,mz):z0),c1,nn,-1,11);
-		long n2 = gr->AddPnt(mglPoint(x2->v(0,mx),y2->v(0,my),zhave?z2->v(0,mz):z0),c2,nn,-1,11);
+		long n1 = gr->AddPnt(mglPoint(x1->v(0,mx),y1->v(0,my),zhave?z1->v(0,mz):z0),c1,nn,-1,27);
+		long n2 = gr->AddPnt(mglPoint(x2->v(0,mx),y2->v(0,my),zhave?z2->v(0,mz):z0),c2,nn,-1,27);
 		for(long i=1;i<n;i++)
 		{
 			long n3=n1, n4=n2;
 			if(sh)	c2=c1=gr->NextColor(pal,i);
-			n1 = gr->AddPnt(mglPoint(x1->v(i,mx),y1->v(i,my),zhave?z1->v(i,mz):z0),c1,nn,-1,11);
-			n2 = gr->AddPnt(mglPoint(x2->v(i,mx),y2->v(i,my),zhave?z2->v(i,mz):z0),c2,nn,-1,11);
+			n1 = gr->AddPnt(mglPoint(x1->v(i,mx),y1->v(i,my),zhave?z1->v(i,mz):z0),c1,nn,-1,27);
+			n2 = gr->AddPnt(mglPoint(x2->v(i,mx),y2->v(i,my),zhave?z2->v(i,mz):z0),c2,nn,-1,27);
 			gr->quad_plot(n1,n2,n3,n4);
 		}
 	}
@@ -670,16 +670,16 @@ void MGL_EXPORT mgl_region_xy(HMGL gr, HCDT x, HCDT y1, HCDT y2, const char *pen
 		mreal z0 = zm + (m-1-j)*(gr->Max.z-zm)/m;
 
 		mreal f1 = y1->v(0,j), f2 = y2->v(0,j), xx = x->v(0,mx);
-		long n1 = gr->AddPnt(mglPoint(xx,f1,z0),c1,nn,-1,11);
-		long n2 = gr->AddPnt(mglPoint(xx,f2,z0),c2,nn,-1,11);
+		long n1 = gr->AddPnt(mglPoint(xx,f1,z0),c1,nn,-1,27);
+		long n2 = gr->AddPnt(mglPoint(xx,f2,z0),c2,nn,-1,27);
 		for(long i=1;i<n;i++)
 		{
 			long n3=n1, n4=n2;
 			mreal f3=f1, f4=f2;
 			f1 = y1->v(i,j);	f2 = y2->v(i,j);	xx = x->v(i,mx);
 			if(sh)	c2=c1=gr->NextColor(pal,i);
-			n1 = gr->AddPnt(mglPoint(xx,f1,z0),c1,nn,-1,11);
-			n2 = gr->AddPnt(mglPoint(xx,f2,z0),c2,nn,-1,11);
+			n1 = gr->AddPnt(mglPoint(xx,f1,z0),c1,nn,-1,27);
+			n2 = gr->AddPnt(mglPoint(xx,f2,z0),c2,nn,-1,27);
 			if(!inside || (f2>f1 && f4>f3))	gr->quad_plot(n1,n2,n3,n4);
 		}
 	}
@@ -1327,10 +1327,10 @@ void MGL_EXPORT mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const c
 			{
 				mreal vx=x->v(i,mx), ve=ex->v(i,m1), vy=y->v(i,my), vf=ey->v(i,m2);
 				mreal c = sh ? gr->NextColor(pal,i):gr->CDef;
-				long n1 = gr->AddPnt(mglPoint(vx-ve, vy+vf, zVal),c,q,-1,11);
-				long n2 = gr->AddPnt(mglPoint(vx-ve, vy-vf, zVal),c,q,-1,11);
-				long n3 = gr->AddPnt(mglPoint(vx+ve, vy+vf, zVal),c,q,-1,11);
-				long n4 = gr->AddPnt(mglPoint(vx+ve, vy-vf, zVal),c,q,-1,11);
+				long n1 = gr->AddPnt(mglPoint(vx-ve, vy+vf, zVal),c,q,-1,27);
+				long n2 = gr->AddPnt(mglPoint(vx-ve, vy-vf, zVal),c,q,-1,27);
+				long n3 = gr->AddPnt(mglPoint(vx+ve, vy+vf, zVal),c,q,-1,27);
+				long n4 = gr->AddPnt(mglPoint(vx+ve, vy-vf, zVal),c,q,-1,27);
 				gr->line_plot(n1,n2);	gr->line_plot(n1,n3);
 				gr->line_plot(n4,n2);	gr->line_plot(n4,n3);
 			}
@@ -1338,10 +1338,10 @@ void MGL_EXPORT mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const c
 			{
 				mreal vx=x->v(i,mx), ve=ex->v(i,m1), vy=y->v(i,my), vf=ey->v(i,m2);
 				mreal c = sh ? gr->NextColor(pal,i):gr->CDef;
-				long n1 = gr->AddPnt(mglPoint(vx, vy+vf, zVal),c,q,-1,11);
-				long n2 = gr->AddPnt(mglPoint(vx-ve, vy, zVal),c,q,-1,11);
-				long n3 = gr->AddPnt(mglPoint(vx, vy-vf, zVal),c,q,-1,11);
-				long n4 = gr->AddPnt(mglPoint(vx+ve, vy, zVal),c,q,-1,11);
+				long n1 = gr->AddPnt(mglPoint(vx, vy+vf, zVal),c,q,-1,27);
+				long n2 = gr->AddPnt(mglPoint(vx-ve, vy, zVal),c,q,-1,27);
+				long n3 = gr->AddPnt(mglPoint(vx, vy-vf, zVal),c,q,-1,27);
+				long n4 = gr->AddPnt(mglPoint(vx+ve, vy, zVal),c,q,-1,27);
 				gr->line_plot(n1,n2);	gr->line_plot(n2,n3);
 				gr->line_plot(n3,n4);	gr->line_plot(n4,n1);
 			}
@@ -1354,7 +1354,7 @@ void MGL_EXPORT mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const c
 				{
 					n1 = n2;
 					n2 = gr->AddPnt(mglPoint(vx+ve*mgl_cos[(18*k)%360],
-							vy+vf*mgl_cos[(270+18*k)%360], zVal),c,q,-1,11);
+							vy+vf*mgl_cos[(270+18*k)%360], zVal),c,q,-1,27);
 					if(k>0)	gr->line_plot(n1,n2);
 				}
 			}
@@ -1365,10 +1365,10 @@ void MGL_EXPORT mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const c
 				{
 					mreal vx=x->v(i,mx), ve=ex->v(i,m1), vy=y->v(i,my), vf=ey->v(i,m2);
 					mreal c = sh ? gr->NextColor(pal,i):gr->CDef;
-					long n1 = gr->AddPnt(mglPoint(vx, vy+vf, zVal),c,q,-1,11);
-					long n2 = gr->AddPnt(mglPoint(vx-ve, vy, zVal),c,q,-1,11);
-					long n3 = gr->AddPnt(mglPoint(vx, vy-vf, zVal),c,q,-1,11);
-					long n4 = gr->AddPnt(mglPoint(vx+ve, vy, zVal),c,q,-1,11);
+					long n1 = gr->AddPnt(mglPoint(vx, vy+vf, zVal),c,q,-1,27);
+					long n2 = gr->AddPnt(mglPoint(vx-ve, vy, zVal),c,q,-1,27);
+					long n3 = gr->AddPnt(mglPoint(vx, vy-vf, zVal),c,q,-1,27);
+					long n4 = gr->AddPnt(mglPoint(vx+ve, vy, zVal),c,q,-1,27);
 					gr->line_plot(n1,n3);	gr->line_plot(n2,n4);
 				}	break;
 			case 'X':	case 'x':
@@ -1376,10 +1376,10 @@ void MGL_EXPORT mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const c
 				{
 					mreal vx=x->v(i,mx), ve=ex->v(i,m1), vy=y->v(i,my), vf=ey->v(i,m2);
 					mreal c = sh ? gr->NextColor(pal,i):gr->CDef;
-					long n1 = gr->AddPnt(mglPoint(vx-ve, vy+vf, zVal),c,q,-1,11);
-					long n2 = gr->AddPnt(mglPoint(vx-ve, vy-vf, zVal),c,q,-1,11);
-					long n3 = gr->AddPnt(mglPoint(vx+ve, vy+vf, zVal),c,q,-1,11);
-					long n4 = gr->AddPnt(mglPoint(vx+ve, vy-vf, zVal),c,q,-1,11);
+					long n1 = gr->AddPnt(mglPoint(vx-ve, vy+vf, zVal),c,q,-1,27);
+					long n2 = gr->AddPnt(mglPoint(vx-ve, vy-vf, zVal),c,q,-1,27);
+					long n3 = gr->AddPnt(mglPoint(vx+ve, vy+vf, zVal),c,q,-1,27);
+					long n4 = gr->AddPnt(mglPoint(vx+ve, vy-vf, zVal),c,q,-1,27);
 					gr->line_plot(n1,n4);	gr->line_plot(n2,n3);
 				}	break;
 			case 'S':
@@ -1387,10 +1387,10 @@ void MGL_EXPORT mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const c
 				{
 					mreal vx=x->v(i,mx), ve=ex->v(i,m1), vy=y->v(i,my), vf=ey->v(i,m2);
 					mreal c = sh ? gr->NextColor(pal,i):gr->CDef;
-					long n1 = gr->AddPnt(mglPoint(vx-ve, vy+vf, zVal),c,q,-1,11);
-					long n2 = gr->AddPnt(mglPoint(vx-ve, vy-vf, zVal),c,q,-1,11);
-					long n3 = gr->AddPnt(mglPoint(vx+ve, vy+vf, zVal),c,q,-1,11);
-					long n4 = gr->AddPnt(mglPoint(vx+ve, vy-vf, zVal),c,q,-1,11);
+					long n1 = gr->AddPnt(mglPoint(vx-ve, vy+vf, zVal),c,q,-1,27);
+					long n2 = gr->AddPnt(mglPoint(vx-ve, vy-vf, zVal),c,q,-1,27);
+					long n3 = gr->AddPnt(mglPoint(vx+ve, vy+vf, zVal),c,q,-1,27);
+					long n4 = gr->AddPnt(mglPoint(vx+ve, vy-vf, zVal),c,q,-1,27);
 					gr->quad_plot(n1,n2,n3,n4);
 				}	break;
 			case 'D':
@@ -1398,10 +1398,10 @@ void MGL_EXPORT mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const c
 				{
 					mreal vx=x->v(i,mx), ve=ex->v(i,m1), vy=y->v(i,my), vf=ey->v(i,m2);
 					mreal c = sh ? gr->NextColor(pal,i):gr->CDef;
-					long n1 = gr->AddPnt(mglPoint(vx, vy+vf, zVal),c,q,-1,11);
-					long n2 = gr->AddPnt(mglPoint(vx-ve, vy, zVal),c,q,-1,11);
-					long n3 = gr->AddPnt(mglPoint(vx, vy-vf, zVal),c,q,-1,11);
-					long n4 = gr->AddPnt(mglPoint(vx+ve, vy, zVal),c,q,-1,11);
+					long n1 = gr->AddPnt(mglPoint(vx, vy+vf, zVal),c,q,-1,27);
+					long n2 = gr->AddPnt(mglPoint(vx-ve, vy, zVal),c,q,-1,27);
+					long n3 = gr->AddPnt(mglPoint(vx, vy-vf, zVal),c,q,-1,27);
+					long n4 = gr->AddPnt(mglPoint(vx+ve, vy, zVal),c,q,-1,27);
 					gr->quad_plot(n1,n4,n2,n3);
 				}	break;
 			case 'O':
@@ -1414,7 +1414,7 @@ void MGL_EXPORT mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const c
 					{
 						n1 = n2;
 						n2 = gr->AddPnt(mglPoint(vx+ve*mgl_cos[(18*k)%360],
-								vy+vf*mgl_cos[(270+18*k)%360], zVal),c,q,-1,11);
+								vy+vf*mgl_cos[(270+18*k)%360], zVal),c,q,-1,27);
 						if(k>0)	gr->trig_plot(n1,n2,n3);
 					}
 				}	break;
@@ -1432,12 +1432,12 @@ void MGL_EXPORT mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const c
 			mreal c = sh ? gr->NextColor(pal,i):gr->CDef;
 			if(mk)	gr->mark_plot(gr->AddPnt(mglPoint(vx,vy,zVal),c), mk);
 
-			long n1 = gr->AddPnt(mglPoint(vx, vy+vf, zVal),c,q,-1,11);
-			long n2 = gr->AddPnt(mglPoint(vx, vy-vf, zVal),c,q,-1,11);
+			long n1 = gr->AddPnt(mglPoint(vx, vy+vf, zVal),c,q,-1,27);
+			long n2 = gr->AddPnt(mglPoint(vx, vy-vf, zVal),c,q,-1,27);
 			gr->line_plot(n1,n2);	gr->arrow_plot(n1,n2,'I');	gr->arrow_plot(n2,n1,'I');
 
-			n1 = gr->AddPnt(mglPoint(vx+ve, vy, zVal),-1,q,c,11);
-			n2 = gr->AddPnt(mglPoint(vx-ve, vy, zVal),-1,q,c,11);
+			n1 = gr->AddPnt(mglPoint(vx+ve, vy, zVal),-1,q,c,27);
+			n2 = gr->AddPnt(mglPoint(vx-ve, vy, zVal),-1,q,c,27);
 			gr->line_plot(n1,n2);	gr->arrow_plot(n1,n2,'I');	gr->arrow_plot(n2,n1,'I');
 		}
 	}
@@ -1581,7 +1581,7 @@ void MGL_EXPORT mgl_mark_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char
 	m = x->GetNy() > y->GetNy() ? x->GetNy() : y->GetNy();
 	m = z->GetNy() > m ? z->GetNy() : m;
 	char mk=gr->SetPenPal(pen,&pal);	gr->Reserve(n*m);
-	if(mk==0)	return;
+	if(mk==0)	mk='.';
 	bool sh = mglchr(pen,'!');
 
 	for(long j=0;j<m;j++)
@@ -1860,3 +1860,72 @@ void MGL_EXPORT mgl_tape_(uintptr_t *gr, uintptr_t *y,	const char *pen, const ch
 	char *o=new char[lo+1];		memcpy(o,opt,lo);	o[lo]=0;
 	mgl_tape(_GR_, _DA_(y),s,o);	delete []s;	delete []o;	}
 //-----------------------------------------------------------------------------
+//
+//	Pmap series
+//
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_pmap_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, const char *opt)
+{
+	long m,n=y->GetNx(),pal;
+	if(mgl_check_dim0(gr,x,y,z,r,"Mark"))	return;
+
+	gr->SaveState(opt);
+	static int cgid=1;	gr->StartGroup("Mark",cgid++);
+	m = x->GetNy() > y->GetNy() ? x->GetNy() : y->GetNy();
+	m = z->GetNy() > m ? z->GetNy() : m;
+	char mk=gr->SetPenPal(pen,&pal);	gr->Reserve(n*m);
+	if(mk==0)	mk='.';
+
+	for(long j=0;j<m;j++)
+	{
+		if(gr->NeedStop())	break;
+		gr->NextColor(pal);
+		long mx = j<x->GetNy() ? j:0, my = j<y->GetNy() ? j:0;
+		long mz = j<z->GetNy() ? j:0, mr = j<r->GetNy() ? j:0;
+		for(long i=0;i<n-1;i++)
+		{
+			mreal r1=r->v(i,mr), r2 = r->v(i+1,mr);
+			if(r1==0)	gr->mark_plot(gr->AddPnt(mglPoint(x->v(i,mx),y->v(i,my),z->v(i,mz))), mk);
+			if(r1*r2<0)
+			{
+				mreal d = r1/(r1-r2);
+				mglPoint p(x->v(i,mx)*(1-d)+x->v(i+1,mx)*d, y->v(i,my)*(1-d)+y->v(i+1,my)*d, z->v(i,mz)*(1-d)+d*z->v(i+1,mz));
+				gr->mark_plot(gr->AddPnt(p), mk);
+			}
+		}
+	}
+	gr->EndGroup();
+}
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_pmap_xy(HMGL gr, HCDT x, HCDT y, HCDT r, const char *pen, const char *opt)
+{
+	gr->SaveState(opt);
+	mglDataV z(y->GetNx());	z.Fill(gr->AdjustZMin());
+	mgl_pmap_xyz(gr,x,y,&z,r,pen,0);
+}
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_pmap(HMGL gr, HCDT y, HCDT r, const char *pen, const char *opt)
+{
+	register long n=y->GetNx();
+	gr->SaveState(opt);
+	mglDataV x(n), z(n);
+	x.Fill(gr->Min.x,gr->Max.x);	z.Fill(gr->AdjustZMin());
+	mgl_pmap_xyz(gr,&x,y,&z,r,pen,0);
+}
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_pmap_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
+{	char *s=new char[l+1];	memcpy(s,pen,l);	s[l]=0;
+	char *o=new char[lo+1];	memcpy(o,opt,lo);	o[lo]=0;
+	mgl_pmap_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(r),s,o);
+	delete []o;	delete []s;	}
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_pmap_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
+{	char *s=new char[l+1];	memcpy(s,pen,l);	s[l]=0;
+	char *o=new char[lo+1];	memcpy(o,opt,lo);	o[lo]=0;
+	mgl_pmap_xy(_GR_, _DA_(x), _DA_(y), _DA_(r),s,o);	delete []o;	delete []s;	}
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_pmap_(uintptr_t *gr, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
+{	char *s=new char[l+1];	memcpy(s,pen,l);	s[l]=0;
+	char *o=new char[lo+1];	memcpy(o,opt,lo);	o[lo]=0;
+	mgl_pmap(_GR_,_DA_(y),_DA_(r),s,o);	delete []o;	delete []s;	}
+//-----------------------------------------------------------------------------
diff --git a/src/prim.cpp b/src/prim.cpp
index 8d5c1f2..d62c086 100644
--- a/src/prim.cpp
+++ b/src/prim.cpp
@@ -918,7 +918,7 @@ void MGL_EXPORT mgl_logo(HMGL gr, long w, long h, const unsigned char *rgba, int
 		gr->Reserve(4*(w+1)*(h+1));
 		for(long j=0;j<h;j++)	for(long i=0;i<w;i++)
 		{
-			long i0 = 4*(w-1-i+w*j), k1,k2,k3,k4;
+			long i0 = 4*(i+w*(h-1-j)), k1,k2,k3,k4;
 			mglColor c(rgba[i0]/255.,rgba[i0+1]/255.,rgba[i0+2]/255.);
 			k1 = gr->AddPnt(mglPoint(x1+dx*i,y1+dy*j,z),0);	gr->SetRGBA(k1,c);
 			k2 = gr->AddPnt(mglPoint(x1+dx*(i+1),y1+dy*j,z),0);	gr->SetRGBA(k2,c);
@@ -934,7 +934,7 @@ void MGL_EXPORT mgl_logo(HMGL gr, long w, long h, const unsigned char *rgba, int
 		long *pos = new long[w*h];
 		for(long j=0;j<h;j++)	for(long i=0;i<w;i++)
 		{
-			long i0 = 4*(w-1-i+w*j), i1 = i+w*j;
+			long i0 = 4*(i+w*(h-1-j)), i1 = i+w*j;
 			pos[i1] = gr->AddPnt(mglPoint(x1+dx*i,y1+dy*j,z),0);
 			gr->SetRGBA(pos[i1],mglColor(rgba[i0]/255.,rgba[i0+1]/255.,rgba[i0+2]/255.));
 		}
@@ -963,3 +963,144 @@ void MGL_EXPORT mgl_logo_file_(uintptr_t *gr, const char *fname, int *smooth, co
 	char *f=new char[n+1];	memcpy(f,opt,n);	f[n]=0;
 	mgl_logo_file(_GR_,s,*smooth,f);	delete []s;		delete []f;	}
 //-----------------------------------------------------------------------------
+//
+//	Lamerey series
+//
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_lamerey(HMGL gr, double x0, double (*f)(double,void *), void *par, const char *stl, const char *opt)
+{
+	static int cgid=1;	gr->StartGroup("Lamerey",cgid++);
+	mreal r=gr->SaveState(opt);
+	double x=x0, dx = 1e-5*fabs(gr->Max.x-gr->Min.x);
+	long n = r>2 ? long(r+0.5):20, n1, n2;
+	gr->SetPenPal(stl);	gr->Reserve(6*n+1);
+	bool vect = mglchr(stl,'v');
+	n2 = gr->AddPnt(mglPoint(x,x,gr->Max.z));
+	if(!mglchr(stl,'~'))
+	{
+		n1 = gr->AddPnt(mglPoint(x,gr->GetOrgY('x'),gr->Max.z));
+		gr->line_plot(n1,n2);	if(vect)	gr->vect_plot(n1,n2,0.3*gr->GetArrowSize());
+	}
+	for(long i=0;i<n;i++)
+	{
+		x0 = x;		x = f(x0,par);
+		if(fabs(x-x0)<dx)	break;
+		n1=n2;	n2 = gr->AddPnt(mglPoint(x0,x,gr->Max.z));
+		gr->line_plot(n1,n2);	if(vect)	gr->vect_plot(n1,n2,0.3*gr->GetArrowSize());
+		n1=n2;	n2 = gr->AddPnt(mglPoint(x,x,gr->Max.z));
+		gr->line_plot(n1,n2);	if(vect)	gr->vect_plot(n1,n2,0.3*gr->GetArrowSize());
+	}
+	gr->EndGroup();
+}
+//-----------------------------------------------------------------------------
+struct mglDatSpl	{	HCDT d;	double x0,dx;	double y0,dy;	};
+double MGL_NO_EXPORT func_dat(double x, void *p)
+{	mglDatSpl *s = (mglDatSpl *)p;	return s->d->value((x-s->x0)*s->dx);	}
+void MGL_EXPORT mgl_lamerey_dat(HMGL gr, double x0, HCDT f, const char *stl, const char *opt)
+{
+	mreal r = gr->SaveState(opt);
+	char buf[64]="";	if(r>2)	sprintf(buf,"value %g",r);
+	mglDatSpl s;	s.d=f;	s.x0=gr->Min.x;	s.dx=f->GetNx()/(gr->Max.x-gr->Min.x);
+	mgl_lamerey(gr,x0,func_dat,&s,stl,buf);
+}
+//-----------------------------------------------------------------------------
+double MGL_NO_EXPORT func_str(double x, void *p)
+{	HMEX s = (HMEX)p;	return mgl_expr_eval(s,x,0,0);	}
+void MGL_EXPORT mgl_lamerey_str(HMGL gr, double x0, const char *f, const char *stl, const char *opt)
+{
+	HMEX eq = mgl_create_expr(f);
+	mgl_lamerey(gr,x0,func_str,eq,stl,opt);
+	mgl_delete_expr(eq);
+}
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_lamerey_dat_(uintptr_t *gr, double *x0, uintptr_t *f, const char *stl, const char *opt, int l,int n)
+{	char *s=new char[l+1];	memcpy(s,stl,l);	s[l]=0;
+	char *o=new char[n+1];	memcpy(o,opt,n);	o[n]=0;
+	mgl_lamerey_dat(_GR_,*x0,_DA_(f),s,o);	delete []s;	delete []o;	}
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_lamerey_str_(uintptr_t *gr, double *x0, const char *func, const char *stl, const char *opt, int m,int l,int n)
+{	char *s=new char[l+1];	memcpy(s,stl,l);	s[l]=0;
+	char *o=new char[n+1];	memcpy(o,opt,n);	o[n]=0;
+	char *f=new char[m+1];	memcpy(f,func,m);	f[m]=0;
+	mgl_lamerey_str(_GR_,*x0,f,s,o);	delete []f;	delete []s;	delete []o;	}
+//-----------------------------------------------------------------------------
+//
+//	Bifurcation series
+//
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_bifurcation(HMGL gr, double dx, double (*f)(double,double,void *), void *par, const char *stl, const char *opt)
+{
+	if((gr->Max.x-gr->Min.x)*dx<=0)	{	gr->SetWarn(mglWarnSlc,"Bifurcation");	return;	}
+	static int cgid=1;	gr->StartGroup("Bifurcation",cgid++);
+	mreal res=gr->SaveState(opt);
+	long n = res>2 ? long(res+0.5):1024, m=(gr->Max.x-gr->Min.x)/dx, m1=0,m2=0;
+	gr->SetPenPal(stl);	gr->Reserve(2*n*m);
+	double *v1=new double[n], *v2=new double[n], dd=0.1*fabs(gr->Max.y-gr->Min.y)/n;
+	double r = gr->Min.y+mgl_rnd()*(gr->Max.y-gr->Min.y), r0 = r;
+
+	bool fin=false;
+	for(long i=0;i<10*n;i++)	r = f(gr->Min.x,r,par);	// wait for loop stabilization
+	for(m1=0;m1<n;m1++)	// collect period information
+	{
+		r = f(gr->Min.x,r,par);
+		for(long j=0;j<m1;j++)	if(fabs(v1[j]-r)<dd)
+		{	fin=true;	break;	}
+		if(fin)	break;	v1[m1]=r;
+	}
+	for(mreal xx = gr->Min.x+dx;xx<=gr->Max.x;xx+=dx)
+	{
+		m2=m1;	memcpy(v2,v1,n*sizeof(double));	r=r0;
+		for(long i=0;i<10*n;i++)	r = f(xx,r,par);	// wait for loop stabilization
+		for(fin=false,m1=0;m1<n;m1++)	// collect period information
+		{
+			r = f(xx,r,par);
+			for(long j=0;j<m1;j++)	if(fabs(v1[j]-r)<dd)
+			{	fin=true;	break;	}
+			if(fin)	break;	v1[m1]=r;
+		}
+		if(m1>=m2)	for(long i=0;i<m1;i++)
+		{
+			double vv=v2[0], vi=v1[i];
+			for(long j=1;j<m2;j++)	if(fabs(v2[j]-vi)<fabs(vv-vi))	vv = v2[j];
+			gr->line_plot(gr->AddPnt(mglPoint(xx-dx,vv,gr->Max.z)), gr->AddPnt(mglPoint(xx,v1[i],gr->Max.z)));
+		}
+		else	for(long i=0;i<m1;i++)
+			gr->line_plot(gr->AddPnt(mglPoint(xx-dx,v1[i],gr->Max.z)), gr->AddPnt(mglPoint(xx,v1[i],gr->Max.z)));
+	}
+	gr->EndGroup();	delete []v1;	delete []v2;
+}
+//-----------------------------------------------------------------------------
+double MGL_NO_EXPORT bif_dat(double x, double y, void *p)
+{	mglDatSpl *s = (mglDatSpl *)p;	return s->d->value((x-s->x0)*s->dx, (y-s->y0)*s->dy);	}
+void MGL_EXPORT mgl_bifurcation_dat(HMGL gr, double dx, HCDT f, const char *stl, const char *opt)
+{
+	if(dx==0 || (gr->Max.x-gr->Min.x)*dx<0)	{	gr->SetWarn(mglWarnSlc,"Bifurcation");	return;	}
+	if(f->GetNy()<2)	{	gr->SetWarn(mglWarnLow,"Bifurcation");	return;	}
+	mreal r = gr->SaveState(opt);
+	char buf[64]="";	if(r>2)	sprintf(buf,"value %g",r);
+	mglDatSpl s;	s.d=f;
+	s.x0=gr->Min.x;	s.dx=f->GetNx()/(gr->Max.x-gr->Min.x);
+	s.y0=gr->Min.y;	s.dy=f->GetNy()/(gr->Max.y-gr->Min.y);
+	mgl_bifurcation(gr,dx,bif_dat,&s,stl,buf);
+}
+//-----------------------------------------------------------------------------
+double MGL_NO_EXPORT bif_str(double x, double y, void *p)
+{	HMEX s = (HMEX)p;	return mgl_expr_eval(s,x,y,0);	}
+void MGL_EXPORT mgl_bifurcation_str(HMGL gr, double dx, const char *f, const char *stl, const char *opt)
+{
+	HMEX eq = mgl_create_expr(f);
+	mgl_bifurcation(gr,dx,bif_str,eq,stl,opt);
+	mgl_delete_expr(eq);
+}
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_bifurcation_dat_(uintptr_t *gr, double *dx, uintptr_t *f, const char *stl, const char *opt, int l,int n)
+{	char *s=new char[l+1];	memcpy(s,stl,l);	s[l]=0;
+	char *o=new char[n+1];	memcpy(o,opt,n);	o[n]=0;
+	mgl_bifurcation_dat(_GR_,*dx,_DA_(f),s,o);	delete []s;	delete []o;	}
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_bifurcation_str_(uintptr_t *gr, double *dx, const char *func, const char *stl, const char *opt, int m,int l,int n)
+{	char *s=new char[l+1];	memcpy(s,stl,l);	s[l]=0;
+	char *o=new char[n+1];	memcpy(o,opt,n);	o[n]=0;
+	char *f=new char[m+1];	memcpy(f,func,m);	f[m]=0;
+	mgl_bifurcation_str(_GR_,*dx,f,s,o);	delete []f;	delete []s;	delete []o;	}
+//-----------------------------------------------------------------------------
diff --git a/src/s_hull/s_hull_pro.cpp b/src/s_hull/s_hull_pro.cpp
index 2ff4236..eb022b4 100644
--- a/src/s_hull/s_hull_pro.cpp
+++ b/src/s_hull/s_hull_pro.cpp
@@ -532,6 +532,10 @@ long s_hull_pro( std::vector<Shx> &pts, std::vector<Triad> &triads)
 
 			}
 
+	if (e1 < 0) {
+		// Cannot find visible point - it might be caused by numerical issues on some kind of datasets
+		return (-5);
+	}
 
 			// triangle pidx starts at e1 and ends at e2 (inclusive).
 			if( e2 < numh )
@@ -766,20 +770,31 @@ void circle_cent4(double r1,double c1, double r2,double c2, double r3,double c3,
 }
 
 
+namespace {
+
+/**
+ * Rounds the value given to the nearest multiple of the epsilon given
+ */
+double coarsen(const double value, const double epsilon) {
+	const double minimal_epsilon = std::numeric_limits<double>::epsilon() * value;
+	return (epsilon < minimal_epsilon) ? value : floor(value / epsilon + 0.5) * epsilon;
+}
+
+}
+
 /* test a set of points for duplicates.
 
    erase duplicate points, do not change point ids.
 
 */
 
-long de_duplicate( std::vector<Shx> &pts, std::vector<long> &outx ) {
-
+long de_duplicate( std::vector<Shx> &pts, std::vector<long> &outx, const Dupex epsilon ) {
 	long nump = (long) pts.size();
 	std::vector<Dupex> dpx;
 	Dupex d;
 	for( long k=0; k<nump; k++) {
-		d.r = pts[k].r;
-		d.c = pts[k].c;
+		d.r = coarsen(pts[k].r, epsilon.r);
+		d.c = coarsen(pts[k].c, epsilon.c);
 		d.id = k;
 		dpx.push_back(d);
 	}
diff --git a/src/s_hull/s_hull_pro.h b/src/s_hull/s_hull_pro.h
index ceb81b0..f9bb418 100644
--- a/src/s_hull/s_hull_pro.h
+++ b/src/s_hull/s_hull_pro.h
@@ -6,6 +6,7 @@
 #include <stdlib.h>
 #include <vector>
 #include <set>
+#include <limits>
 
 /*
 	for use in s_hull_pro.cpp
@@ -137,7 +138,7 @@ long T_flip_pro( std::vector<Shx> &pts, std::vector<Triad> &triads, std::vector<
 long T_flip_pro_idx( std::vector<Shx> &pts, std::vector<Triad> &triads, std::vector<long> &slump, std::set<long> &ids);
 
 long read_Shx(std::vector<Shx> &pts, char * fname);
-long de_duplicate( std::vector<Shx> &pts,  std::vector<long> &outx );
+long de_duplicate( std::vector<Shx> &pts,  std::vector<long> &outx, Dupex epsilon = Dupex(std::numeric_limits<float>::epsilon(),std::numeric_limits<float>::epsilon()) );
 long de_duplicateX( std::vector<Shx> &pts, std::vector<long> &outx,std::vector<Shx> &pts2 );
 long  test_center(Shx &pt0, Shx &pt1,Shx &pt2);
 
diff --git a/src/vect.cpp b/src/vect.cpp
index 9983da4..1e3c23a 100644
--- a/src/vect.cpp
+++ b/src/vect.cpp
@@ -21,7 +21,6 @@
 #include "mgl2/eval.h"
 #include "mgl2/data.h"
 #include "mgl2/base.h"
-#define MGL_FLOW_ACC	0.05	// accuracy of loop detection
 //-----------------------------------------------------------------------------
 //
 //	Traj series
@@ -72,7 +71,7 @@ void MGL_EXPORT mgl_traj_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay,
 				dd = dd ? sqrt(dx*dx+dy*dy+dz*dz)/dd : 0;
 			}
 			else dd = len;
-			gr->vect_plot(gr->AddPnt(p1), gr->AddPnt(p1+dd*p2,-1,mglPoint(NAN),-1,2));
+			gr->vect_plot(gr->AddPnt(p1), gr->AddPnt(p1+dd*p2,-1,mglPoint(NAN),-1,2),gr->GetArrowSize());
 		}
 	}
 	gr->EndGroup();
@@ -168,7 +167,7 @@ void MGL_EXPORT mgl_vect_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const cha
 			if(n1<0 && n2>=0)	n1=gr->AddPnt(p1,c1,mglPoint(NAN),-1,2);
 			if(n2<0 && n1>=0)	n2=gr->AddPnt(p2,c2,mglPoint(NAN),-1,2);
 			if(dot)	{	gr->line_plot(n1,n2);	gr->mark_plot(n1,'.');	}
-			else	gr->vect_plot(n1,n2);
+			else	gr->vect_plot(n1,n2,gr->GetArrowSize());
 		}
 	}
 	gr->EndGroup();
@@ -267,7 +266,7 @@ void MGL_EXPORT mgl_vect_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay,
 			if(n1<0 && n2>=0)	n1=gr->AddPnt(p1,c1,mglPoint(NAN),-1,2);
 			if(n2<0 && n1>=0)	n2=gr->AddPnt(p2,c2,mglPoint(NAN),-1,2);
 			if(dot)	{	gr->line_plot(n1,n2);	gr->mark_plot(n1,'.');	}
-			else	gr->vect_plot(n1,n2);
+			else	gr->vect_plot(n1,n2,gr->GetArrowSize());
 		}
 	}
 	gr->EndGroup();
@@ -469,7 +468,7 @@ void MGL_EXPORT mgl_vect3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay,
 		if(n1<0 && n2>=0)	n1=gr->AddPnt(p1,c1,mglPoint(NAN),-1,2);
 		if(n2<0 && n1>=0)	n2=gr->AddPnt(p2,c2,mglPoint(NAN),-1,2);
 		if(dot)	{	gr->line_plot(n1,n2);	gr->mark_plot(n1,'.');	}
-		else	gr->vect_plot(n1,n2);
+		else	gr->vect_plot(n1,n2,gr->GetArrowSize());
 	}
 	gr->EndGroup();
 }
@@ -501,26 +500,29 @@ void MGL_EXPORT mgl_vect3_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_
 //-----------------------------------------------------------------------------
 void MGL_NO_EXPORT flow(mglBase *gr, double zVal, double u, double v, const mglData &x, const mglData &y, const mglData &ax, const mglData &ay, long ss, bool vv)
 {
-	long n=10*(ax.nx+ax.ny);
+	long n=100*(ax.nx+ax.ny);
 	bool nboth = x.nx*x.ny!=ax.nx*ax.ny || y.nx*y.ny!=ax.nx*ax.ny;
 
 	mglPoint *pp = new mglPoint[n], dp;
 	mglPoint dx(1/fabs(gr->Max.x-gr->Min.x),1/fabs(gr->Max.y-gr->Min.y),1/fabs(gr->Max.z-gr->Min.z));
+	mglPoint nx(ax.nx,ax.ny);
 
-	mreal dt = 0.5/(ax.nx > ax.ny ? ax.nx : ax.ny),e,f,g,ff[4],gg[4],h,s=2;
+	mreal dt = 0.5/(ax.nx > ax.ny ? ax.nx : ax.ny),e,f,g,ff[4],gg[4],h,s=2,acc=dt/20;
 	if(u<0 || v<0)	{	dt = -dt;	u = -u;	v = -v;	s *= -1;}
-	register long k=0,m;
+	long k=0;
 	bool end = false;
 	if(nboth) do{
 		mglPoint dif;
 		pp[k].x = x.Spline1(dif,u,0,0);	f = ax.Spline1(u,v,0)/dif.x;
 		pp[k].y = y.Spline1(dif,v,0,0);	g = ay.Spline1(u,v,0)/dif.x;
 		pp[k].z = zVal;
-		for(m=0;m<k-1;m++)	// determines encircle
-			if(mgl_norm((pp[k]-pp[m])/dx)<dt*MGL_FLOW_ACC)	{	end = true;	break;	}
+		if(mgl_isbad(f+g))	end = true;
+		else	for(long m=0;m<k-1;m+=10)	// determines encircle
+			if(mgl_anorm((pp[k]-pp[m])/dx)<acc)	end = true;
+		if(end)	break;
 		h = hypot(f,g);	pp[k].c = gr->GetC(ss,s*h);
 		if(h<1e-5)	break;	// stationary point
-		k++;
+		if(k==0 || mgl_anorm((pp[k]-pp[k-1])/nx)>=1)	k++;
 		// find next point by midpoint method
 		h+=1;	ff[0]=f*dt/h;	gg[0]=g*dt/h;
 		e = u+ff[0]/2;	h = v+gg[0]/2;
@@ -543,16 +545,18 @@ void MGL_NO_EXPORT flow(mglBase *gr, double zVal, double u, double v, const mglD
 	else do{
 		mglPoint dif;
 		register mreal xu,xv,yu,yv,det,xx,yy;
-			pp[k].x = x.Spline1(dif,u,v,0);	xu=dif.x;	xv=dif.y;
-			pp[k].y = y.Spline1(dif,u,v,0);	yu=dif.x;	yv=dif.y;
-			xx = ax.Spline1(u,v,0);	yy = ay.Spline1(u,v,0);
-			det = xv*yu-xu*yv;	f = (yy*xv-xx*yv)/det;	g = (xx*yu-yy*xu)/det;
+		pp[k].x = x.Spline1(dif,u,v,0);	xu=dif.x;	xv=dif.y;
+		pp[k].y = y.Spline1(dif,u,v,0);	yu=dif.x;	yv=dif.y;
+		xx = ax.Spline1(u,v,0);	yy = ay.Spline1(u,v,0);
+		det = xv*yu-xu*yv;	f = (yy*xv-xx*yv)/det;	g = (xx*yu-yy*xu)/det;
 		pp[k].z = zVal;
-		for(m=0;m<k-1;m++)	// determines encircle
-			if(mgl_norm((pp[k]-pp[m])/dx)<dt*MGL_FLOW_ACC)	{	end = true;	break;	}
+		if(mgl_isbad(f+g))	end = true;
+		else	for(long m=0;m<k-1;m+=10)	// determines encircle
+			if(mgl_anorm((pp[k]-pp[m])/dx)<acc)	end = true;
+		if(end)	break;
 		h = hypot(f,g);	pp[k].c = gr->GetC(ss,s*h);
 		if(h<1e-5)	break;	// stationary point
-		k++;
+		if(k==0 || mgl_anorm((pp[k]-pp[k-1])/nx)>=1)	k++;
 		// find next point by midpoint method
 		h+=1;	ff[0]=f*dt/h;	gg[0]=g*dt/h;
 		e = u+ff[0]/2;	h = v+gg[0]/2;
@@ -580,15 +584,15 @@ void MGL_NO_EXPORT flow(mglBase *gr, double zVal, double u, double v, const mglD
 	} while(!end);
 	if(k>1)
 	{
-		long j,a=long(1./fabs(dt));
+		long j,a=long(0.3*gr->GetArrowSize()/fabs(dt));
 		gr->Reserve(k);		j = gr->AddPnt(pp[0],pp[0].c);
 		for(long i=1;i<k;i++)
 		{
 			long jj=j;	j = gr->AddPnt(pp[i],pp[i].c);
 			if(vv && i%a==0)
 			{
-				if(dt<0)	gr->vect_plot(j,jj,a/5);
-				else		gr->vect_plot(jj,j,a/5);
+				if(dt<0)	gr->vect_plot(j,jj,a/3);
+				else		gr->vect_plot(jj,j,a/3);
 			}
 			else	gr->line_plot(jj,j);
 		}
@@ -615,7 +619,6 @@ void MGL_EXPORT mgl_flow_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const cha
 	{
 		if(gr->NeedStop())	break;
 		if(ax->GetNz()>1)	zVal = gr->Min.z+(gr->Max.z-gr->Min.z)*mreal(k)/(ax->GetNz()-1);
-//#pragma omp parallel for collapse(2)
 		for(long i=0;i<num;i++)	for(int s=-1;s<=1;s+=2)
 		{
 			mreal u,v;
@@ -730,29 +733,32 @@ void MGL_EXPORT mgl_flowp_2d_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, ui
 //-----------------------------------------------------------------------------
 void flow(mglBase *gr, double u, double v, double w, const mglData &x, const mglData &y, const mglData &z, const mglData &ax, const mglData &ay, const mglData &az,long ss,bool vv, bool xo, bool zo)
 {
-	static long n=10*(ax.nx+ax.ny);
+	static long n=100*(ax.nx+ax.ny+ax.nz);
 	long nn = ax.nx*ax.ny*ax.nz;
 	bool nboth = x.nx*x.ny*x.nz!=nn || y.nx*y.ny*y.nz!=nn || z.nx*z.ny*z.nz!=nn;
 	mglPoint *pp = new mglPoint[n], dp;
 	mglPoint dx(1/fabs(gr->Max.x-gr->Min.x),1/fabs(gr->Max.y-gr->Min.y),1/fabs(gr->Max.z-gr->Min.z));
+	mglPoint nx(ax.nx,ax.ny,ax.nz);
 
 	nn = (ax.nx > ax.ny ? ax.nx : ax.ny);
 	nn = (nn > ax.nz ? nn : ax.nz);
-	mreal dt = 0.2/nn, e,f,g,ee[4],ff[4],gg[4],h,s=2,u1,v1,w1;
+	mreal dt = 0.2/nn, e,f,g,ee[4],ff[4],gg[4],h,s=2,u1,v1,w1,acc=dt/20;
 	if(u<0 || v<0 || w<0)
 	{	dt = -dt;	u = -u;	v = -v;	w = -w;	s *= -1;}
-	register long k=0,m;
+	long k=0;
 	bool end = false;
 	if(nboth) do{
 		mglPoint dif;
 		pp[k].x = x.Spline1(dif,u,0,0);	e = ax.Spline1(u,v,w)/dif.x;
 		pp[k].y = y.Spline1(dif,v,0,0);	f = ay.Spline1(u,v,w)/dif.x;
 		pp[k].z = z.Spline1(dif,w,0,0);	g = az.Spline1(u,v,w)/dif.x;
-		for(m=0;m<k-1;m++)	// determines encircle
-			if(mgl_norm((pp[k]-pp[m])/dx)<dt*MGL_FLOW_ACC)	{	end = true;	break;	}
+		if(mgl_isbad(e+f+g))	end = true;
+		else	for(long m=0;m<k-1;m+=10)	// determines encircle
+			if(mgl_anorm((pp[k]-pp[m])/dx)<acc)	end = true;
+		if(end)	break;
 		h = sqrt(e*e+f*f+g*g);	pp[k].c = gr->GetC(ss,s*h);
 		if(h<1e-5)	break;	// stationary point
-		k++;
+		if(k==0 || mgl_anorm((pp[k]-pp[k-1])/nx)>=1)	k++;
 		// find next point by midpoint method
 		h+=1;	ee[0]=e*dt/h;	ff[0]=f*dt/h;	gg[0]=g*dt/h;
 		u1 = u+ee[0]/2;	v1 = v+ff[0]/2;	w1 = w+gg[0]/2;
@@ -790,11 +796,13 @@ void flow(mglBase *gr, double u, double v, double w, const mglData &x, const mgl
 		e = (-xv*yw*zz+xw*yv*zz+xv*yy*zw-xx*yv*zw-xw*yy*zv+xx*yw*zv)/det;
 		f = (xu*yw*zz-xw*yu*zz-xu*yy*zw+xx*yu*zw+xw*yy*zu-xx*yw*zu)/det;
 		g = (-xu*yv*zz+xv*yu*zz+xu*yy*zv-xx*yu*zv-xv*yy*zu+xx*yv*zu)/det;
-		for(m=0;m<k-1;m++)	// determines encircle
-			if(mgl_norm((pp[k]-pp[m])/dx)<dt/10.)	{	end = true;	break;	}
+		if(mgl_isbad(e+f+g))	end = true;
+		else	for(long m=0;m<k-1;m+=10)	// determines encircle
+			if(mgl_anorm((pp[k]-pp[m])/dx)<acc)	end = true;
+		if(end)	break;
 		h = sqrt(e*e+f*f+g*g);	pp[k].c = gr->GetC(ss,s*h);
 		if(h<1e-5)	break;	// stationary point
-		k++;
+		if(k==0 || mgl_anorm((pp[k]-pp[k-1])/nx)>=1)	k++;
 		// find next point by midpoint method
 		h+=1;	ee[0]=e*dt/h;	ff[0]=f*dt/h;	gg[0]=g*dt/h;
 		u1 = u+ee[0]/2;	v1 = v+ff[0]/2;	w1 = w+gg[0]/2;
@@ -835,14 +843,14 @@ void flow(mglBase *gr, double u, double v, double w, const mglData &x, const mgl
 	} while(!end);
 	if(k>1)
 	{
-		long j,a=long(1./fabs(dt));
-		mreal rr = mgl_norm(gr->Max-gr->Min)*gr->BarWidth/25, ll;
+		long j,a=long(gr->GetArrowSize()/fabs(dt));
+		mreal rr = mgl_anorm(gr->Max-gr->Min)*gr->BarWidth/25, ll;
 		mglPoint q1,q2,l;
 		long n1=-1,n2=-1,n3=-1,n4=-1;
 
 		gr->Reserve(4*k);	j = gr->AddPnt(pp[0],pp[0].c);
-		l = pp[1] - pp[0];	l /= mgl_norm(l);
-		q1.Set(l.y,-l.x,0);	ll = mgl_norm(q1);
+		l = pp[1] - pp[0];	l /= mgl_anorm(l);
+		q1.Set(l.y,-l.x,0);	ll = mgl_anorm(q1);
 		if(ll)	q1 /= ll;	else	q1.Set(0,1,0);
 		q2 = q1^l;
 		if(xo)	{	n1 = gr->AddPnt(pp[0],-1,q2);	n2 = gr->AddPnt(pp[0]+rr*q1,-1,q2);	}
@@ -852,12 +860,12 @@ void flow(mglBase *gr, double u, double v, double w, const mglData &x, const mgl
 			long jj=j;	j = gr->AddPnt(pp[i],pp[i].c);
 			if(vv && i%a==0)
 			{
-				if(dt<0)	gr->vect_plot(j,jj,a/5);
-				else		gr->vect_plot(jj,j,a/5);
+				if(dt<0)	gr->vect_plot(j,jj,a/3);
+				else		gr->vect_plot(jj,j,a/3);
 			}
 			else	gr->line_plot(jj,j);
-			l = pp[i]-pp[i-1];		l /= mgl_norm(l);
-			q1 -= l*(l*q1);	q1/= mgl_norm(q1);	q2 = q1^l;
+			l = pp[i]-pp[i-1];		l /= mgl_anorm(l);
+			q1 -= l*(l*q1);	q1/= mgl_anorm(q1);	q2 = q1^l;
 			long m1 = n1, m2 = n2, m3 = n3, m4 = n4;
 			if(xo)
 			{	n1 = gr->AddPnt(pp[i],-1,q2);	n2 = gr->AddPnt(pp[i]+rr*q1,-1,q2);	gr->quad_plot(n1,n2,m1,m2);	}
@@ -880,7 +888,6 @@ void MGL_EXPORT mgl_flow_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay,
 	bool vv = mglchr(sch,'v'), xo = mglchr(sch,'x'), zo = mglchr(sch,'z');
 
 	mglData xx(x), yy(y), zz(z), bx(ax), by(ay), bz(az);
-//#pragma omp parallel for collapse(3)
 	for(long i=0;i<num;i++)	for(long j=0;j<num;j++)	for(int s=-1;s<=1;s+=2)
 	{
 		mreal u,v,w;
@@ -1072,29 +1079,32 @@ void MGL_EXPORT mgl_grad_(uintptr_t *gr, uintptr_t *ph, const char *sch, const c
 //-----------------------------------------------------------------------------
 void MGL_NO_EXPORT flowr(mglBase *gr, double zVal, double u, double v, const mglData &x, const mglData &y, const mglData &ax, const mglData &ay, double r0,long sc)
 {
-	long n=10*(ax.nx+ax.ny);
+	long n=100*(ax.nx+ax.ny);
 	bool nboth = x.nx*x.ny!=ax.nx*ax.ny || y.nx*y.ny!=ax.nx*ax.ny;
 
 	mglPoint *pp = new mglPoint[n], dp;
 	mreal *cc = new mreal[n];
 	mglPoint dx(1/fabs(gr->Max.x-gr->Min.x),1/fabs(gr->Max.y-gr->Min.y),1/fabs(gr->Max.z-gr->Min.z));
+	mglPoint nx(ax.nx,ax.ny);
 
-	mreal dt = 0.5/(ax.nx > ax.ny ? ax.nx : ax.ny),e,f,g,ff[4],gg[4],h,s=2;
+	mreal dt = 0.5/(ax.nx > ax.ny ? ax.nx : ax.ny),e,f,g,ff[4],gg[4],h,s=2,acc=dt/20;
 	mreal ss = 16./mgl_ipow(gr->Max.c - gr->Min.c,2);
 	if(u<0 || v<0)	{	dt = -dt;	u = -u;	v = -v;	s *= -1;}
-	register long k=0,m;
+	long k=0;
 	bool end = false;
 	if(nboth) do{
 		mglPoint dif;
 		pp[k].x = x.Spline1(dif,u,0,0);	f = ax.Spline1(u,v,0)/dif.x;
 		pp[k].y = y.Spline1(dif,v,0,0);	g = ay.Spline1(u,v,0)/dif.x;
 		pp[k].z = zVal;
-		for(m=0;m<k-1;m++)	// determines encircle
-			if(mgl_norm((pp[k]-pp[m])/dx)<dt*MGL_FLOW_ACC)	{	end = true;	break;	}
+		if(mgl_isbad(f+g))	end = true;
+		else	for(long m=0;m<k-1;m+=10)	// determines encircle
+			if(mgl_anorm((pp[k]-pp[m])/dx)<acc)	end = true;
+		if(end)	break;
 		h = hypot(f,g);	cc[k] = gr->GetC(sc,s*h);
 		pp[k].c = r0>0 ? r0*sqrt(1e-2+ss*h*h)/2 : -r0/sqrt(1e-2+ss*h*h)/5;
 		if(h<1e-5)	break;	// stationary point
-		k++;
+		if(k==0 || mgl_anorm((pp[k]-pp[k-1])/nx)>=1)	k++;
 		// find next point by midpoint method
 		h+=1;	ff[0]=f*dt/h;	gg[0]=g*dt/h;
 		e = u+ff[0]/2;	h = v+gg[0]/2;
@@ -1122,12 +1132,14 @@ void MGL_NO_EXPORT flowr(mglBase *gr, double zVal, double u, double v, const mgl
 			xx = ax.Spline1(u,v,0);	yy = ay.Spline1(u,v,0);
 			det = xv*yu-xu*yv;	f = (yy*xv-xx*yv)/det;	g = (xx*yu-yy*xu)/det;
 		pp[k].z = zVal;
-		for(m=0;m<k-1;m++)	// determines encircle
-			if(mgl_norm((pp[k]-pp[m])/dx)<dt*MGL_FLOW_ACC)	{	end = true;	break;	}
+		if(mgl_isbad(f+g))	end = true;
+		else	for(long m=0;m<k-1;m+=10)	// determines encircle
+			if(mgl_anorm((pp[k]-pp[m])/dx)<acc)	end = true;
+		if(end)	break;
 		h = hypot(f,g);	cc[k] = gr->GetC(sc,s*h);
 		pp[k].c = r0>0 ? r0*sqrt(1e-2+ss*h*h)/2 : -r0/sqrt(1e-2+ss*h*h)/5;
 		if(h<1e-5)	break;	// stationary point
-		k++;
+		if(k==0 || mgl_anorm((pp[k]-pp[k-1])/nx)>=1)	k++;
 		// find next point by midpoint method
 		h+=1;	ff[0]=f*dt/h;	gg[0]=g*dt/h;
 		e = u+ff[0]/2;	h = v+gg[0]/2;
@@ -1211,7 +1223,6 @@ void MGL_EXPORT mgl_pipe_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const cha
 	{
 		if(gr->NeedStop())	break;
 		if(ax->GetNz()>1)	zVal = gr->Min.z+(gr->Max.z-gr->Min.z)*mreal(k)/(ax->GetNz()-1);
-//#pragma omp parallel for collapse(2)
 		for(long i=0;i<num;i++)	for(int s=-1;s<=1;s+=2)
 		{
 			mreal u,v;
@@ -1260,33 +1271,36 @@ void MGL_EXPORT mgl_pipe_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const
 //-----------------------------------------------------------------------------
 void flowr(mglBase *gr, double u, double v, double w, const mglData &x, const mglData &y, const mglData &z, const mglData &ax, const mglData &ay, const mglData &az, double r0,long sc)
 {
-	static long n=10*(ax.nx+ax.ny);
+	static long n=100*(ax.nx+ax.ny+ax.nz);
 	long nn = ax.nx*ax.ny*ax.nz;
 	bool nboth = x.nx*x.ny*x.nz!=nn || y.nx*y.ny*y.nz!=nn || z.nx*z.ny*z.nz!=nn;
 	mglPoint *pp = new mglPoint[n], dp;
 	mreal *cc = new mreal[n];
 	mglPoint dx(1/fabs(gr->Max.x-gr->Min.x),1/fabs(gr->Max.y-gr->Min.y),1/fabs(gr->Max.z-gr->Min.z));
+	mglPoint nx(ax.nx,ax.ny,ax.nz);
 
 	nn = (ax.nx > ax.ny ? ax.nx : ax.ny);
 	nn = (nn > ax.nz ? nn : ax.nz);
-	mreal dt = 0.2/nn, e,f,g,ee[4],ff[4],gg[4],h,s=2,u1,v1,w1;
+	mreal dt = 0.2/nn, e,f,g,ee[4],ff[4],gg[4],h,s=2,u1,v1,w1,acc=dt/20;
 	mreal ss = 16./mgl_ipow(gr->Max.c - gr->Min.c,2);
 
 	if(u<0 || v<0 || w<0)
 	{	dt = -dt;	u = -u;	v = -v;	w = -w;	s *= -1;}
-	register long k=0,m;
+	long k=0;
 	bool end = false;
 	if(nboth) do{
 		mglPoint dif;
 		pp[k].x = x.Spline1(dif,u,0,0);	e = ax.Spline1(u,v,w)/dif.x;
 		pp[k].y = y.Spline1(dif,v,0,0);	f = ay.Spline1(u,v,w)/dif.x;
 		pp[k].z = z.Spline1(dif,w,0,0);	g = az.Spline1(u,v,w)/dif.x;
-		for(m=0;m<k-1;m++)	// determines encircle
-			if(mgl_norm((pp[k]-pp[m])/dx)<dt*MGL_FLOW_ACC)	{	end = true;	break;	}
+		if(mgl_isbad(e+f+g))	end = true;
+		else	for(long m=0;m<k-1;m+=10)	// determines encircle
+			if(mgl_anorm((pp[k]-pp[m])/dx)<acc)	end = true;
+		if(end)	break;
 		h = sqrt(e*e+f*f+g*g);	cc[k] = gr->GetC(sc,s*h);
 		pp[k].c = r0>0 ? r0*sqrt(1e-2+ss*h*h)/2 : -r0/sqrt(1e-2+ss*h*h)/5;
 		if(h<1e-5)	break;	// stationary point
-		k++;
+		if(k==0 || mgl_anorm((pp[k]-pp[k-1])/nx)>=1)	k++;
 		// find next point by midpoint method
 		h+=1;	ee[0]=e*dt/h;	ff[0]=f*dt/h;	gg[0]=g*dt/h;
 		u1 = u+ee[0]/2;	v1 = v+ff[0]/2;	w1 = w+gg[0]/2;
@@ -1324,12 +1338,14 @@ void flowr(mglBase *gr, double u, double v, double w, const mglData &x, const mg
 		e = (-xv*yw*zz+xw*yv*zz+xv*yy*zw-xx*yv*zw-xw*yy*zv+xx*yw*zv)/det;
 		f = (xu*yw*zz-xw*yu*zz-xu*yy*zw+xx*yu*zw+xw*yy*zu-xx*yw*zu)/det;
 		g = (-xu*yv*zz+xv*yu*zz+xu*yy*zv-xx*yu*zv-xv*yy*zu+xx*yv*zu)/det;
-		for(m=0;m<k-1;m++)	// determines encircle
-			if(mgl_norm((pp[k]-pp[m])/dx)<dt/10.)	{	end = true;	break;	}
+		if(mgl_isbad(e+f+g))	end = true;
+		else	for(long m=0;m<k-1;m+=10)	// determines encircle
+			if(mgl_anorm((pp[k]-pp[m])/dx)<acc)	end = true;
+		if(end)	break;
 		h = sqrt(e*e+f*f+g*g);	cc[k] = gr->GetC(sc,s*h);
 		pp[k].c = r0>0 ? r0*sqrt(1e-2+ss*h*h)/2 : -r0/sqrt(1e-2+ss*h*h)/5;
 		if(h<1e-5)	break;	// stationary point
-		k++;
+		if(k==0 || mgl_anorm((pp[k]-pp[k-1])/nx)>=1)	k++;
 		// find next point by midpoint method
 		h+=1;	ee[0]=e*dt/h;	ff[0]=f*dt/h;	gg[0]=g*dt/h;
 		u1 = u+ee[0]/2;	v1 = v+ff[0]/2;	w1 = w+gg[0]/2;
@@ -1420,7 +1436,6 @@ void MGL_EXPORT mgl_pipe_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay,
 	bool cnt=!mglchr(sch,'#');
 
 	mglData xx(x), yy(y), zz(z), bx(ax), by(ay), bz(az);
-//#pragma omp parallel for collapse(3)
 	for(long i=0;i<num;i++)	for(long j=0;j<num;j++)	for(int s=-1;s<=1;s+=2)
 	{
 		mreal u,v,w;
diff --git a/src/volume.cpp b/src/volume.cpp
index d36b11e..f7b3ca0 100644
--- a/src/volume.cpp
+++ b/src/volume.cpp
@@ -643,7 +643,11 @@ void MGL_EXPORT mgl_beam_val(HMGL gr, double val, HCDT tr, HCDT g1, HCDT g2, HCD
 			}
 		if(flag & 2)
 #pragma omp parallel for collapse(2)
-			for(j=0;j<m;j++)	for(k=0;k<l;k++)	x.a[i0] = hypot(x.a[i0],y.a[i0]);
+			for(j=0;j<m;j++)	for(k=0;k<l;k++)
+			{
+				long i0 = j+m*(k+l*i);
+				x.a[i0] = hypot(x.a[i0],y.a[i0]);
+			}
 	}
 	mgl_surf3_xyz_val(gr,val,&x,&y,&z,&b,stl,0);
 }
diff --git a/todo.txt b/todo.txt
index 4104713..24dd1d8 100644
--- a/todo.txt
+++ b/todo.txt
@@ -21,6 +21,7 @@
 19. Simplified triangle filling for Quality=1 ?!?
 20. Extend 'ask' by adding multiple questions simultaneously (+ set/get default values from file ???)
 21. Occasional seg.fault in mgl_qt_example at exit
+22. \overline{\overline{a}} ???
 
 
 ============= NEW FEATURES =============
@@ -39,18 +40,43 @@
 8. Contour lines for bilinear interpolation (strong saddle-like faces)
 9. More accurate face cutting if one partially out of axis ranges
 
-17. Iris plot -- https://en.wikipedia.org/wiki/Iris_flower_data_set
+10. Direct export to MP4 ?!!
+11. Iris plot -- https://en.wikipedia.org/wiki/Iris_flower_data_set
+12. Parallel drawing in QMathGL.
+13. CMAKE + COMPONENTS ???
+14. mglQt, nglFLTK -- add 2-3 callback functions+toolbuttons+hotkeys for user(s)
 
 ZZ. Update *.i for new functions {before release!!!}
 
 
 ============= DOCUMENTATION =============
 
-A. Paper about MathGL!!!
+A. Paper about MathGL!!! 6099610006
 B. Add chapter with real samples
 C. Translate to Russian everything
 D. Docs about JS interface
 
+1. Docs + sample about Pmap() -- Poincare map
+2. Docs + sample about Lamerey() -- Lamerey diagram
+3. Docs + sample about Bifurcation() -- Bifurcation diagram
+4. Docs + sample about Pulse() -- see pulse.mgl
+	new a 100 'exp(-6*x^2)'
+	xrange 0 a.nx-1:yrange 0 1
+	axis:plot a
+
+	pulse b a 'x'
+
+	line b(1) 0 b(1) 1 'r='
+	line b(1)-b(3)/2 0  b(1)-b(3)/2 1 'm|'
+	line b(1)+b(3)/2 0  b(1)+b(3)/2 1 'm|'
+	line 0 0.5 a.nx-1 0.5 'h'
+	new x 100 'x'
+	plot b(0)*(1-((x-b(1))/b(2))^2) 'g'
+5. Docs about MGL commands: 'print' and 'echo'
+6. Docs about mgl_pen_delta(), SetPenDelta(), 'pen_delta'
+7. Option to rewrite in 'savehdf'
+8. Docs about MGL command 'fscanf'
+9. About "#undef I"
 
 YY. Sample like http://pyxplot.org.uk/examples/05ap/02hlines/index.html using Stem()
 
@@ -69,6 +95,9 @@ YY. Sample like http://pyxplot.org.uk/examples/05ap/02hlines/index.html using St
 
 4. List of constants into the list of data?!
 5. Add color cycle ???
+6. Color position in color scheme dialog
+7. QML ???
+8, Changable panels???
 
 
 ============= UNSURE ===========
diff --git a/udav/CMakeLists.txt b/udav/CMakeLists.txt
index 274ae10..9ccc07b 100644
--- a/udav/CMakeLists.txt
+++ b/udav/CMakeLists.txt
@@ -31,20 +31,18 @@ endif(MGL_HAVE_GSL)
 if(enable-qt5)
 	include(../cmake-qt5.txt)
 	qt5_add_resources(udav_rc_src ${udav_rc} )
-	qt5_wrap_cpp(udav_moc_src ${udav_moc_hdr} )
 else(enable-qt5)
 	include(../cmake-qt4.txt)
 	qt4_add_resources(udav_rc_src ${udav_rc} )
-	qt4_wrap_cpp(udav_moc_src ${udav_moc_hdr} )
 endif(enable-qt5)
-add_executable(udav ${udav_src} ${udav_moc_src} ${udav_rc_src})
+add_executable(udav ${udav_src} ${udav_moc_hdr} ${udav_rc_src})
 #set_target_properties(udav PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
 if(enable-qt5)
 	target_link_libraries(udav mgl-qt5)
-	qt5_use_modules(udav Core Widgets Gui PrintSupport)
+	qt5_use_modules(udav ${MGL_QT5_LIBS})
 else(enable-qt5)
 	target_link_libraries(udav mgl-qt4)
-	target_link_libraries(udav ${QT_LIBRARIES})
+	qt4_use_modules(udav ${MGL_QT4_LIBS})
 endif(enable-qt5)
 
 if(MGL_HAVE_PTHREAD)
diff --git a/udav/prop_dlg.cpp b/udav/prop_dlg.cpp
index 1ebfebd..09ddf5c 100644
--- a/udav/prop_dlg.cpp
+++ b/udav/prop_dlg.cpp
@@ -32,6 +32,7 @@
 #include <QSettings>
 #include <QDir>
 //-----------------------------------------------------------------------------
+#include <mgl2/qmathgl.h>
 #include "prop_dlg.h"
 #include "udav_wnd.h"
 #include "plot_pnl.h"
@@ -43,12 +44,13 @@ extern int defFontSize;
 extern QString pathHelp;
 extern bool mglAutoExecute;
 extern bool mglAutoSave;
-extern bool mglAutoPure;
+// extern bool mglAutoPure;
 extern bool mglCompleter;
 extern bool editPosBottom;
 extern bool loadInNewWnd;
 extern bool mglHighlight;
 extern bool mglDotsRefr;
+extern bool mglWheelZoom;
 int defWidth, defHeight;
 QString pathFont;
 QString lang[]={"","ru"};
@@ -161,8 +163,10 @@ PropDialog::PropDialog(QWidget *parent) : QDialog(parent)
 	load->setChecked(loadInNewWnd);	v->addWidget(load);
 	save = new QCheckBox(tr("Automatically save before redrawing (F5)"), this);
 	save->setChecked(mglAutoSave);	v->addWidget(save);
-	pure = new QCheckBox(tr("Disable face drawing (faster) for mouse rotation/shift/zoom."), this);
-	pure->setChecked(mglAutoPure);	v->addWidget(pure);	pure->setEnabled(false);
+//	pure = new QCheckBox(tr("Disable face drawing (faster) for mouse rotation/shift/zoom."), this);
+//	pure->setChecked(mglAutoPure);	v->addWidget(pure);	pure->setEnabled(false);
+	wheel = new QCheckBox(tr("Enable mouse wheel for zooming."), this);
+	wheel->setChecked(mglWheelZoom);	v->addWidget(wheel);
 	cmpl = new QCheckBox(tr("Enable keywords completition"), this);
 	cmpl->setChecked(mglCompleter);	v->addWidget(cmpl);
 	high = new QCheckBox(tr("Highlight current object(s)"), this);
@@ -231,9 +235,10 @@ void PropDialog::applyChanges()
 	loadInNewWnd = load->isChecked();
 	mglAutoSave = save->isChecked();
 	mglHighlight = high->isChecked();
-	mglAutoPure = pure->isChecked();
+// 	mglAutoPure = pure->isChecked();
 	mglCompleter = cmpl->isChecked();
 	mglDotsRefr = dots->isChecked();
+	mglWheelZoom = wheel->isChecked();
 
 	// apply changes for all windows
 #ifdef WIN32
@@ -248,6 +253,7 @@ void PropDialog::applyChanges()
 			if(ok)	{	s->writeSettings();	ok = false;	}
 			s->edit->setEditorFont();
 			s->graph->setMGLFont(pathFont);
+			s->graph->mgl->enableWheel = mglWheelZoom;
 			s->setEditPos(editPosBottom);
 			s->edit->setCompleter(mglCompleter);
 			s->update();
diff --git a/udav/prop_dlg.h b/udav/prop_dlg.h
index 22b58e3..193aaef 100644
--- a/udav/prop_dlg.h
+++ b/udav/prop_dlg.h
@@ -56,7 +56,7 @@ private:
 	void setC(int k);
 	QLabel *lbl;
 	QPushButton *cb[10];
-	QCheckBox *run, *edt, *load, *save, *pure, *cmpl, *high, *dots;
+	QCheckBox *run, *edt, *load, *save, *cmpl, *high, *dots, *wheel;	//, *pure;
 	QLineEdit *hlp, *defW, *defH;
 	QFont defFont;
 	QColor cc[10];
diff --git a/udav/qmglsyntax.cpp b/udav/qmglsyntax.cpp
index c088d98..1534a49 100644
--- a/udav/qmglsyntax.cpp
+++ b/udav/qmglsyntax.cpp
@@ -114,7 +114,7 @@ MessSyntax::MessSyntax(QTextEdit *textEdit) : QSyntaxHighlighter(textEdit)	{}
 //-----------------------------------------------------------------------------
 void MessSyntax::highlightBlock(const QString &text)
 {
-	if(text.left(7) == ("In line"))
+	if(text.contains("in line "))
 		setFormat(0, text.length(), QColor(255,0,0));
 }
 //-----------------------------------------------------------------------------
diff --git a/udav/text_pnl.cpp b/udav/text_pnl.cpp
index 3ff5462..293c10b 100644
--- a/udav/text_pnl.cpp
+++ b/udav/text_pnl.cpp
@@ -78,6 +78,8 @@ TextPanel::TextPanel(QWidget *parent) : QWidget(parent)
 	defFontSize = int(edit->fontPointSize());
 	edit->setLineWrapMode(QTextEdit::NoWrap);
 	setCompleter(mglCompleter);
+	QFontMetrics metrics(edit->currentFont());
+	edit->setTabStopWidth(4 * metrics.width(' '));
 
 	menu = new QMenu(tr("Edit"),this);
 	QBoxLayout *v = new QVBoxLayout(this);
@@ -256,7 +258,12 @@ void TextPanel::addStyle()
 }
 //-----------------------------------------------------------------------------
 void TextPanel::setEditorFont(QFont *f)
-{	edit->setFont(f ? *f : QFont(defFontFamily, defFontSize));	}
+{
+	QFont d(defFontFamily, defFontSize);
+	edit->setFont(f ? *f : d);
+	QFontMetrics metrics(f ? *f : d);
+	edit->setTabStopWidth(4 * metrics.width(' '));
+}
 //-----------------------------------------------------------------------------
 QString TextPanel::selection()
 {	return edit->textCursor().block().text();	}
@@ -453,7 +460,7 @@ void TextPanel::load(const QString &fileName)
 			graph->mgl->primitives = str.section("#----- End of QMathGL block -----\n",0,0);
 			str = str.section("#----- End of QMathGL block -----\n",1);
 		}
-		
+
 		if(narg>0)	setCurrentFile(fileName.left(fileName.length()-3)+"mgl");
 		edit->setText(str);
 		graph->animParseText(edit->toPlainText());
diff --git a/udav/textedit.cpp b/udav/textedit.cpp
index ff16d95..7a04610 100644
--- a/udav/textedit.cpp
+++ b/udav/textedit.cpp
@@ -39,6 +39,7 @@
  ****************************************************************************/
 
 #include "textedit.h"
+#include <string.h>
 #include <QCompleter>
 #include <QKeyEvent>
 #include <QAbstractItemView>
@@ -49,12 +50,22 @@
 #include <QScrollBar>
 #include <QPainter>
 #include <QTextBlock>
+#include <QAbstractTextDocumentLayout>
+
 extern QColor mglColorScheme[10];
 //-----------------------------------------------------------------------------
 TextEdit::TextEdit(QWidget *parent) : QTextEdit(parent)
 {
 	c=0;
 	connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(highlight()));
+	// Line numbers
+	lineNumberArea = new LineNumberArea(this);
+	connect(document(), SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberAreaWidth(int)));
+	connect(document(), SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberArea(int)));
+	connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(updateLineNumberArea(int)));
+	connect(this, SIGNAL(textChanged()), this, SLOT(updateLineNumberArea()));
+	connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(updateLineNumberArea()));
+	updateLineNumberAreaWidth(0);
 }
 //-----------------------------------------------------------------------------
 void TextEdit::highlight()
@@ -149,3 +160,166 @@ void TextEdit::keyPressEvent(QKeyEvent *e)
 	c->complete(cr); // popup it up!
 }
 //-----------------------------------------------------------------------------
+//
+//	Line numbering (slightly modified code of Gauthier Boaglio)
+//	Original: https://stackoverflow.com/questions/2443358/how-to-add-lines-numbers-to-qtextedit/
+//
+//-----------------------------------------------------------------------------
+int TextEdit::lineNumberAreaWidth()
+{
+	int digits = 1;
+	int max = qMax(1, document()->blockCount());
+	while (max >= 10)	{	max /= 10;	++digits;	}
+	int space = 13 +  fontMetrics().width(QLatin1Char('9')) * (digits);
+	return space;
+}
+//-----------------------------------------------------------------------------
+void TextEdit::updateLineNumberAreaWidth(int /* newBlockCount */)
+{	setViewportMargins(lineNumberAreaWidth(), 0, 0, 0);	}
+//-----------------------------------------------------------------------------
+void TextEdit::updateLineNumberArea(QRectF /*rect_f*/)
+{	TextEdit::updateLineNumberArea();	}
+//-----------------------------------------------------------------------------
+void TextEdit::updateLineNumberArea(int /*slider_pos*/)
+{	TextEdit::updateLineNumberArea();	}
+//-----------------------------------------------------------------------------
+void TextEdit::updateLineNumberArea()
+{
+	/* When the signal is emitted, the sliderPosition has been adjusted according to the action,
+	 * but the value has not yet been propagated (meaning the valueChanged() signal was not yet emitted),
+	 * and the visual display has not been updated. In slots connected to this signal you can thus safely
+	 * adjust any action by calling setSliderPosition() yourself, based on both the action and the
+	 * slider's value. */
+	// Make sure the sliderPosition triggers one last time the valueChanged() signal with the actual value !!!!
+	verticalScrollBar()->setSliderPosition(verticalScrollBar()->sliderPosition());
+
+	// Since "QTextEdit" does not have an "updateRequest(...)" signal, we chose
+	// to grab the imformations from "sliderPosition()" and "contentsRect()".
+	// See the necessary connections used (Class constructor implementation part).
+
+	QRect rect =  contentsRect();
+	lineNumberArea->update(0, rect.y(), lineNumberArea->width(), rect.height());
+	updateLineNumberAreaWidth(0);
+	//----------
+	int dy = verticalScrollBar()->sliderPosition();
+	if (dy > -1) {
+		lineNumberArea->scroll(0, dy);
+	}
+
+	// Addjust slider to alway see the number of the currently being edited line...
+	int first_block_id = getFirstVisibleBlockId();
+	if (first_block_id == 0 || textCursor().block().blockNumber() == first_block_id-1)
+		verticalScrollBar()->setSliderPosition(dy-document()->documentMargin());
+}
+//-----------------------------------------------------------------------------
+void TextEdit::resizeEvent(QResizeEvent *e)
+{
+	QTextEdit::resizeEvent(e);
+	QRect cr = contentsRect();
+	lineNumberArea->setGeometry(QRect(cr.left(), cr.top(), lineNumberAreaWidth(), cr.height()));
+}
+//-----------------------------------------------------------------------------
+int TextEdit::getFirstVisibleBlockId()
+{
+	// Detect the first block for which bounding rect - once translated
+	// in absolute coordinated - is contained by the editor's text area
+
+	// Costly way of doing but since "blockBoundingGeometry(...)" doesn't
+	// exists for "QTextEdit"...
+
+	QTextCursor curs = QTextCursor(document());
+	curs.movePosition(QTextCursor::Start);
+	for(int i=0; i < document()->blockCount(); ++i)
+	{
+		QTextBlock block = curs.block();
+
+		QRect r1 = viewport()->geometry();
+		QRect r2 = document()->documentLayout()->blockBoundingRect(block).translated(
+					viewport()->geometry().x(), viewport()->geometry().y() - (
+						verticalScrollBar()->sliderPosition()
+						) ).toRect();
+
+		if (r1.contains(r2, true)) { return i; }
+
+		curs.movePosition(QTextCursor::NextBlock);
+	}
+
+	return 0;
+}
+//-----------------------------------------------------------------------------
+void TextEdit::lineNumberAreaPaintEvent(QPaintEvent *event)
+{
+	verticalScrollBar()->setSliderPosition(verticalScrollBar()->sliderPosition());
+
+	QPainter painter(lineNumberArea);
+	painter.fillRect(event->rect(), Qt::lightGray);
+	int blockNumber = getFirstVisibleBlockId();
+
+	QTextBlock block = document()->findBlockByNumber(blockNumber);
+	QTextBlock prev_block = (blockNumber > 0) ? document()->findBlockByNumber(blockNumber-1) : block;
+	int translate_y = (blockNumber > 0) ? -verticalScrollBar()->sliderPosition() : 0;
+
+	int top = viewport()->geometry().top();
+
+	// Adjust text position according to the previous "non entirely visible" block
+	// if applicable. Also takes in consideration the document's margin offset.
+	int additional_margin;
+	if (blockNumber == 0)	// Simply adjust to document's margin
+		additional_margin = (int) document()->documentMargin() -1 - verticalScrollBar()->sliderPosition();
+	else	// Getting the height of the visible part of the previous "non entirely visible" block
+		additional_margin = (int) document()->documentLayout()->blockBoundingRect(prev_block)
+				.translated(0, translate_y).intersected(viewport()->geometry()).height();
+	top += additional_margin;	// Shift the starting point
+
+	int bottom = top + (int) document()->documentLayout()->blockBoundingRect(block).height();
+
+	QColor colErr(255, 0, 0);	// Error line
+	QColor colCur(0, 128, 255);	// Current line
+	QColor colDef(0,0,0);		// Other lines
+
+	// Draw the numbers (displaying the current line number in green)
+	while (block.isValid() && top <= event->rect().bottom())
+	{
+		if (block.isVisible() && bottom >= event->rect().top())
+		{
+			QString number = QString::number(blockNumber + 1);
+			painter.setPen(QColor(120, 120, 120));
+			painter.setPen((textCursor().blockNumber() == blockNumber) ? colCur :
+										(isErrLine(blockNumber+1)?colErr:colDef) );
+			painter.drawText(-5, top, lineNumberArea->width(), fontMetrics().height(), Qt::AlignRight, number);
+		}
+
+		block = block.next();
+		top = bottom;
+		bottom = top + (int) document()->documentLayout()->blockBoundingRect(block).height();
+		blockNumber++;
+	}
+}
+//-----------------------------------------------------------------------------
+bool TextEdit::isErrLine(int line) const
+{
+	for(size_t i=0;i<err.size();i++)	if(err[i]==line)	return true;
+	return false;
+}
+//-----------------------------------------------------------------------------
+void TextEdit::setErrMessage(const QString &mess)
+{
+	err.clear();
+	const char *s = mess.toStdString().c_str();
+	s = strstr(s,"in line ");
+	while(s)
+	{
+		err.push_back(atoi(s+8));
+		s = strstr(s+8,"in line ");
+	}
+}
+//-----------------------------------------------------------------------------
+LineNumberArea::LineNumberArea(TextEdit *editor) : QWidget(editor)
+{	codeEditor = editor;	}
+//-----------------------------------------------------------------------------
+QSize LineNumberArea::sizeHint() const
+{	return QSize(codeEditor->lineNumberAreaWidth(), 0);	}
+//-----------------------------------------------------------------------------
+void LineNumberArea::paintEvent(QPaintEvent *event)
+{	codeEditor->lineNumberAreaPaintEvent(event);	}
+//-----------------------------------------------------------------------------
diff --git a/udav/textedit.h b/udav/textedit.h
index 85b9c12..6a54db9 100644
--- a/udav/textedit.h
+++ b/udav/textedit.h
@@ -52,19 +52,46 @@ public:
 	TextEdit(QWidget *parent = 0);
 	void setCompleter(QCompleter *c);
 	QCompleter *completer() const {	return c;	}
-	
+	int getFirstVisibleBlockId();
+	void lineNumberAreaPaintEvent(QPaintEvent *event);
+	int lineNumberAreaWidth();
+
+public slots:
+	void resizeEvent(QResizeEvent *e);
+	void setErrMessage(const QString &s);
+
 protected:
 	void keyPressEvent(QKeyEvent *e);
 	void focusInEvent(QFocusEvent *e);
-	
+	bool isErrLine(int line) const;
+
 private slots:
 	void insertCompletion(const QString &completion);
 	void highlight();
+	void updateLineNumberAreaWidth(int newBlockCount);
+	void updateLineNumberArea(QRectF /*rect_f*/);
+	void updateLineNumberArea(int /*slider_pos*/);
+	void updateLineNumberArea();
 
 private:
 	QString textUnderCursor() const;
 	QCompleter *c;
+	QWidget *lineNumberArea;
+	std::vector<int> err;
 };
 //-----------------------------------------------------------------------------
+class LineNumberArea : public QWidget
+{
+	Q_OBJECT
+public:
+	LineNumberArea(TextEdit *editor);
+	QSize sizeHint() const;
+protected:
+	void paintEvent(QPaintEvent *event);
+private:
+	TextEdit *codeEditor;
+};
+
+//-----------------------------------------------------------------------------
 #endif // TEXTEDIT_H
 //-----------------------------------------------------------------------------
diff --git a/udav/udav.desktop b/udav/udav.desktop
index 3565b80..4c06fe3 100755
--- a/udav/udav.desktop
+++ b/udav/udav.desktop
@@ -4,9 +4,10 @@ Type=Application
 Terminal=false
 Icon=udav
 Name=UDAV
-Exec=udav
+Exec=udav %f
 MimeType=text/mgl;
 Comment=Data handling and plotting tool
 Comment[en_US]=Data handling and plotting tool
 Comment[ru_RU]=Обработка и отображение данных
 Categories=Education;Science;Math;
+Keywords=Visualization;Data;Array;
\ No newline at end of file
diff --git a/udav/udav_wnd.cpp b/udav/udav_wnd.cpp
index 66087cd..9ce96a6 100644
--- a/udav/udav_wnd.cpp
+++ b/udav/udav_wnd.cpp
@@ -53,9 +53,10 @@ bool editPosBottom = false;
 bool mglAutoSave = false;
 bool mglHighlight = true;
 bool mglDotsRefr = true;
-bool mglAutoPure = true;
+// bool mglAutoPure = true;
 bool mglCompleter = true;
 bool loadInNewWnd = false;
+bool mglWheelZoom = false;
 QString pathHelp;
 extern mglParse parser;
 extern QColor mglColorScheme[10];
@@ -132,6 +133,7 @@ int main(int argc, char **argv)
 		mw->load(codec->toUnicode(argv[1]), true);
 	}
 	mw->show();
+	mw->edit->edit->setFocus();
 	a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
 	if(showHint)	udavShowHint(mw);
 	return a.exec();
@@ -161,7 +163,7 @@ MainWindow::MainWindow(QWidget *wp) : QMainWindow(wp)
 	rtab->setMovable(true);	rtab->setTabPosition(QTabWidget::South);
 
 	messWnd = new QDockWidget(tr("Messages and warnings"),this);
-	mess = new TextEdit(this);	messWnd->setWidget(mess);
+	mess = new QTextEdit(this);	messWnd->setWidget(mess);
 	messWnd->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
 	addDockWidget(Qt::BottomDockWidgetArea, messWnd);
 	messWnd->resize(size().width(), 0);	new MessSyntax(mess);
@@ -217,6 +219,7 @@ MainWindow::MainWindow(QWidget *wp) : QMainWindow(wp)
 	edit = new TextPanel(this);	edit->graph = graph;
 	graph->textMGL = edit->edit;
 	connect(graph->mgl,SIGNAL(showWarn(QString)),mess,SLOT(setText(QString)));
+	connect(graph->mgl,SIGNAL(showWarn(QString)),edit->edit,SLOT(setErrMessage(QString)));
 	connect(graph,SIGNAL(clearWarn()),mess,SLOT(clear()));
 	ltab->addTab(edit,QPixmap(":/png/text-plain.png"),tr("Script"));
 
@@ -471,12 +474,13 @@ void MainWindow::writeSettings()
 	settings.setValue("/autoSave",  mglAutoSave);
 	settings.setValue("/highlight",  mglHighlight);
 	settings.setValue("/dotsRefresh", mglDotsRefr);
-	settings.setValue("/autoPure",  mglAutoPure);
+// 	settings.setValue("/autoPure",  mglAutoPure);
 	settings.setValue("/editAtTop", editPosBottom);
 	settings.setValue("/fontFamily", defFontFamily);
 	settings.setValue("/fontSize", defFontSize);
 	settings.setValue("/loadInNewWnd", loadInNewWnd);
 	settings.setValue("/completer",  mglCompleter);
+	settings.setValue("/wheelZoom",  mglWheelZoom);
 	settings.endGroup();
 }
 //-----------------------------------------------------------------------------
@@ -506,18 +510,20 @@ void MainWindow::readSettings()
 	mglColorScheme[7] = QColor(settings.value("/colFCKeyword","#007F7F").toString());
 	mglColorScheme[8] = QColor(settings.value("/colReserved", "#0000FF").toString());
 	mglColorScheme[9] = QColor(settings.value("/colCurrLine", "#FFFFCC").toString());
-	mglAutoSave = settings.value("/autoSave",  false).toBool();
-	mglHighlight = settings.value("/highlight",  true).toBool();
-	mglAutoPure = settings.value("/autoPure",  true).toBool();
-	mglAutoExecute = settings.value("/autoExec",  true).toBool();
+	mglAutoSave = settings.value("/autoSave", false).toBool();
+	mglHighlight = settings.value("/highlight", true).toBool();
+// 	mglAutoPure = settings.value("/autoPure", true).toBool();
+	mglAutoExecute = settings.value("/autoExec", true).toBool();
 	editPosBottom = settings.value("/editAtTop", false).toBool();
-	mglCompleter = settings.value("/completer",  true).toBool();
+	mglCompleter = settings.value("/completer", true).toBool();
+	mglWheelZoom = settings.value("/wheelZoom", false).toBool();
 	loadInNewWnd = settings.value("/loadInNewWnd", false).toBool();
 	mglDotsRefr = settings.value("/dotsRefresh", true).toBool();
 	defFontFamily = settings.value("/fontFamily", "Georgia").toString();
 	defFontSize = settings.value("/fontSize", 10).toInt();
 	edit->setEditorFont();	setEditPos(editPosBottom);
 	graph->setMGLFont(pathFont);
+	graph->mgl->enableWheel = mglWheelZoom;
 
 	defWidth = settings.value("/defWidth", 640).toInt();
 	defHeight = settings.value("/defHeight", 480).toInt();
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index b6e5bea..8b04bf1 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -24,11 +24,11 @@ if(enable-qt)
 	if(enable-qt5)
 		include(../cmake-qt5.txt)
 		target_link_libraries(mglview mgl-qt5)
-		qt5_use_modules(mglview Core Widgets Gui PrintSupport)
+		qt5_use_modules(mglview ${MGL_QT5_LIBS})
 	else(enable-qt5)
 		include(../cmake-qt4.txt)
 		target_link_libraries(mglview mgl-qt4)
-		target_link_libraries(mglview ${QT_LIBRARIES})
+		qt4_use_modules(mglview ${MGL_QT4_LIBS})
 	endif(enable-qt5)
 
 	install(
diff --git a/utils/make_bin.cpp b/utils/make_bin.cpp
index ac9a44c..44d25ee 100644
--- a/utils/make_bin.cpp
+++ b/utils/make_bin.cpp
@@ -24,11 +24,10 @@ int main(int argc, char *argv[])
 {
 	mglFont fnt;
 	std::string path, base, fname;
-	char ch;
 
 	while(1)
 	{
-		ch = getopt(argc, argv, "p:o:h");
+		int ch = getopt(argc, argv, "p:o:h");
 		if(ch=='p')	path = optarg;
 		else if(ch=='o')	fname = optarg;
 		else if(ch=='h' || (ch==-1 && optind>=argc))
@@ -39,11 +38,10 @@ int main(int argc, char *argv[])
 				"\t-p path      set specific path for base font files\n"
 				"\t-o fname     set output filename (use ${base}.vfmb by default)\n"
 				"\t-h           print this message\n" );
-			ch = 'h';	break;
+			return 0;
 		}
 		else if(ch==-1 && optind<argc)	{	base = argv[optind];	break;	}
 	}
-	if(ch=='h')	return 0;
 	if(fname.empty())	fname = base + ".vfmb";
 	fnt.Load(base.c_str(),path.c_str());
 	size_t size = fnt.SaveBin(fname.c_str());
diff --git a/utils/mglconv.cpp b/utils/mglconv.cpp
index c547722..14ae65e 100644
--- a/utils/mglconv.cpp
+++ b/utils/mglconv.cpp
@@ -28,14 +28,14 @@ int main(int argc, char *argv[])
 	mgl_suppress_warn(true);
 	mglGraph gr;
 	mglParse p(true);
-	char ch, buf[2048], iname[256]="", oname[256]="";
+	char buf[2048], iname[256]="", oname[256]="";
 	std::vector<std::wstring> var;
 	std::wstring str;
 	bool none=false;
 
 	while(1)
 	{
-		ch = getopt(argc, argv, "1:2:3:4:5:6:7:8:9:hno:L:C:A:s:S:q:");
+		int ch = getopt(argc, argv, "1:2:3:4:5:6:7:8:9:hno:L:C:A:s:S:q:");
 		if(ch>='1' && ch<='9')	p.AddParam(ch-'0', optarg);
 		else if(ch=='s')
 		{
@@ -89,13 +89,12 @@ int main(int argc, char *argv[])
 				"\t-C n1:n2     add animation value in range [n1,n2] with step 1\n"
 				"\t-            get script from standard input\n"
 				"\t-h           print this message\n" );
-			ch = 'h';	break;
+			return 0;
 		}
 		else if(ch=='o')	strncpy(oname, optarg,256);
 		else if(ch==-1 && optind<argc)
 		{	strncpy(iname, argv[optind][0]=='-'?"":argv[optind],256);	break;	}
 	}
-	if(ch=='h')	return 0;
 	if(*oname==0)	{	strncpy(oname,*iname?iname:"out",250);	strcat(oname,".png");	}
 	else	none = false;
 
diff --git a/utils/mglview.cpp b/utils/mglview.cpp
index 8264492..a34e55b 100644
--- a/utils/mglview.cpp
+++ b/utils/mglview.cpp
@@ -39,11 +39,11 @@ int show(mglGraph *gr)
 //-----------------------------------------------------------------------------
 int main(int argc, char **argv)
 {
-	char ch, iname[256]="";
+	char iname[256]="";
 	mgl_suppress_warn(true);
 	while(1)
 	{
-		ch = getopt(argc, argv, "1:2:3:4:5:6:7:8:9:hL:s:");
+		int ch = getopt(argc, argv, "1:2:3:4:5:6:7:8:9:hL:s:");
 		if(ch>='1' && ch<='9')	p.AddParam(ch-'0', optarg);
 		else if(ch=='s')
 		{
@@ -69,12 +69,11 @@ int main(int argc, char **argv)
 				"\t-L loc       set locale to loc\n"
 				"\t-            get script from standard input\n"
 				"\t-h           print this message\n" );
-			ch = 'h';	break;
+			return 0;
 		}
 		else if(ch==-1 && optind<argc)
 		{	strncpy(iname, argv[optind][0]=='-'?"":argv[optind],256);	break;	}
 	}
-	if(ch=='h')	return 0;
 
 	bool mgld=(*iname && iname[strlen(iname)-1]=='d');
 	if(!mgld)
diff --git a/widgets/CMakeLists.txt b/widgets/CMakeLists.txt
index 756124b..f05ea5a 100644
--- a/widgets/CMakeLists.txt
+++ b/widgets/CMakeLists.txt
@@ -2,83 +2,24 @@ include(GenerateExportHeader)
 add_compiler_export_flags()
 
 if(MGL_HAVE_FLTK)
-	include_directories(${FLTK_INCLUDE_DIR})
-	add_library(mgl-fltk SHARED fltk.cpp ../include/mgl2/fltk.h)
-	add_library(mgl-fltk-static STATIC fltk.cpp ../include/mgl2/fltk.h)
-	set_target_properties(mgl-fltk PROPERTIES SOVERSION ${MathGL_SOVERSION})
-	set_target_properties(mgl-fltk PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	set_target_properties(mgl-fltk PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
-	set_target_properties(mgl-fltk-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	target_compile_definitions(mgl-fltk-static PUBLIC MGL_STATIC_DEFINE)
+	mgl_add_lib(fltk fltk.cpp ../include/mgl2/fltk.h)
+	target_include_directories(mgl-fltk SYSTEM PUBLIC ${FLTK_INCLUDE_DIR})
+	target_include_directories(mgl-fltk-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR})
 	target_link_libraries(mgl-fltk mgl ${FLTK_LIBRARIES})
-
-	if(enable-mgl2)
-		set_target_properties(mgl-fltk PROPERTIES OUTPUT_NAME "mgl2-fltk")
-		set_target_properties(mgl-fltk-static PROPERTIES OUTPUT_NAME "mgl2-fltk")
-	else(enable-mgl2)
-		set_target_properties(mgl-fltk-static PROPERTIES OUTPUT_NAME "mgl-fltk")
-	endif(enable-mgl2)
-
-	install(
-		TARGETS mgl-fltk mgl-fltk-static
-		RUNTIME DESTINATION bin
-		ARCHIVE DESTINATION ${MGL_LIB_INSTALL_DIR}
-		LIBRARY DESTINATION ${MGL_LIB_INSTALL_DIR}
-	)
 endif(MGL_HAVE_FLTK)
 
 if(MGL_HAVE_GLUT)
-	include_directories(${GLUT_INCLUDE_DIR})
-	add_library(mgl-glut SHARED glut.cpp ../include/mgl2/glut.h)
-	add_library(mgl-glut-static STATIC glut.cpp ../include/mgl2/glut.h)
-	set_target_properties(mgl-glut PROPERTIES SOVERSION ${MathGL_SOVERSION})
-	set_target_properties(mgl-glut PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	set_target_properties(mgl-glut PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
-	set_target_properties(mgl-glut-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	target_compile_definitions(mgl-glut-static PUBLIC MGL_STATIC_DEFINE)
-	target_link_libraries(mgl-glut mgl)
-	target_link_libraries(mgl-glut ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES})
-
-	if(enable-mgl2)
-		set_target_properties(mgl-glut PROPERTIES OUTPUT_NAME "mgl2-glut")
-		set_target_properties(mgl-glut-static PROPERTIES OUTPUT_NAME "mgl2-glut")
-	else(enable-mgl2)
-		set_target_properties(mgl-glut-static PROPERTIES OUTPUT_NAME "mgl-glut")
-	endif(enable-mgl2)
-
-	install(
-		TARGETS mgl-glut mgl-glut-static
-		RUNTIME DESTINATION bin
-		ARCHIVE DESTINATION ${MGL_LIB_INSTALL_DIR}
-		LIBRARY DESTINATION ${MGL_LIB_INSTALL_DIR}
-	)
+	mgl_add_lib(glut glut.cpp ../include/mgl2/glut.h)
+	target_include_directories(mgl-glut SYSTEM PUBLIC ${GLUT_INCLUDE_DIR})
+	target_include_directories(mgl-glut-static SYSTEM PUBLIC ${GLUT_INCLUDE_DIR})
+	target_link_libraries(mgl-glut mgl ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES})
 endif(MGL_HAVE_GLUT)
 
 if(MGL_HAVE_WX)
+	mgl_add_lib(wx wx.cpp ../include/mgl2/wx.h)
 	include(${wxWidgets_USE_FILE})
-	add_library(mgl-wx SHARED wx.cpp ../include/mgl2/wx.h)
-	add_library(mgl-wx-static STATIC wx.cpp ../include/mgl2/wx.h)
-	set_target_properties(mgl-wx PROPERTIES SOVERSION ${MathGL_SOVERSION})
-	set_target_properties(mgl-wx PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	set_target_properties(mgl-wx PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
-	set_target_properties(mgl-wx-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	target_compile_definitions(mgl-wx-static PUBLIC MGL_STATIC_DEFINE)
 	target_link_libraries(mgl-wx mgl)
 	target_link_libraries(mgl-wx ${wxWidgets_LIBRARIES})
-
-	if(enable-mgl2)
-		set_target_properties(mgl-wx PROPERTIES OUTPUT_NAME "mgl2-wx")
-		set_target_properties(mgl-wx-static PROPERTIES OUTPUT_NAME "mgl2-wx")
-	else(enable-mgl2)
-		set_target_properties(mgl-wx-static PROPERTIES OUTPUT_NAME "mgl-wx")
-	endif(enable-mgl2)
-
-	install(
-		TARGETS mgl-wx mgl-wx-static
-		RUNTIME DESTINATION bin
-		ARCHIVE DESTINATION ${MGL_LIB_INSTALL_DIR}
-		LIBRARY DESTINATION ${MGL_LIB_INSTALL_DIR}
-	)
 endif(MGL_HAVE_WX)
 
 add_subdirectory( qt4 )
diff --git a/widgets/fltk.cpp b/widgets/fltk.cpp
index 3e725b9..53e159f 100644
--- a/widgets/fltk.cpp
+++ b/widgets/fltk.cpp
@@ -34,7 +34,7 @@
 #endif
 //-----------------------------------------------------------------------------
 #include "mgl2/canvas_wnd.h"
-#include "mgl2/fltk.h"
+#include "mgl2/Fl_MathGL.h"
 //-----------------------------------------------------------------------------
 #include "xpm/show_sl.xpm"
 #include "xpm/next_sl.xpm"
@@ -127,7 +127,7 @@ void Fl_MathGL::set_graph(HMGL GR)
 {
 	mglCanvas *gg = dynamic_cast<mglCanvas *>(GR);
 	if(!gg)	return;
-	if(mgl_use_graph(gr,-1)<1)	mgl_delete_graph(gr);
+	if(gr && mgl_use_graph(gr,-1)<1)	mgl_delete_graph(gr);
 	gr=gg;	mgl_use_graph(gg,1);
 	gr->SetEventFunc(mgl_fltk_event_func, NULL);
 }
@@ -378,7 +378,7 @@ void Fl_MGLView::update()
 }
 void MGL_NO_EXPORT mgl_draw_cb(Fl_Widget*, void* v)
 {	if(v)	((Fl_MGLView*)v)->update();	}
-void mglCanvasFL::Update()		{	mgl->update();	}
+void mglCanvasFL::Update()		{	mgl->update();	Wnd->show();	}
 //-----------------------------------------------------------------------------
 void MGL_NO_EXPORT mgl_export_png_cb(Fl_Widget*, void* v)
 {
@@ -649,7 +649,7 @@ Fl_MGLView::~Fl_MGLView()	{}
 //
 //-----------------------------------------------------------------------------
 mglCanvasFL::mglCanvasFL() : mglCanvasWnd()	{	Wnd=0;	}
-mglCanvasFL::~mglCanvasFL()		{	if(Wnd)	delete Wnd;	}
+mglCanvasFL::~mglCanvasFL()		{	if(Wnd)	{	mgl->FMGL->gr=0;	delete Wnd;	}	}
 //-----------------------------------------------------------------------------
 void mglCanvasFL::GotoFrame(int d)
 {
diff --git a/widgets/qt.cpp b/widgets/qt.cpp
index ad6bb1b..e371e45 100644
--- a/widgets/qt.cpp
+++ b/widgets/qt.cpp
@@ -82,27 +82,7 @@ void MGL_EXPORT mgl_ask_qt(const wchar_t *quest, wchar_t *res)
 {	QInputDialog::getText(QApplication::activeWindow(), "MathGL",
 						QString::fromWCharArray(quest)).toWCharArray(res);	}
 //-----------------------------------------------------------------------------
-//
-//		class QMathGL
-//
-//-----------------------------------------------------------------------------
-/// Internal class to be used for multi-threading plotting
-/*class mglTask : public QObject
-{
-	Q_OBJECT
-public:
-	mglCanvas *gr;		///< Built-in mglCanvasQT-er instance (used by default)
-	void *draw_par;		///< Parameters for drawing function mglCanvasWnd::DrawFunc.
-	/// Drawing function for window procedure. It should return the number of frames.
-	int (*draw_func)(mglBase *gr, void *par);
-	mglDraw *draw;		///< Class for drawing -- need to call directly due to inheritance mechanism
-public slots:
-	void doWork();
-signals:
-	void plotDone();
-};
-//-----------------------------------------------------------------------------
-void mglTask::doWork()
+/*void mglTask::doWork()
 {
 	setlocale(LC_NUMERIC, "C");
 	if(mgl_is_frames(gr))	mgl_new_frame(gr);
@@ -142,7 +122,7 @@ QMathGL::QMathGL(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f)
 QMathGL::~QMathGL()
 {
 	timer->stop();	timerRefr->stop();
-	if(mgl_use_graph(gr,-1)<1)	mgl_delete_graph(gr);
+	if(gr && mgl_use_graph(gr,-1)<1)	mgl_delete_graph(gr);
 	if(grBuf)	delete []grBuf;
 	if(draw)	delete draw;
 }
@@ -988,7 +968,7 @@ void QMathGL::addText(QString txt)
 mglCanvasQT::mglCanvasQT() : mglCanvasWnd()
 {	Wnd = 0;	}
 mglCanvasQT::~mglCanvasQT()
-{	if(Wnd)	delete Wnd;	}
+{	if(Wnd)	{	QMGL->gr=0;	delete Wnd;	}	}
 //-----------------------------------------------------------------------------
 void mglCanvasQT::GotoFrame(int d)
 {
@@ -1009,13 +989,13 @@ void mglCanvasQT::ToggleAlpha()	{	QMGL->setAlpha(!QMGL->getAlpha());	}
 //-----------------------------------------------------------------------------
 void mglCanvasQT::ToggleLight()	{	QMGL->setLight(!QMGL->getLight());	}
 //-----------------------------------------------------------------------------
-void mglCanvasQT::ToggleNo()		{	QMGL->restore();	}
+void mglCanvasQT::ToggleNo()	{	QMGL->restore();	}
 //-----------------------------------------------------------------------------
 void mglCanvasQT::ToggleZoom()	{	QMGL->setZoom(!QMGL->getZoom());	}
 //-----------------------------------------------------------------------------
 void mglCanvasQT::ToggleRotate(){	QMGL->setRotate(!QMGL->getRotate());}
 //-----------------------------------------------------------------------------
-void mglCanvasQT::Update()		{	SetCurFig(0);	QMGL->update();	}
+void mglCanvasQT::Update()		{	SetCurFig(0);	QMGL->update();	Wnd->show();	}
 //-----------------------------------------------------------------------------
 void mglCanvasQT::Adjust()		{	QMGL->adjust();	}
 //-----------------------------------------------------------------------------
diff --git a/widgets/qt4/CMakeLists.txt b/widgets/qt4/CMakeLists.txt
index 00affe5..569f931 100644
--- a/widgets/qt4/CMakeLists.txt
+++ b/widgets/qt4/CMakeLists.txt
@@ -1,71 +1,29 @@
 include(GenerateExportHeader)
 add_compiler_export_flags()
-function(libmglqt mglqt)
-	add_library(mgl-${mglqt} SHARED ${MGL_QT_FILES})
-	add_library(mgl-${mglqt}-static STATIC ${MGL_QT_FILES})
-	set_target_properties(mgl-${mglqt} PROPERTIES SOVERSION ${MathGL_SOVERSION})
-	set_target_properties(mgl-${mglqt} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	set_target_properties(mgl-${mglqt} PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
-	set_target_properties(mgl-${mglqt}-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	target_compile_definitions(mgl-${mglqt}-static PUBLIC MGL_STATIC_DEFINE)
-	target_link_libraries(mgl-${mglqt} mgl)
-	target_link_libraries(mgl-${mglqt} ${QT_LIBRARIES})
-
-	if(enable-mgl2)
-		set_target_properties(mgl-${mglqt} PROPERTIES OUTPUT_NAME "mgl2-${mglqt}")
-		set_target_properties(mgl-${mglqt}-static PROPERTIES OUTPUT_NAME "mgl2-${mglqt}")
-	else(enable-mgl2)
-		set_target_properties(mgl-${mglqt}-static PROPERTIES OUTPUT_NAME "mgl-${mglqt}")
-	endif(enable-mgl2)
-
-	install(
-		TARGETS mgl-${mglqt} mgl-${mglqt}-static
-		RUNTIME DESTINATION bin
-		ARCHIVE DESTINATION ${MGL_LIB_INSTALL_DIR}
-		LIBRARY DESTINATION ${MGL_LIB_INSTALL_DIR}
-	)
-endfunction(libmglqt mglqt)
 
 if(enable-qt4)
 	include(../../cmake-qt4.txt)
-	qt4_wrap_cpp(MGL_MOC_FILES ../../include/mgl2/qmathgl.h)
-	set(MGL_QT_FILES ../qt.cpp ${MGL_MOC_FILES} ../../include/mgl2/qt.h ../../include/mgl2/qmathgl.h)
-	libmglqt(qt4)
+	set(MGL_QT4_FILES ../qt.cpp ../../include/mgl2/qt.h ../../include/mgl2/qmathgl.h)
+	mgl_add_lib(qt4 ${MGL_QT4_FILES})
+	qt4_use_modules(mgl-qt4 ${MGL_QT4_LIBS})
+	qt4_use_modules(mgl-qt4-static ${MGL_QT4_LIBS})
+	target_link_libraries(mgl-qt4 mgl)
+	target_link_libraries(mgl-qt4-static mgl)
 	if(NOT enable-qt5asqt)
-		libmglqt(qt)
+		mgl_add_lib(qt ${MGL_QT4_FILES})
+		qt4_use_modules(mgl-qt ${MGL_QT4_LIBS})
+		qt4_use_modules(mgl-qt-static ${MGL_QT4_LIBS})
+		target_link_libraries(mgl-qt mgl)
+		target_link_libraries(mgl-qt-static mgl)
 	endif(NOT enable-qt5asqt)
 
 	if(MGL_HAVE_FLTK AND NOT enable-qt5)
-		include_directories(${FLTK_INCLUDE_DIR})
-
-		set(MGL_WND_SRC ${MGL_QT_FILES} ../fltk.cpp ../../include/mgl2/fltk.h)
-
-		add_library(mgl-wnd SHARED ${MGL_WND_SRC})
-		add_library(mgl-wnd-static STATIC ${MGL_WND_SRC})
-
-		set_target_properties(mgl-wnd PROPERTIES SOVERSION ${MathGL_SOVERSION})
-		set_target_properties(mgl-wnd PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-		set_target_properties(mgl-wnd PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
-		set_target_properties(mgl-wnd-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-		target_compile_definitions(mgl-wnd-static PUBLIC MGL_STATIC_DEFINE)
-		if(enable-mgl2)
-			set_target_properties(mgl-wnd PROPERTIES OUTPUT_NAME "mgl2-wnd")
-			set_target_properties(mgl-wnd-static PROPERTIES OUTPUT_NAME "mgl2-wnd")
-		else(enable-mgl2)
-			set_target_properties(mgl-wnd-static PROPERTIES OUTPUT_NAME "mgl-wnd")
-		endif(enable-mgl2)
-
-		target_link_libraries(mgl-wnd mgl)
-		target_link_libraries(mgl-wnd ${QT_LIBRARIES})
-		target_link_libraries(mgl-wnd ${FLTK_LIBRARIES})
-
-		install(
-			TARGETS mgl-wnd mgl-wnd-static
-			RUNTIME DESTINATION bin
-			ARCHIVE DESTINATION ${MGL_LIB_INSTALL_DIR}
-			LIBRARY DESTINATION ${MGL_LIB_INSTALL_DIR}
-		)
+		mgl_add_lib(wnd ${MGL_QT4_FILES} ../fltk.cpp ../../include/mgl2/fltk.h)
+		target_include_directories(mgl-wnd SYSTEM PUBLIC ${FLTK_INCLUDE_DIR})
+		target_include_directories(mgl-wnd-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR})
+		qt4_use_modules(mgl-wnd ${MGL_QT4_LIBS})
+		qt4_use_modules(mgl-wnd-static ${MGL_QT4_LIBS})
+		target_link_libraries(mgl-wnd mgl ${FLTK_LIBRARIES})
+		target_link_libraries(mgl-wnd-static mgl ${FLTK_LIBRARIES})
 	endif(MGL_HAVE_FLTK AND  NOT enable-qt5)
-else(enable-qt4)
-	set(MGL_HAVE_QT4 0)
 endif(enable-qt4)
diff --git a/widgets/qt5/CMakeLists.txt b/widgets/qt5/CMakeLists.txt
index da87a6b..dcc30e5 100644
--- a/widgets/qt5/CMakeLists.txt
+++ b/widgets/qt5/CMakeLists.txt
@@ -1,72 +1,28 @@
 include(GenerateExportHeader)
 add_compiler_export_flags()
 
-function(libmglqt mglqt)
-	add_library(mgl-${mglqt} SHARED ${MGL_QT_FILES})
-	add_library(mgl-${mglqt}-static STATIC ${MGL_QT_FILES})
-	set_target_properties(mgl-${mglqt} PROPERTIES SOVERSION ${MathGL_SOVERSION})
-	set_target_properties(mgl-${mglqt} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	set_target_properties(mgl-${mglqt} PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
-	set_target_properties(mgl-${mglqt}-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-	target_compile_definitions(mgl-${mglqt}-static PUBLIC MGL_STATIC_DEFINE)
-	target_link_libraries(mgl-${mglqt} mgl)
-	qt5_use_modules(mgl-${mglqt} Core Widgets Gui PrintSupport)
-	qt5_use_modules(mgl-${mglqt}-static Core Widgets Gui PrintSupport)
-	if(enable-mgl2)
-		set_target_properties(mgl-${mglqt} PROPERTIES OUTPUT_NAME "mgl2-${mglqt}")
-		set_target_properties(mgl-${mglqt}-static PROPERTIES OUTPUT_NAME "mgl2-${mglqt}")
-	else(enable-mgl2)
-		set_target_properties(mgl-${mglqt}-static PROPERTIES OUTPUT_NAME "mgl-${mglqt}")
-	endif(enable-mgl2)
-	install(
-		TARGETS mgl-${mglqt} mgl-${mglqt}-static
-		RUNTIME DESTINATION bin
-		ARCHIVE DESTINATION ${MGL_LIB_INSTALL_DIR}
-		LIBRARY DESTINATION ${MGL_LIB_INSTALL_DIR}
-	)
-endfunction(libmglqt mglqt)
-
 if(enable-qt5)
 	include(../../cmake-qt5.txt)
-	qt5_wrap_cpp(MGL_MOC_FILES ../../include/mgl2/qmathgl.h)
-	set(MGL_QT_FILES ../qt.cpp ${MGL_MOC_FILES} ../../include/mgl2/qt.h ../../include/mgl2/qmathgl.h)
-	libmglqt(qt5)
+	set(MGL_QT5_FILES ../qt.cpp ../../include/mgl2/qt.h ../../include/mgl2/qmathgl.h)
+	mgl_add_lib(qt5 ${MGL_QT5_FILES})
+	qt5_use_modules(mgl-qt5 ${MGL_QT5_LIBS})
+	qt5_use_modules(mgl-qt5-static ${MGL_QT5_LIBS})
+	target_link_libraries(mgl-qt5 mgl)
+	target_link_libraries(mgl-qt5-static mgl)
 	if(enable-qt5asqt)
-		libmglqt(qt)
+		mgl_add_lib(qt ${MGL_QT5_FILES})
+		qt5_use_modules(mgl-qt ${MGL_QT5_LIBS})
+		qt5_use_modules(mgl-qt-static ${MGL_QT5_LIBS})
+		target_link_libraries(mgl-qt mgl)
+		target_link_libraries(mgl-qt-static mgl)
 	endif(enable-qt5asqt)
-
 	if(MGL_HAVE_FLTK)
-		include_directories(${FLTK_INCLUDE_DIR})
-
-		set(MGL_WND_SRC ${MGL_QT_FILES} ../fltk.cpp ../../include/mgl2/fltk.h)
-
-		add_library(mgl-wnd SHARED ${MGL_WND_SRC})
-		add_library(mgl-wnd-static STATIC ${MGL_WND_SRC})
-
-		set_target_properties(mgl-wnd PROPERTIES SOVERSION ${MathGL_SOVERSION})
-		set_target_properties(mgl-wnd PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-		set_target_properties(mgl-wnd PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
-		set_target_properties(mgl-wnd-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-		target_compile_definitions(mgl-wnd-static PUBLIC MGL_STATIC_DEFINE)
-		if(enable-mgl2)
-			set_target_properties(mgl-wnd PROPERTIES OUTPUT_NAME "mgl2-wnd")
-			set_target_properties(mgl-wnd-static PROPERTIES OUTPUT_NAME "mgl2-wnd")
-		else(enable-mgl2)
-			set_target_properties(mgl-wnd-static PROPERTIES OUTPUT_NAME "mgl-wnd")
-		endif(enable-mgl2)
-
-		target_link_libraries(mgl-wnd mgl)
-		qt5_use_modules(mgl-wnd Core Widgets Gui PrintSupport)
-		qt5_use_modules(mgl-wnd-static Core Widgets Gui PrintSupport)
-		target_link_libraries(mgl-wnd ${FLTK_LIBRARIES})
-
-		install(
-			TARGETS mgl-wnd mgl-wnd-static
-			RUNTIME DESTINATION bin
-			ARCHIVE DESTINATION ${MGL_LIB_INSTALL_DIR}
-			LIBRARY DESTINATION ${MGL_LIB_INSTALL_DIR}
-		)
+		mgl_add_lib(wnd ${MGL_QT5_FILES} ../fltk.cpp ../../include/mgl2/fltk.h)
+		target_include_directories(mgl-wnd SYSTEM PUBLIC ${FLTK_INCLUDE_DIR})
+		target_include_directories(mgl-wnd-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR})
+		qt5_use_modules(mgl-wnd ${MGL_QT5_LIBS})
+		qt5_use_modules(mgl-wnd-static ${MGL_QT5_LIBS})
+		target_link_libraries(mgl-wnd mgl ${FLTK_LIBRARIES})
+		target_link_libraries(mgl-wnd-static mgl ${FLTK_LIBRARIES})
 	endif(MGL_HAVE_FLTK)
-else(enable-qt5)
-	set(MGL_HAVE_QT5 0)
 endif(enable-qt5)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mathgl.git



More information about the debian-science-commits mailing list