diff --git a/CMakeLists.txt b/CMakeLists.txt
index 570e321c..ceb8f189 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -854,7 +854,76 @@ invalid. It should contain the file check.h, but it does not.")
       set(MEMCHECK_COMMAND
          "${CMAKE_MEMORYCHECK_COMMAND} ${CMAKE_MEMORYCHECK_COMMAND_OPTIONS}")
       separate_arguments(MEMCHECK_COMMAND)
-  endif()
+
+      # check that check compiles/links - needs cmake 3+
+
+      if(${CMAKE_VERSION} VERSION_GREATER 3.0.0)
+        set(CHECK_CHECK_CODE
+        "
+        #include <check.h>
+        
+        START_TEST (sanity_check)
+        {
+            fail_unless(5 == 5, \"this should succeed\");
+            fail_unless(6 == 5, \"this should fail\");
+        }
+        END_TEST
+        
+        int 
+        main(void)
+        {
+            Suite *s1 = suite_create(\"Core\");
+            TCase *tc1_1 = tcase_create(\"Core\");
+            SRunner *sr = srunner_create(s1);
+            int nf;
+        
+            suite_add_tcase(s1, tc1_1);
+            tcase_add_test(tc1_1, sanity_check);
+        
+            srunner_run_all(sr, CK_ENV);
+            nf = srunner_ntests_failed(sr);
+            srunner_free(sr);
+            ;
+            return nf == 0 ? 0 : 1;
+        }
+        " 
+        )
+
+        set(CMAKE_REQUIRED_LIBRARIES_CACHE ${CMAKE_REQUIRED_LIBRARIES})
+        unset(CHECK_CHECK_TEST CACHE)
+        unset(CHECK_CHECK_TEST2 CACHE)
+
+        set(CHECK_CHECK_TEST)
+        set(CMAKE_REQUIRED_LIBRARIES "-lcheck -lm ${EXTRA_LIBS}")
+        CHECK_C_SOURCE_COMPILES("${CHECK_CHECK_CODE}" CHECK_CHECK_TEST)
+
+        if (NOT CHECK_CHECK_TEST)
+            set(CHECK_CHECK_TEST2)
+            set(CMAKE_REQUIRED_LIBRARIES "-lcheck -lm -pthread -lrt -lsubunit ${EXTRA_LIBS}")
+            CHECK_C_SOURCE_COMPILES("${CHECK_CHECK_CODE}" CHECK_CHECK_TEST2)
+            
+            if (CHECK_CHECK_TEST2)
+                set(CHECK_TMP_LIBS "-pthread -lrt -lsubunit ${EXTRA_LIBS}")
+                string(STRIP "${CHECK_TMP_LIBS}" CHECK_TMP_LIBS)
+                set(EXTRA_LIBS "${CHECK_TMP_LIBS}" CACHE STRING
+                "List of additional libraries to link against.  Separate multiple
+                names using semicolons." FORCE)                
+                unset(CHECK_TMP_LIBS)
+                message(STATUS "Check requires the following EXTRA_LIBS : ${EXTRA_LIBS}")
+            else ()
+                message(WARNING
+"Check cannot compile tests, please specify the correct EXTRA_LIBS for your operating system.")            
+            endif (CHECK_CHECK_TEST2)
+            unset(CHECK_CHECK_TEST2 CACHE)
+
+        endif (NOT CHECK_CHECK_TEST)
+
+        unset(CHECK_CHECK_TEST CACHE)
+        set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_FLAGS_CACHE})
+
+      endif(${CMAKE_VERSION} VERSION_GREATER 3.0.0)
+
+  endif(UNIX)
 
     include(CTest)
 
@@ -876,7 +945,7 @@ if(UNIX OR CYGWIN)
     set( MISC_PREFIX "${CMAKE_INSTALL_DATADIR}/libsbml/" )
     set(LIBSBML_LIBRARY sbml)
 else()
-    set( MISC_PREFIX "." )
+    set( MISC_PREFIX ".\\" )
     set(PATH_SEP "\\")
     set(FILE_SEP ";")
     if(MINGW)
@@ -980,6 +1049,33 @@ other operating systems.)" OFF)
         set(BUILD_DEFINITIONS "${BUILD_DEFINITIONS} -DLINUX")
     endif(APPLE)
 
+    if(WITH_CHECK)
+        if(CMAKE_VERSION VERSION_GREATER "3.0.0")
+            # https://cmake.org/cmake/help/v3.0/module/CheckCXXSourceCompiles.html
+            # CMAKE_REQUIRED_FLAGS = string of compile command line flags
+            # CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+            # CMAKE_REQUIRED_INCLUDES = list of include directories
+            # CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+            
+            # <code>       - source code to try to compile, must define 'main'
+            # <var>        - variable to store whether the source code compiled
+            # <fail-regex> - fail if test output matches this regex
+
+            # set(CMAKE_REQUIRED_LIBRARIES "${EXTRA_LIBS}")
+            # CHECK_CXX_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
+
+            # set(CMAKE_REQUIRED_LIBRARIES "-lrt -lpthread -lsubunit")
+            # CHECK_CXX_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
+
+            # set(CMAKE_REQUIRED_LIBRARIES "-lrt -lpthread")
+            # CHECK_CXX_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
+        endif(CMAKE_VERSION VERSION_GREATER "3.0.0")
+        # plan A now extinct
+        #add_subdirectory(dev/utilities/linux-check-libs)
+        #target_link_libraries(${LIBSBML_LIBRARY} ${LIBSBML_LIBS} ${EXTRA_LIBS})
+    endif(WITH_CHECK)
+
+    
     # not needing these defines, and they do cause warnings
     # add_definitions( -DPACKAGE_VERSION=\"${PACKAGE_VERSION}\"  -DPACKAGE_NAME=\"${PROJECT_NAME}\")
     # set(BUILD_DEFINITIONS "${BUILD_DEFINITIONS} -DPACKAGE_VERSION=\"${PACKAGE_VERSION}\"  -DPACKAGE_NAME=\"${PROJECT_NAME}\"")
diff --git a/Makefile.in b/Makefile.in
index 3fbf5092..ac3d6aab 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -297,7 +297,8 @@ examples =                                                          \
   examples/python/inlineInitialAssignments.py                       \
   examples/python/replaceOneFD.py                                   \
   examples/python/evaluateCustomMath.py                             \
-  examples/python/inlineFunctionDefinitions.py                       \
+  examples/python/inlineFunctionDefinitions.py                      \
+  examples/python/validateSBMLWithCallback.py                       \
   examples/php/createExampleSBML.php                                \
   examples/php/echoSBML.php                                         \
   examples/php/validateSBML.php                                     \
diff --git a/NEWS.txt b/NEWS.txt
index c7f038ed..3bc7f041 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,5 +1,92 @@
            libSBML NEWS -- History of user-visible changes
 
+====================================================================
+5.18.0 (2019-04-18)
+====================================================================
+
+STABLE RELEASE
+
+* New features
+
+  - LibSBML now defines a DefinitionURLRegistry to allow a user to log
+    their own values of the 'definitionURL' attribute on a math <csymbol>
+    element. Once logged these definitionURL values will not trigger the
+    unknown csymbol error when reading a model that uses them. 
+
+  - LibSBML now defines a CallbackRegistry which allows a user to register
+    a callback to interrupt a long running read operation. Examples for C++
+    and Python are included. In future it would be anticipated that would
+    have callbacks to interrupt long running validation or conversion 
+    processes.
+	
+
+* Bug fixes
+
+  - Validation was incorrectly stating that the id of a <localParameter>
+    that mirrorred the id of a <species> should be listed as a 
+    <modifierSpeciesReference> in the enclosing <reaction>. It no longer
+    issue an incorrect error.
+
+  - The string to MathML parser was failing to identify known constants
+    as arguments to a lambda function. lambda(pi, pi*2) should treat 'pi'
+    as an unknown argument not the constant pi. This has been fixed.
+
+  - The MathML parser adds logbase and degree to log and root elements 
+    respectively. These are dimensionless integers and but unit
+    validation was failing.  This has been corrected.  Note this means
+    that for L3 models libSBML will write out the dimensionless units 
+    on the relevant <cn> element explicitly.  This may cause an 
+    apparent difference in models if reading and then writing. 
+
+  - In MathML a <bvar> element within a <lambda> can only contain a 
+    <ci> child element. Validation was failing to spot when this was 
+    not the case. This has been corrected.
+
+  - MathML within a <semantics> element was not being properly validated.
+    This has been improved.
+
+  - 'layout' package-specific bug fixes:
+
+    - Code was failing to roundtrip glyphs that contained both a <curve>
+      and a <boundingBox> element. This has been fixed.
+
+
+* Configuration/build system changes
+
+  - The cmake files that enable using the check library on 
+    a Linux OS have been updated to make this easier.
+
+  - Python 3.7 is now supported.
+
+
+* Miscellaneous
+ 
+  - Several obscure memory leaks have been plugged.
+
+
+EXPERIMENTAL RELEASE
+
+* New features
+
+  - 'distrib' package-specific updates:
+
+     - The code has been updated to reflect the specification
+       agreed during HARMONY 2019 version 0.24.
+        
+  - 'spatial' package-specific updates:
+
+    - The code has been updated to reflect the specification 
+      version 0.93.
+
+    - Attributes 'id' and 'name' have been added to the SpatialPoints
+      class in anticipation of these being added to the specification.
+
+    - Plugin code has changed so that child element class members are
+      initialised to NULL.  This saves memory but may cause existing
+      code to hit an issue when using a getAbc function; which may now
+      return a NULL object when previously it did not.
+
+
 ====================================================================
 5.17.2-experimental (2018-12-06)
 ====================================================================
diff --git a/VERSION.txt b/VERSION.txt
index 1c8b2cb5..391dca82 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-5.17.2
+5.18.0
diff --git a/config/printJavaDataModel.java b/config/printJavaDataModel.java
index 0b3a248e..226c7835 100644
--- a/config/printJavaDataModel.java
+++ b/config/printJavaDataModel.java
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/configure b/configure
index 3c97a1fb..79b329f8 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
 # From configure.ac Revision: 25690 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libSBML 5.17.2.
+# Generated by GNU Autoconf 2.69 for libSBML 5.18.0.
 #
 # Report bugs to <libsbml-team@googlegroups.com>.
 #
@@ -735,8 +735,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libSBML'
 PACKAGE_TARNAME='libsbml'
-PACKAGE_VERSION='5.17.2'
-PACKAGE_STRING='libSBML 5.17.2'
+PACKAGE_VERSION='5.18.0'
+PACKAGE_STRING='libSBML 5.18.0'
 PACKAGE_BUGREPORT='libsbml-team@googlegroups.com'
 PACKAGE_URL='http://sbml.org/Software/libSBML'
 
@@ -1618,7 +1618,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libSBML 5.17.2 to adapt to many kinds of systems.
+\`configure' configures libSBML 5.18.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1683,7 +1683,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libSBML 5.17.2:";;
+     short | recursive ) echo "Configuration of libSBML 5.18.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1839,7 +1839,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libSBML configure 5.17.2
+libSBML configure 5.18.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2558,7 +2558,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libSBML $as_me 5.17.2, which was
+It was created by libSBML $as_me 5.18.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2948,7 +2948,7 @@ ac_config_headers="$ac_config_headers src/sbml/common/libsbml-package.h"
 ac_config_headers="$ac_config_headers src/sbml/common/libsbml-namespace.h"
 
 
-LIBSBML_VERSION_NUMERIC=51702
+LIBSBML_VERSION_NUMERIC=51800
 
 
 
@@ -2956,11 +2956,11 @@ LIBSBML_MAJOR_VERSION=5
 
 
 
-LIBSBML_MINOR_VERSION=17
+LIBSBML_MINOR_VERSION=18
 
 
 
-LIBSBML_REVISION_VERSION=2
+LIBSBML_REVISION_VERSION=0
 
 
 
@@ -27742,7 +27742,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libSBML $as_me 5.17.2, which was
+This file was extended by libSBML $as_me 5.18.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -27805,7 +27805,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libSBML config.status 5.17.2
+libSBML config.status 5.18.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/debian/changelog b/debian/changelog
index a683da9b..ca09de9a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libsbml (5.18.0-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Thu, 07 Nov 2019 00:09:51 +0000
+
 libsbml (5.17.2+dfsg-3) unstable; urgency=medium
 
   * Fix link in development package
diff --git a/debian/patches/doxygen.patch b/debian/patches/doxygen.patch
index 079753ab..b1c1e1fa 100644
--- a/debian/patches/doxygen.patch
+++ b/debian/patches/doxygen.patch
@@ -9,8 +9,10 @@ Author: Ivo Maintz <ivo@maintz.de>
 ---
 Last-Update: <2015-01-12>
 
---- a/docs/CMakeLists.txt
-+++ b/docs/CMakeLists.txt
+Index: libsbml/docs/CMakeLists.txt
+===================================================================
+--- libsbml.orig/docs/CMakeLists.txt
++++ libsbml/docs/CMakeLists.txt
 @@ -101,7 +101,7 @@ macro(createManual lang)
  	file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/formatted/${lang}-api output_path)
  	file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/formatted/${lang}-api/search search_path)
diff --git a/debian/patches/fix_build_issue.patch b/debian/patches/fix_build_issue.patch
index d97bbd25..5588e4f8 100644
--- a/debian/patches/fix_build_issue.patch
+++ b/debian/patches/fix_build_issue.patch
@@ -3,8 +3,10 @@ Last-Update: Tue, 15 Jan 2019 18:10:07 +0100
 Description: Avoid error
    TypeError: '>=' not supported between instances of 'str' and 'int'
 
---- a/src/bindings/swig/swigdoc.py
-+++ b/src/bindings/swig/swigdoc.py
+Index: libsbml/src/bindings/swig/swigdoc.py
+===================================================================
+--- libsbml.orig/src/bindings/swig/swigdoc.py
++++ libsbml/src/bindings/swig/swigdoc.py
 @@ -467,7 +467,7 @@ class Method:
      # this fixes a real problem in the Java documentation for libSBML.
  
diff --git a/debian/patches/fix_cmake_configuration.patch b/debian/patches/fix_cmake_configuration.patch
index 58bebb29..7b12d1bd 100644
--- a/debian/patches/fix_cmake_configuration.patch
+++ b/debian/patches/fix_cmake_configuration.patch
@@ -3,8 +3,10 @@ Last-Update: Mon, 03 Dec 2018 16:11:35 +0100
 Description: Desperately trying to fix CMake config by simply
  commenting the line which causes an error
 
---- a/src/bindings/r/CMakeLists.txt
-+++ b/src/bindings/r/CMakeLists.txt
+Index: libsbml/src/bindings/r/CMakeLists.txt
+===================================================================
+--- libsbml.orig/src/bindings/r/CMakeLists.txt
++++ libsbml/src/bindings/r/CMakeLists.txt
 @@ -336,7 +336,12 @@ configure_file (
    "${CMAKE_CURRENT_BINARY_DIR}/libSBML/NAMESPACE"
  )
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
index bdb6eeb8..350aec62 100644
--- a/debian/patches/hardening.patch
+++ b/debian/patches/hardening.patch
@@ -8,8 +8,10 @@ Author: Ivo Maintz <ivo@maintz.de>
 ---
 Last-Update: <2015-01-09>
 
---- a/config/makefile-common-actions.mk
-+++ b/config/makefile-common-actions.mk
+Index: libsbml/config/makefile-common-actions.mk
+===================================================================
+--- libsbml.orig/config/makefile-common-actions.mk
++++ libsbml/config/makefile-common-actions.mk
 @@ -77,6 +77,15 @@ endif
  # here is only to remove duplicates, which the 'sort' function does as a
  # documented side-effect.)
@@ -26,8 +28,10 @@ Last-Update: <2015-01-09>
  compile ?= $(LIBTOOL) --mode=compile --tag=CC $(CC) $(sort $(default_includes) $(INCLUDES)) $(CPPFLAGS) \
          $(extra_CPPFLAGS) $(CFLAGS) $(extra_CFLAGS) 
  
---- a/src/bindings/matlab/Makefile.in
-+++ b/src/bindings/matlab/Makefile.in
+Index: libsbml/src/bindings/matlab/Makefile.in
+===================================================================
+--- libsbml.orig/src/bindings/matlab/Makefile.in
++++ libsbml/src/bindings/matlab/Makefile.in
 @@ -150,7 +150,7 @@ endif
  # is really necessary, but it seems prudent.
  
@@ -37,8 +41,10 @@ Last-Update: <2015-01-09>
      $(LIBTOOL) -dlopen $(TOP_BUILDDIR)/src/libsbml.la --mode=execute $(1)
  endef
  
---- a/src/bindings/perl/Makefile.in
-+++ b/src/bindings/perl/Makefile.in
+Index: libsbml/src/bindings/perl/Makefile.in
+===================================================================
+--- libsbml.orig/src/bindings/perl/Makefile.in
++++ libsbml/src/bindings/perl/Makefile.in
 @@ -185,6 +185,7 @@ ifeq (GCC,$(findstring GCC,$(shell $(CXX
        CXXFLAGS += -fno-strict-aliasing
  endif
diff --git a/debian/patches/javadoc.patch b/debian/patches/javadoc.patch
index 72de316b..cf20de6c 100644
--- a/debian/patches/javadoc.patch
+++ b/debian/patches/javadoc.patch
@@ -9,8 +9,10 @@ Description: Deal with issue in doclets
 Author: Andreas Tille <tille@debian.org>
 Last-Update: Mon, 14 May 2018 10:55:58 +0200
 
---- a/docs/src/SBMLDoclet.java
-+++ b/docs/src/SBMLDoclet.java
+Index: libsbml/docs/src/SBMLDoclet.java
+===================================================================
+--- libsbml.orig/docs/src/SBMLDoclet.java
++++ libsbml/docs/src/SBMLDoclet.java
 @@ -111,7 +111,7 @@ import java.util.*;
  import java.lang.reflect.*;
  import com.sun.tools.doclets.standard.Standard;
diff --git a/debian/patches/javadoc_java9.patch b/debian/patches/javadoc_java9.patch
index fcc7af46..1b86ce50 100644
--- a/debian/patches/javadoc_java9.patch
+++ b/debian/patches/javadoc_java9.patch
@@ -5,8 +5,10 @@ Author: Markus Koschany <apo@debian.org>
         Andreas Tille <tille@debian.org>
 Last-Update: Sun, 18 Mar 2018 19:39:40 +0100
 
---- a/docs/CMakeLists.txt
-+++ b/docs/CMakeLists.txt
+Index: libsbml/docs/CMakeLists.txt
+===================================================================
+--- libsbml.orig/docs/CMakeLists.txt
++++ libsbml/docs/CMakeLists.txt
 @@ -208,10 +208,6 @@ if (WITH_JAVA)
  	endif()
  	set(Java_JAVADOC_JAR ${Java_JAVADOC_JAR} CACHE FILEPATH "Location of javadoc jar")
diff --git a/debian/patches/mips-compile-with-O1.patch b/debian/patches/mips-compile-with-O1.patch
index 17ecf475..62966a82 100644
--- a/debian/patches/mips-compile-with-O1.patch
+++ b/debian/patches/mips-compile-with-O1.patch
@@ -7,8 +7,10 @@ Subject: package libsbml FTBFS on mipsel
  .
  With this patch we was able to build package on lemote loongson 3a.
 
---- a/src/bindings/perl/CMakeLists.txt
-+++ b/src/bindings/perl/CMakeLists.txt
+Index: libsbml/src/bindings/perl/CMakeLists.txt
+===================================================================
+--- libsbml.orig/src/bindings/perl/CMakeLists.txt
++++ libsbml/src/bindings/perl/CMakeLists.txt
 @@ -176,6 +176,12 @@ if (LIBSBML_REMOVE_WRAPPERS)
    endforeach()
  endif(LIBSBML_REMOVE_WRAPPERS)
diff --git a/debian/patches/perl-installdirs.patch b/debian/patches/perl-installdirs.patch
index 999d97af..0679757e 100644
--- a/debian/patches/perl-installdirs.patch
+++ b/debian/patches/perl-installdirs.patch
@@ -2,8 +2,10 @@ Author: gregor herrmann <gregoa@debian.org>
 Last-Update: Tue, 01 May 2018 19:03:21 +0200
 Description: Install Perl modules in correct dir
 
---- a/src/bindings/perl/Makefile.PL.in
-+++ b/src/bindings/perl/Makefile.PL.in
+Index: libsbml/src/bindings/perl/Makefile.PL.in
+===================================================================
+--- libsbml.orig/src/bindings/perl/Makefile.PL.in
++++ libsbml/src/bindings/perl/Makefile.PL.in
 @@ -58,7 +58,6 @@ WriteMakefile(
                NAME        => "LibSBML",
  	      PREFIX      => "@prefix@",
@@ -12,8 +14,10 @@ Description: Install Perl modules in correct dir
                LIBS        => "@XERCES_LDFLAGS@ @EXPAT_LDFLAGS@ @LIBXML_LDFLAGS@ @XERCES_LIBS@ @EXPAT_LIBS@ @LIBXML_LIBS@ @ZLIB_LIBS@ @BZ2_LIBS@ @LIBS@ -lm",
                LDDLFLAGS   => $lddlflags,
                CC          => "@CXX@",
---- a/src/bindings/perl/CMakeLists.txt
-+++ b/src/bindings/perl/CMakeLists.txt
+Index: libsbml/src/bindings/perl/CMakeLists.txt
+===================================================================
+--- libsbml.orig/src/bindings/perl/CMakeLists.txt
++++ libsbml/src/bindings/perl/CMakeLists.txt
 @@ -232,8 +232,14 @@ Could not determine Perl version, please
    string(REPLACE "'" "" PERL_PLATFORM ${PERL_PLATFORM})
    string(REPLACE ";" "" PERL_PLATFORM ${PERL_PLATFORM})
diff --git a/debian/patches/remove_SBMLDoclet.patch b/debian/patches/remove_SBMLDoclet.patch
index 4c43d7c3..5c65ca01 100644
--- a/debian/patches/remove_SBMLDoclet.patch
+++ b/debian/patches/remove_SBMLDoclet.patch
@@ -3,7 +3,9 @@ Bug-Debian: https://bugs.debian.org/896531
 Author: Andreas Tille <tille@debian.org>
 Last-Update: Mon, 14 May 2018 10:55:58 +0200
 
---- a/docs/src/SBMLDoclet.java
+Index: libsbml/docs/src/SBMLDoclet.java
+===================================================================
+--- libsbml.orig/docs/src/SBMLDoclet.java
 +++ /dev/null
 @@ -1,525 +0,0 @@
 -/**
@@ -531,8 +533,10 @@ Last-Update: Mon, 14 May 2018 10:55:58 +0200
 -    }
 -
 -}
---- a/docs/CMakeLists.txt
-+++ b/docs/CMakeLists.txt
+Index: libsbml/docs/CMakeLists.txt
+===================================================================
+--- libsbml.orig/docs/CMakeLists.txt
++++ libsbml/docs/CMakeLists.txt
 @@ -229,67 +229,10 @@ if (WITH_JAVA)
  		file(COPY ${graphic} DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/formatted/java-api/org/sbml/libsbml/)
  	endforeach()
diff --git a/debian/patches/swig-3.x.patch b/debian/patches/swig-3.x.patch
index 29b29bb5..232d51ce 100644
--- a/debian/patches/swig-3.x.patch
+++ b/debian/patches/swig-3.x.patch
@@ -3,9 +3,11 @@ Date: Thu, 19 Nov 2015 20:12:02 UTC
 Bug-Debian: https://bugs.debian.org/805584
 Description: Build with SWIG 3.x
 
---- a/src/bindings/csharp/local.i
-+++ b/src/bindings/csharp/local.i
-@@ -117,13 +117,13 @@ static SWIG_CSharpWStringHelperCallback
+Index: libsbml/src/bindings/csharp/local.i
+===================================================================
+--- libsbml.orig/src/bindings/csharp/local.i
++++ libsbml/src/bindings/csharp/local.i
+@@ -121,13 +121,13 @@ static SWIG_CSharpWStringHelperCallback
  %pragma(csharp) imclasscode=%{
    protected class SWIGWStringHelper {
  
@@ -22,7 +24,7 @@ Description: Build with SWIG 3.x
        string ustr = System.Runtime.InteropServices.Marshal.PtrToStringUni(cString);
        return System.Runtime.InteropServices.Marshal.StringToHGlobalUni(ustr);
      }
-@@ -203,15 +203,15 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
+@@ -207,15 +207,15 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
   */
  %typemap(cscode) SBMLExtension
  %{
@@ -42,7 +44,7 @@ Description: Build with SWIG 3.x
      return new SBase(cPtr, owner);
    }
  %}
-@@ -224,9 +224,9 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
+@@ -228,9 +228,9 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
  %pragma(csharp) modulecode =
  %{
  
@@ -54,7 +56,7 @@ Description: Build with SWIG 3.x
  		
  		SBMLExtension ext = new SBMLExtension(cPtr, false);
  		string pkgName = ext.getName();
-@@ -237,9 +237,9 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
+@@ -241,9 +241,9 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
  		return new SBMLExtension(cPtr,owner);
  	}
  	
@@ -66,7 +68,7 @@ Description: Build with SWIG 3.x
  		
  		SBMLNamespaces sbn = new SBMLNamespaces(cPtr, false);
  		if (sbn != null)
-@@ -289,9 +289,9 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
+@@ -293,9 +293,9 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
  		return new SBMLConverter(cPtr,owner);
  	}
  	
@@ -78,7 +80,7 @@ Description: Build with SWIG 3.x
  		
  		SBasePlugin sbp = new SBasePlugin(cPtr, false);
  		string pkgName = sbp.getPackageName();
-@@ -306,9 +306,9 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
+@@ -310,9 +310,9 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
  	}
  	
  
@@ -90,7 +92,7 @@ Description: Build with SWIG 3.x
  		
  		SBase sb = new SBase(cPtr, false);
  		string pkgName = sb.getPackageName();
-@@ -637,23 +637,23 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
+@@ -641,23 +641,23 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
  
  %typemap(csbody) TYPENAME
  %{
@@ -121,7 +123,7 @@ Description: Build with SWIG 3.x
  		
  		if (obj != null)
  		{
-@@ -670,22 +670,22 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
+@@ -674,22 +674,22 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
  
  %typemap(csbody_derived) TYPENAME
  %{
@@ -151,7 +153,7 @@ Description: Build with SWIG 3.x
  		
  		if (obj != null)
  		{
-@@ -701,22 +701,22 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
+@@ -705,22 +705,22 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegister
  
  %typemap(csbody_derived) TYPENAME
  %{
@@ -181,7 +183,7 @@ Description: Build with SWIG 3.x
  		
  		if (obj != null)
  		{
-@@ -981,10 +981,10 @@ COVARIANT_GETID(InitialAssignment)
+@@ -985,10 +985,10 @@ COVARIANT_GETID(InitialAssignment)
  %typemap(csbase) SBMLConstructorException "System.ArgumentException";
  %typemap(cscode) SBMLConstructorException 
  %{
@@ -194,7 +196,7 @@ Description: Build with SWIG 3.x
    }
  
    public SBMLConstructorException(string v) : 
-@@ -995,10 +995,10 @@ COVARIANT_GETID(InitialAssignment)
+@@ -999,10 +999,10 @@ COVARIANT_GETID(InitialAssignment)
  %typemap(csbase) XMLConstructorException "System.ArgumentException";
  %typemap(cscode) XMLConstructorException 
  %{
@@ -207,7 +209,7 @@ Description: Build with SWIG 3.x
    }
  
    public XMLConstructorException(string v) : 
-@@ -1037,7 +1037,7 @@ COVARIANT_GETID(InitialAssignment)
+@@ -1041,7 +1041,7 @@ COVARIANT_GETID(InitialAssignment)
      static CustomExceptionDelegate customDelegate =
                                     new CustomExceptionDelegate(SetPendingCustomException);
  
@@ -216,7 +218,7 @@ Description: Build with SWIG 3.x
      public static extern
             void CustomExceptionRegisterCallback(CustomExceptionDelegate customCallback);
  
-@@ -1389,8 +1389,8 @@ XMLCONSTRUCTOR_EXCEPTION(XMLTripple)
+@@ -1393,8 +1393,8 @@ XMLCONSTRUCTOR_EXCEPTION(XMLTripple)
  %typemap(cstype)  List* _FNAME_ %{ _TYPENAME_ ## List %}
  %typemap(csout) List* _FNAME_ 
  { 
@@ -227,9 +229,11 @@ Description: Build with SWIG 3.x
  }
  %typemap(out) List* _FNAME_ 
  {
---- a/src/bindings/csharp/local-packages-arrays.i
-+++ b/src/bindings/csharp/local-packages-arrays.i
-@@ -39,9 +39,9 @@
+Index: libsbml/src/bindings/csharp/local-packages-arrays.i
+===================================================================
+--- libsbml.orig/src/bindings/csharp/local-packages-arrays.i
++++ libsbml/src/bindings/csharp/local-packages-arrays.i
+@@ -43,9 +43,9 @@
   */
  %typemap(cscode) ArraysExtension
  %{
@@ -241,7 +245,7 @@ Description: Build with SWIG 3.x
  		
  		SBasePlugin sbp = new SBasePlugin(cPtr, false);
  		SBase sb = sbp.getParentSBMLObject();
-@@ -53,9 +53,9 @@
+@@ -57,9 +57,9 @@
  		}
  	}
  
@@ -253,8 +257,10 @@ Description: Build with SWIG 3.x
  		
  		SBase sb = new SBase(cPtr, false);
  		switch( sb.getTypeCode() )
---- a/src/bindings/csharp/local-packages-groups.i
-+++ b/src/bindings/csharp/local-packages-groups.i
+Index: libsbml/src/bindings/csharp/local-packages-groups.i
+===================================================================
+--- libsbml.orig/src/bindings/csharp/local-packages-groups.i
++++ libsbml/src/bindings/csharp/local-packages-groups.i
 @@ -40,9 +40,9 @@
   */
  %typemap(cscode) GroupsExtension
@@ -279,8 +285,10 @@ Description: Build with SWIG 3.x
  		
  		SBase sb = new SBase(cPtr, false);
  		switch( sb.getTypeCode() )
---- a/src/bindings/csharp/local-packages-layout.i
-+++ b/src/bindings/csharp/local-packages-layout.i
+Index: libsbml/src/bindings/csharp/local-packages-layout.i
+===================================================================
+--- libsbml.orig/src/bindings/csharp/local-packages-layout.i
++++ libsbml/src/bindings/csharp/local-packages-layout.i
 @@ -33,9 +33,9 @@
   */
  %typemap(cscode) LayoutExtension
@@ -305,8 +313,10 @@ Description: Build with SWIG 3.x
  		
  		SBase sb = new SBase(cPtr, false);
  		switch( sb.getTypeCode() )
---- a/src/bindings/csharp/local-packages-render.i
-+++ b/src/bindings/csharp/local-packages-render.i
+Index: libsbml/src/bindings/csharp/local-packages-render.i
+===================================================================
+--- libsbml.orig/src/bindings/csharp/local-packages-render.i
++++ libsbml/src/bindings/csharp/local-packages-render.i
 @@ -32,9 +32,9 @@ COVARIANT_RTYPE_FUNCTION(GradientBase, g
   */
  %typemap(cscode) RenderExtension
@@ -331,9 +341,11 @@ Description: Build with SWIG 3.x
  		
  		SBase sb = new SBase(cPtr, false);
  		switch( sb.getTypeCode() )
---- a/src/bindings/csharp/local-packages-req.i
-+++ b/src/bindings/csharp/local-packages-req.i
-@@ -38,9 +38,9 @@
+Index: libsbml/src/bindings/csharp/local-packages-req.i
+===================================================================
+--- libsbml.orig/src/bindings/csharp/local-packages-req.i
++++ libsbml/src/bindings/csharp/local-packages-req.i
+@@ -42,9 +42,9 @@
   */
  %typemap(cscode) ReqExtension
  %{
@@ -345,7 +357,7 @@ Description: Build with SWIG 3.x
  
      SBasePlugin sbp = new SBasePlugin(cPtr, false);
      SBase sb = sbp.getParentSBMLObject();
-@@ -53,9 +53,9 @@
+@@ -57,9 +57,9 @@
      }
    }
  
@@ -357,9 +369,11 @@ Description: Build with SWIG 3.x
  
      SBase sb = new SBase(cPtr, false);
      switch( sb.getTypeCode() )
---- a/src/bindings/csharp/local-packages-spatial.i
-+++ b/src/bindings/csharp/local-packages-spatial.i
-@@ -62,9 +62,9 @@ void SampledField::getUncompressed(int *
+Index: libsbml/src/bindings/csharp/local-packages-spatial.i
+===================================================================
+--- libsbml.orig/src/bindings/csharp/local-packages-spatial.i
++++ libsbml/src/bindings/csharp/local-packages-spatial.i
+@@ -68,9 +68,9 @@ void SampledField::getUncompressed(int *
   */
  %typemap(cscode) SpatialExtension
  %{
@@ -371,7 +385,7 @@ Description: Build with SWIG 3.x
  
      SBasePlugin sbp = new SBasePlugin(cPtr, false);
      SBase sb = sbp.getParentSBMLObject();
-@@ -96,9 +96,9 @@ void SampledField::getUncompressed(int *
+@@ -102,9 +102,9 @@ void SampledField::getUncompressed(int *
      }
    }
  
@@ -382,4 +396,4 @@ Description: Build with SWIG 3.x
 +    if (cPtr.Equals(global::System.IntPtr.Zero)) return null;
  
      SBase sb = new SBase(cPtr, false);
-     switch( sb.getTypeCode() )
+     switch ( sb.getTypeCode() )
diff --git a/distrib-package.cmake b/distrib-package.cmake
index f2a57f4c..b8c6bb8b 100644
--- a/distrib-package.cmake
+++ b/distrib-package.cmake
@@ -7,6 +7,10 @@
  # This file is part of libSBML. Please visit http://sbml.org for more
  # information about SBML, and the latest version of libSBML.
  #
+ # Copyright (C) 2019 jointly by the following organizations:
+ # 1. California Institute of Technology, Pasadena, CA, USA
+ # 2. University of Heidelberg, Heidelberg, Germany
+ #
  # Copyright (C) 2013-2018 jointly by the following organizations:
  # 1. California Institute of Technology, Pasadena, CA, USA
  # 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/docs/src/libsbml-coding.txt b/docs/src/libsbml-coding.txt
index 7c0a107f..91081a93 100644
--- a/docs/src/libsbml-coding.txt
+++ b/docs/src/libsbml-coding.txt
@@ -221,6 +221,10 @@ characters.
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/docs/src/libsbml-csharp-example-files.txt b/docs/src/libsbml-csharp-example-files.txt
index 967f8eab..096906d0 100644
--- a/docs/src/libsbml-csharp-example-files.txt
+++ b/docs/src/libsbml-csharp-example-files.txt
@@ -176,7 +176,7 @@ A version of <code>example1.cs</code> for SBML Level&nbsp;3.
 @subsection package-qual-examples Package: Qualitative Models
 
 The <a href="group__qual.html">Qualitative Models package</a> has the
-nickname &ldquo;layout&rdquo;. The libSBML classes that implement this
+nickname &ldquo;qual&rdquo;. The libSBML classes that implement this
 package are marked with the symbol @htmlinclude
 pkg-marker-qual.html@~ in the libSBML documentation.
 
diff --git a/docs/src/libsbml-example-files.txt b/docs/src/libsbml-example-files.txt
index df869ce2..4fda455c 100644
--- a/docs/src/libsbml-example-files.txt
+++ b/docs/src/libsbml-example-files.txt
@@ -228,7 +228,7 @@ A version of <code>example3.cpp</code> for SBML Level&nbsp;3.
 @subsection package-qual-examples Package: Qualitative Models
 
 The <a href="group__qual.html">Qualitative Models package</a> has the
-nickname &ldquo;layout&rdquo;. The libSBML classes that implement this
+nickname &ldquo;qual&rdquo;. The libSBML classes that implement this
 package are marked with the symbol @htmlinclude
 pkg-marker-qual.html@~ in the libSBML documentation.
 
diff --git a/docs/src/libsbml-python-example-files.txt b/docs/src/libsbml-python-example-files.txt
index 0d17e583..9bbee5d1 100644
--- a/docs/src/libsbml-python-example-files.txt
+++ b/docs/src/libsbml-python-example-files.txt
@@ -176,7 +176,7 @@ A version of <code>example1.py</code> for SBML Level&nbsp;3.
 @subsection package-qual-examples Package: Qualitative Models
 
 The <a href="group__qual.html">Qualitative Models package</a> has the
-nickname &ldquo;layout&rdquo;. The libSBML classes that implement this
+nickname &ldquo;qual&rdquo;. The libSBML classes that implement this
 package are marked with the symbol @htmlinclude
 pkg-marker-qual.html@~ in the libSBML documentation.
 
diff --git a/examples/c++/distrib/createTestSuiteModels.cpp b/examples/c++/distrib/createTestSuiteModels.cpp
index cf53508c..a6f5532e 100644
--- a/examples/c++/distrib/createTestSuiteModels.cpp
+++ b/examples/c++/distrib/createTestSuiteModels.cpp
@@ -28,6 +28,7 @@
  */
 
 #include <string>
+#include <limits>
 #include <sbml/SBMLTypes.h>
 #include <sbml/packages/distrib/common/DistribExtensionTypes.h>
 
@@ -35,6 +36,8 @@ using namespace std;
 
 LIBSBML_CPP_NAMESPACE_USE
 
+double VALUE_FLAG = 9999999;
+
 SBMLDocument* createBasicSBMLDocument()
 {
   SBMLNamespaces sbmlns(3,1,"distrib",1);
@@ -47,110 +50,225 @@ SBMLDocument* createBasicSBMLDocument()
   s->setId("X");
   s->setConstant(false);
   s->setBoundaryCondition(false);
-  s->setHasOnlySubstanceUnits(true);
-  s->setCompartment("C");
-  s->setInitialAmount(0);
+s->setHasOnlySubstanceUnits(true);
+s->setCompartment("C");
+s->setInitialAmount(0);
 
-  //Give it a compartment in which to live
-  Compartment* c = model->createCompartment();
-  c->setId("C");
-  c->setConstant(true);
-  c->setSize(1);
-  c->setSpatialDimensions(3.0);
+//Give it a compartment in which to live
+Compartment* c = model->createCompartment();
+c->setId("C");
+c->setConstant(true);
+c->setSize(1);
+c->setSpatialDimensions(3.0);
 
-  //Our parameter 't' is what triggers an event every second:
-  Parameter* param = model->createParameter();
-  param->setId("t");
-  param->setConstant(false);
-  param->setValue(0);
+//Our parameter 't' is what triggers an event every second:
+Parameter* param = model->createParameter();
+param->setId("t");
+param->setConstant(false);
+param->setValue(0);
 
-  //A rate rule to increase t
-  RateRule* rr = model->createRateRule();
-  rr->setVariable("t");
-  ASTNode* astn = SBML_parseL3Formula("1");
-  rr->setMath(astn);
-  delete astn;
+//A rate rule to increase t
+RateRule* rr = model->createRateRule();
+rr->setVariable("t");
+ASTNode* astn = SBML_parseL3Formula("1");
+rr->setMath(astn);
+delete astn;
 
-  //An event to constantly reset X to another call from the distribution.  Since this is generic, we don't set the actual math yet.
-  Event* e = model->createEvent();
-  e->setId("E0");
-  e->setUseValuesFromTriggerTime(true);
-  Trigger* t = e->createTrigger();
-  t->setPersistent(true);
-  t->setInitialValue(true);
-  astn = SBML_parseL3Formula("t >= 0.5");
-  t->setMath(astn);
-  delete astn;
-  EventAssignment* ea = e->createEventAssignment();
-  ea->setVariable("X");
-  //leave the math clear for now.
-  ea = e->createEventAssignment();
-  ea->setVariable("t");
-  astn = SBML_parseL3Formula("-0.5");
-  ea->setMath(astn);
+//An event to constantly reset X to another call from the distribution.  Since this is generic, we don't set the actual math yet.
+Event* e = model->createEvent();
+e->setId("E0");
+e->setUseValuesFromTriggerTime(true);
+Trigger* t = e->createTrigger();
+t->setPersistent(true);
+t->setInitialValue(true);
+astn = SBML_parseL3Formula("t >= 0.5");
+t->setMath(astn);
+delete astn;
+EventAssignment* ea = e->createEventAssignment();
+ea->setVariable("X");
+//leave the math clear for now.
+ea = e->createEventAssignment();
+ea->setVariable("t");
+astn = SBML_parseL3Formula("-0.5");
+ea->setMath(astn);
+delete astn;
 
-  return document;
+return document;
 }
 
 void setupDistrib(Model* model, string distname, vector<string> argvec, string formargs)
 {
   string id = argvec[0];
+  string args = "";
+  for (size_t a = 1; a < argvec.size(); a++) {
+    if (a > 1) {
+      args += ", ";
+    }
+    args += argvec[a];
+  }
+
   EventAssignment* ea = model->getEvent(0)->getEventAssignment(0);
   ASTNode* astn = SBML_parseL3Formula((id + "(" + formargs + ")").c_str());
+  cout << "Formula: " << id << "(" << formargs << ")" << endl;
   ea->setMath(astn);
   delete astn;
 }
 
-void setupDistribWithVals(Model* model, string distname, string id, vector<string> args, vector<string> vals, vector<string> types, string formargs)
+bool isnum(char x)
+{
+  if (x >= '0' && x <= '9') {
+    return true;
+  }
+  return false;
+}
+
+void addVariance(Model* model, string formula)
 {
-  //assert(args.size() == vals.size() && vals.size() == types.size());
-  //string calledargs = "";
-  //string allargs = "";
-  //string allvals = "";
-  //string alltypes = "";
-  //vector<string> argvec;
-  //for (size_t a=0; a<args.size(); a++) {
-  //  if (a>0) {
-  //    allargs += ", ";
-  //    allvals += ", ";
-  //    alltypes += ", ";
-  //  }
-  //  if (types[a] == "varId") {
-  //    if (!calledargs.empty()) {
-  //      calledargs += ", ";
-  //    }
-  //    calledargs += args[a];
-  //    argvec.push_back(args[a]);
-  //  }
-  //  allargs += args[a];
-  //  allvals += vals[a];
-  //  alltypes += types[a];
-  //}
+  Parameter* variance = model->createParameter();
+  variance->setId("variance");
+  variance->setConstant(true);
+  InitialAssignment* ia = model->createInitialAssignment();
+  ia->setSymbol("variance");
+  ASTNode* astn = SBML_parseL3Formula(formula.c_str());
+  ia->setMath(astn);
+  delete astn;
+}
 
-  //FunctionDefinition* fd = addFunctionDefinition(model, calledargs);
-  //fd->setId(id);
-  //DistribFunctionDefinitionPlugin* dfdp = static_cast<DistribFunctionDefinitionPlugin*>(fd->getPlugin("distrib"));
-  //DistribDrawFromDistribution* dfd = dfdp->createDistribDrawFromDistribution();
-  //for (size_t a=0; a<argvec.size(); a++) {
-  //  DistribInput* di = dfd->createDistribInput();
-  //  di->setId(argvec[a]);
-  //  di->setIndex(a);
-  //}
-  //SBase* dist = dfd->createChildObject(distname);
-  //for (size_t a = 0; a < argvec.size(); a++) {
-  //  SBase* arg_a = dist->createChildObject(argvec[a]);
-  //  arg_a->setAttribute("value", vals[a]);
-  //  if (arg_a->getTypeCode() == SBML_DISTRIB_UNCERTBOUND) {
-  //    arg_a->setAttribute("inclusive", true);
-  //  }
-  //}
+void setupDistribWithVals(Model* model, string distname, string id, vector<string> args, vector<double> vals, vector<string> types, string formargs)
+{
+  assert(args.size() == vals.size() && vals.size() == types.size());
+  string calledargs = "";
+  string allargs = "";
+  vector<string> argvec;
+  bool used_formarg = false;
+  for (size_t a = 0; a < args.size(); a++) {
+    if (a > 0) {
+      allargs += ", ";
+    }
+    if (vals[a] == VALUE_FLAG)
+    {
+      if (!used_formarg)
+      {
+        allargs += formargs;
+      }
+      else
+      {
+        //Remove the comma
+        // these are c++11 - may not work on some linux
+        //allargs.pop_back();
+        //allargs.pop_back();
+        allargs.erase(allargs.size() - 1);
+        allargs.erase(allargs.size() - 1);
+      }
+      used_formarg = true;
+    }
+    else
+    {
+      allargs += args[a];
+      if (!isnum(args[a][0])) {
+        if (args[a] == "variance") {
+          stringstream ss;
+          ss << vals[a];
+          string str = ss.str();
+          addVariance(model, str + "^2");
+        }
+        else {
+          Parameter* param = model->createParameter();
+          param->setId(args[a]);
+          param->setConstant(true);
+          param->setValue(vals[a]);
+        }
+      }
+    }
+  }
 
-  //EventAssignment* ea = model->getEvent(0)->getEventAssignment(0);
-  //ASTNode* astn = SBML_parseL3Formula((id + "(" + formargs + ")").c_str());
-  //ea->setMath(astn);
-  //delete astn;
+  EventAssignment* ea = model->getEvent(0)->getEventAssignment(0);
+  ASTNode* astn = SBML_parseL3Formula((id + "(" + allargs + ")").c_str());
+  cout << "Formula: " << id << "(" << allargs << ")" << endl;
+  ea->setMath(astn);
+  delete astn;
 }
 
+//UncertMLNode* createMixtureNode(std::string name, vector<string> weights)
+//{
+//  UncertMLNode *node = new UncertMLNode();
+//  node->setElementName(name);
+//
+//  XMLAttributes attr = XMLAttributes();
+//  /* really the url should be specific to the distribution
+//  * but whilst the attribue is required in uncertML it does not require
+//  * it to be an exact match
+//  */
+//  attr.add("definition", "http://www.uncertml.org/distributions");
+//  node->setAttributes(attr);
+//
+//  for (unsigned int i = 0; i < weights.size(); i++)
+//  {
+//    UncertMLNode * child = new UncertMLNode();
+//    child->setElementName("component");
+//    XMLAttributes attributes = XMLAttributes();
+//    attributes.add("weight", weights[i]);
+//    child->setAttributes(attributes);
+//    node->addChild(child);
+//  }
+//
+//  return node;
+//}
+//
+//
+//void setupMixedDistrib(Model* model, vector<string> distributions, vector<string> weights, string id, vector<vector<string>> argvec, string formargs)
+//{
+//  assert(distributions.size() == argvec.size()+1);
+//  string argstring = "";
+//  vector<string> numberedvec;
+//  vector<string> straightvec;
+//  vector<string> numvec;
+//  stringstream str;
+//  for (size_t sub=0; sub<argvec.size(); sub++) {
+//    vector<string> args = argvec[sub];
+//    string numcommas = "";
+//    string straightcommas = "";
+//    for (size_t a=0; a<args.size(); a++) {
+//      if (a>0 || sub>0) {
+//        argstring += ", ";
+//      }
+//      if (a>0) {
+//        numcommas += ", ";
+//        straightcommas += ", ";
+//      }
+//      straightcommas += args[a];
+//      str.str("");
+//      str << args[a] << sub;
+//      numberedvec.push_back(str.str());
+//      argstring += str.str();
+//      numcommas += str.str();
+//    }
+//    straightvec.push_back(straightcommas);
+//    numvec.push_back(numcommas);
+//  }
+//  FunctionDefinition* fd = addFunctionDefinition(model, argstring);
+//  fd->setId(id);
+//  DistribFunctionDefinitionPlugin* dfdp = static_cast<DistribFunctionDefinitionPlugin*>(fd->getPlugin("distrib"));
+//  DrawFromDistribution* dfd = dfdp->createDrawFromDistribution();
+//  for (size_t a=0; a<numberedvec.size(); a++) {
+//    DistribInput* di = dfd->createDistribInput();
+//    di->setId(numberedvec[a]);
+//    di->setIndex(a);
+//  }
+//
+//  UncertMLNode* mixedRoot = createMixtureNode(distributions[0], weights);
+//  for (size_t d=1; d<distributions.size(); d++) {
+//    UncertMLNode* dist = UncertMLNode::createDistributionNode(distributions[d], straightvec[d-1], numvec[d-1]);
+//    mixedRoot->getChild(d-1)->addChild(dist);
+//  }
+//  dfd->setUncertML(mixedRoot);
+//
+//  EventAssignment* ea = model->getEvent(0)->getEventAssignment(0);
+//  ASTNode* astn = SBML_parseL3Formula((id + "(" + formargs + ")").c_str());
+//  ea->setMath(astn);
+//  delete astn;
+//}
+
 void CreateStandardDistributions()
 {
   int testnum = 39;
@@ -169,17 +287,19 @@ void CreateStandardDistributions()
   writeSBML(document,testid.str().c_str());
   delete document;
  
-  //document = createBasicSBMLDocument();
-  //args.clear();
-  //testid.str("");
+  document = createBasicSBMLDocument();
+  args.clear();
+  testid.str("");
   testnum++;
-  //testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  //args.push_back("normal_with_variance");
-  //args.push_back("mean");
-  //args.push_back("variance");
-  //setupDistrib(document->getModel(), "normalDistribution", args, "0, 1.5");
-  //writeSBML(document,testid.str().c_str());
-  //delete document;
+  testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
+  args.push_back("normal");
+  args.push_back("mean");
+  args.push_back("variance");
+  Model* model = document->getModel();
+  setupDistrib(model, "normalDistribution", args, "0, variance");
+  addVariance(model, "1.5^2");
+  writeSBML(document,testid.str().c_str());
+  delete document;
  
   document = createBasicSBMLDocument();
   args.clear();
@@ -469,7 +589,7 @@ void CreateStandardDistributions()
   //document = createBasicSBMLDocument();
   //args.clear();
   //testid.str("");
-  testnum++;
+  //testnum++;
   //testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
   //args.push_back("geometric");
   //args.push_back("probability");
@@ -480,7 +600,7 @@ void CreateStandardDistributions()
   //document = createBasicSBMLDocument();
   //args.clear();
   //testid.str("");
-  testnum++;
+  //testnum++;
   //testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
   //args.push_back("hypergeometric");
   //args.push_back("numberOfSuccesses");
@@ -493,7 +613,7 @@ void CreateStandardDistributions()
   //document = createBasicSBMLDocument();
   //args.clear();
   //testid.str("");
-  testnum++;
+  //testnum++;
   //testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
   //args.push_back("negative_binomial");
   //args.push_back("numberOfFailures");
@@ -519,7 +639,8 @@ void CreateTruncatedDistributions()
   args.push_back("mean");
   args.push_back("stddev");
   args.push_back("truncationLowerBound");
-  setupDistrib(document->getModel(), "normalDistribution", args, "0, 1.5, -0.5, INF");
+  args.push_back("truncationUpperBound");
+  setupDistrib(document->getModel(), "normalDistribution", args, "0, 1.5, -0.5, infinity");
   writeSBML(document,testid.str().c_str());
   delete document;
  
@@ -531,8 +652,9 @@ void CreateTruncatedDistributions()
   args.push_back("normal");
   args.push_back("mean");
   args.push_back("stddev");
+  args.push_back("truncationLowerBound");
   args.push_back("truncationUpperBound");
-  setupDistrib(document->getModel(), "normalDistribution", args, "0, 1.5, -INF, 0.5");
+  setupDistrib(document->getModel(), "normalDistribution", args, "0, 1.5, -infinity, 0.5");
   writeSBML(document,testid.str().c_str());
   delete document;
  
@@ -545,7 +667,8 @@ void CreateTruncatedDistributions()
   args.push_back("mean");
   args.push_back("stddev");
   args.push_back("truncationLowerBound");
-  setupDistrib(document->getModel(), "normalDistribution", args, "0, 1.5, 0.5, INF");
+  args.push_back("truncationUpperBound");
+  setupDistrib(document->getModel(), "normalDistribution", args, "0, 1.5, 0.5, infinity");
   writeSBML(document,testid.str().c_str());
   delete document;
  
@@ -557,8 +680,9 @@ void CreateTruncatedDistributions()
   args.push_back("normal");
   args.push_back("mean");
   args.push_back("stddev");
+  args.push_back("truncationLowerBound");
   args.push_back("truncationUpperBound");
-  setupDistrib(document->getModel(), "normalDistribution", args, "0, 1.5, -INF, -0.5");
+  setupDistrib(document->getModel(), "normalDistribution", args, "0, 1.5, -infinity, -0.5");
   writeSBML(document,testid.str().c_str());
   delete document;
  
@@ -576,19 +700,20 @@ void CreateTruncatedDistributions()
   writeSBML(document,testid.str().c_str());
   delete document;
  
-  //document = createBasicSBMLDocument();
-  //args.clear();
-  //testid.str("");
+  document = createBasicSBMLDocument();
+  args.clear();
+  testid.str("");
   testnum++;
-  //testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  //args.push_back("normal_with_variance");
-  //args.push_back("mean");
-  //args.push_back("variance");
-  //args.push_back("truncationLowerBound");
-  //args.push_back("truncationUpperBound");
-  //setupDistrib(document->getModel(), "normalDistribution", args, "0, 0.25, -0.5, 0.5");
-  //writeSBML(document,testid.str().c_str());
-  //delete document;
+  testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
+  args.push_back("normal");
+  args.push_back("mean");
+  args.push_back("variance");
+  args.push_back("truncationLowerBound");
+  args.push_back("truncationUpperBound");
+  setupDistrib(document->getModel(), "normalDistribution", args, "0, variance, -0.5, 0.5");
+  addVariance(document->getModel(), "0.25^2");
+  writeSBML(document,testid.str().c_str());
+  delete document;
  
   document = createBasicSBMLDocument();
   args.clear();
@@ -626,7 +751,8 @@ void CreateTruncatedDistributions()
   args.push_back("exponential");
   args.push_back("rate");
   args.push_back("truncationLowerBound");
-  setupDistrib(document->getModel(), "exponentialDistribution", args, "1, 0.25, INF");
+  args.push_back("truncationUpperBound");
+  setupDistrib(document->getModel(), "exponentialDistribution", args, "1, 0.25, infinity");
   writeSBML(document,testid.str().c_str());
   delete document;
  
@@ -637,8 +763,9 @@ void CreateTruncatedDistributions()
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
   args.push_back("exponential");
   args.push_back("rate");
+  args.push_back("truncationLowerBound");
   args.push_back("truncationUpperBound");
-  setupDistrib(document->getModel(), "exponentialDistribution", args, "1, -INF, 0.75");
+  setupDistrib(document->getModel(), "exponentialDistribution", args, "1, -infinity, 0.75");
   writeSBML(document,testid.str().c_str());
   delete document;
  
@@ -674,7 +801,7 @@ void CreateUncommonTruncatedDistributions()
   args.push_back("scale");
   args.push_back("truncationLowerBound");
   args.push_back("truncationUpperBound");
-  setupDistrib(document->getModel(), "gammaDistribution", args, "1, 2, 0.5");
+  setupDistrib(document->getModel(), "gammaDistribution", args, "1, 2, 0.5, 10");
   writeSBML(document,testid.str().c_str());
   delete document;
  
@@ -922,7 +1049,7 @@ void CreateDistributionsWithValues()
   stringstream testid;
   string id;
   vector<string> internalargs;
-  vector<string> internalvals;
+  vector<double> internalvals;
   vector<string> internaltypes;
   SBMLDocument* document;
 
@@ -933,12 +1060,12 @@ void CreateDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_normal";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("0");
+  internalvals.push_back(0);
   internaltypes.push_back("rVal");
   internalargs.push_back("stddev");
-  internalvals.push_back("1.5");
+  internalvals.push_back(1.5);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -951,12 +1078,12 @@ void CreateDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_normal_with_variance";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("0");
+  internalvals.push_back(0);
   internaltypes.push_back("rVal");
   internalargs.push_back("variance");
-  internalvals.push_back("1.5");
+  internalvals.push_back(1.5);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -969,12 +1096,12 @@ void CreateDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_uniform";
+  id = "uniform";
   internalargs.push_back("minimum");
-  internalvals.push_back("0");
+  internalvals.push_back(0);
   internaltypes.push_back("rVal");
   internalargs.push_back("maximum");
-  internalvals.push_back("1");
+  internalvals.push_back(1);
   internaltypes.push_back("rVal");
   setupDistribWithVals(document->getModel(), "uniformDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -987,9 +1114,9 @@ void CreateDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_exponential";
+  id = "exponential";
   internalargs.push_back("rate");
-  internalvals.push_back("1");
+  internalvals.push_back(1);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "exponentialDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -1002,9 +1129,9 @@ void CreateDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_exponential";
+  id = "exponential";
   internalargs.push_back("rate");
-  internalvals.push_back("0.5");
+  internalvals.push_back(0.5);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "exponentialDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -1017,12 +1144,12 @@ void CreateDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_gamma";
+  id = "gamma";
   internalargs.push_back("shape");
-  internalvals.push_back("1");
+  internalvals.push_back(1);
   internaltypes.push_back("prVal");
   internalargs.push_back("scale");
-  internalvals.push_back("2");
+  internalvals.push_back(2);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "gammaDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -1035,12 +1162,12 @@ void CreateDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_gamma";
+  id = "gamma";
   internalargs.push_back("shape");
-  internalvals.push_back("2");
+  internalvals.push_back(2);
   internaltypes.push_back("prVal");
   internalargs.push_back("scale");
-  internalvals.push_back("1.1");
+  internalvals.push_back(1.1);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "gammaDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -1053,9 +1180,9 @@ void CreateDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_poisson";
+  id = "poisson";
   internalargs.push_back("rate");
-  internalvals.push_back("1.5");
+  internalvals.push_back(1.5);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "poissonDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -1069,7 +1196,7 @@ void CreateDistributionsWithMixedValues()
   stringstream testid;
   string id = "";
   vector<string> internalargs;
-  vector<string> internalvals;
+  vector<double> internalvals;
   vector<string> internaltypes;
 
   SBMLDocument* document = createBasicSBMLDocument();
@@ -1079,12 +1206,12 @@ void CreateDistributionsWithMixedValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_normal";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("mean");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   internalargs.push_back("stddev");
-  internalvals.push_back("1.5");
+  internalvals.push_back(1.5);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "0");
   writeSBML(document,testid.str().c_str());
@@ -1097,12 +1224,12 @@ void CreateDistributionsWithMixedValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_normal_with_variance";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("mean");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   internalargs.push_back("variance");
-  internalvals.push_back("1.5");
+  internalvals.push_back(1.5);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "0");
   writeSBML(document,testid.str().c_str());
@@ -1115,12 +1242,12 @@ void CreateDistributionsWithMixedValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_normal";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("0");
+  internalvals.push_back(0);
   internaltypes.push_back("rVal");
   internalargs.push_back("stddev");
-  internalvals.push_back("stddev");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "1.5");
   writeSBML(document,testid.str().c_str());
@@ -1133,12 +1260,12 @@ void CreateDistributionsWithMixedValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_normal_with_variance";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("0");
+  internalvals.push_back(0);
   internaltypes.push_back("rVal");
   internalargs.push_back("variance");
-  internalvals.push_back("variance");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "1.5");
   writeSBML(document,testid.str().c_str());
@@ -1151,12 +1278,12 @@ void CreateDistributionsWithMixedValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_uniform";
+  id = "uniform";
   internalargs.push_back("minimum");
-  internalvals.push_back("minimum");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   internalargs.push_back("maximum");
-  internalvals.push_back("1");
+  internalvals.push_back(1);
   internaltypes.push_back("rVal");
   setupDistribWithVals(document->getModel(), "uniformDistribution", id, internalargs, internalvals, internaltypes, "0");
   writeSBML(document,testid.str().c_str());
@@ -1169,12 +1296,12 @@ void CreateDistributionsWithMixedValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_uniform";
+  id = "uniform";
   internalargs.push_back("minimum");
-  internalvals.push_back("0");
+  internalvals.push_back(0);
   internaltypes.push_back("rVal");
   internalargs.push_back("maximum");
-  internalvals.push_back("maximum");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   setupDistribWithVals(document->getModel(), "uniformDistribution", id, internalargs, internalvals, internaltypes, "1");
   writeSBML(document,testid.str().c_str());
@@ -1187,12 +1314,12 @@ void CreateDistributionsWithMixedValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_gamma";
+  id = "gamma";
   internalargs.push_back("shape");
-  internalvals.push_back("shape");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   internalargs.push_back("scale");
-  internalvals.push_back("2");
+  internalvals.push_back(2);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "gammaDistribution", id, internalargs, internalvals, internaltypes, "1");
   writeSBML(document,testid.str().c_str());
@@ -1205,12 +1332,12 @@ void CreateDistributionsWithMixedValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "predefined_gamma";
+  id = "gamma";
   internalargs.push_back("shape");
-  internalvals.push_back("1");
+  internalvals.push_back(1);
   internaltypes.push_back("prVal");
   internalargs.push_back("scale");
-  internalvals.push_back("scale");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   setupDistribWithVals(document->getModel(), "gammaDistribution", id, internalargs, internalvals, internaltypes, "2");
   writeSBML(document,testid.str().c_str());
@@ -1224,7 +1351,7 @@ void CreateTruncatedDistributionsWithValues()
   stringstream testid;
   string id = "";
   vector<string> internalargs;
-  vector<string> internalvals;
+  vector<double> internalvals;
   vector<string> internaltypes;
   SBMLDocument* document;
   
@@ -1235,15 +1362,18 @@ void CreateTruncatedDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "lower_truncated_normal";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("0");
+  internalvals.push_back(0);
   internaltypes.push_back("rVal");
   internalargs.push_back("stddev");
-  internalvals.push_back("1.5");
+  internalvals.push_back(1.5);
   internaltypes.push_back("prVal");
+  internalargs.push_back("truncationUpperBound");
+  internalvals.push_back(std::numeric_limits<double>::infinity());
+  internaltypes.push_back("rVal");
   internalargs.push_back("truncationLowerBound");
-  internalvals.push_back("-0.5");
+  internalvals.push_back(-0.5);
   internaltypes.push_back("rVal");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -1256,15 +1386,18 @@ void CreateTruncatedDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "lower_truncated_normal";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("mean");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   internalargs.push_back("stddev");
-  internalvals.push_back("stddev");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   internalargs.push_back("truncationLowerBound");
-  internalvals.push_back("-0.5");
+  internalvals.push_back(-0.5);
+  internaltypes.push_back("rVal");
+  internalargs.push_back("truncationUpperBound");
+  internalvals.push_back(std::numeric_limits<double>::infinity());
   internaltypes.push_back("rVal");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "0,1.5");
   writeSBML(document,testid.str().c_str());
@@ -1277,15 +1410,18 @@ void CreateTruncatedDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "upper_truncated_normal";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("0");
+  internalvals.push_back(0);
   internaltypes.push_back("rVal");
   internalargs.push_back("stddev");
-  internalvals.push_back("1.5");
+  internalvals.push_back(1.5);
   internaltypes.push_back("prVal");
+  internalargs.push_back("truncationLowerBound");
+  internalvals.push_back(-std::numeric_limits<double>::infinity());
+  internaltypes.push_back("rVal");
   internalargs.push_back("truncationUpperBound");
-  internalvals.push_back("0.5");
+  internalvals.push_back(0.5);
   internaltypes.push_back("rVal");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -1298,15 +1434,18 @@ void CreateTruncatedDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "000" << testnum << "/000" << testnum << "-sbml-l3v1.xml";
-  id = "upper_truncated_normal";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("mean");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   internalargs.push_back("stddev");
-  internalvals.push_back("stddev");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
+  internalargs.push_back("truncationLowerBound");
+  internalvals.push_back(-std::numeric_limits<double>::infinity());
+  internaltypes.push_back("rVal");
   internalargs.push_back("truncationUpperBound");
-  internalvals.push_back("0.5");
+  internalvals.push_back(0.5);
   internaltypes.push_back("rVal");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "0,1.5");
   writeSBML(document,testid.str().c_str());
@@ -1319,18 +1458,18 @@ void CreateTruncatedDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "00" << testnum << "/00" << testnum << "-sbml-l3v1.xml";
-  id = "lower_truncated_normal";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("0");
+  internalvals.push_back(0);
   internaltypes.push_back("rVal");
   internalargs.push_back("stddev");
-  internalvals.push_back("0.5");
+  internalvals.push_back(0.5);
   internaltypes.push_back("prVal");
   internalargs.push_back("truncationLowerBound");
-  internalvals.push_back("-0.5");
+  internalvals.push_back(-0.5);
   internaltypes.push_back("rVal");
   internalargs.push_back("truncationUpperBound");
-  internalvals.push_back("0.5");
+  internalvals.push_back(0.5);
   internaltypes.push_back("rVal");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -1343,18 +1482,18 @@ void CreateTruncatedDistributionsWithValues()
   testid.str("");
   testnum++;
   testid << "00" << testnum << "/00" << testnum << "-sbml-l3v1.xml";
-  id = "upper_truncated_normal";
+  id = "normal";
   internalargs.push_back("mean");
-  internalvals.push_back("mean");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   internalargs.push_back("stddev");
-  internalvals.push_back("stddev");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   internalargs.push_back("truncationLowerBound");
-  internalvals.push_back("-0.5");
+  internalvals.push_back(-0.5);
   internaltypes.push_back("rVal");
   internalargs.push_back("truncationUpperBound");
-  internalvals.push_back("0.5");
+  internalvals.push_back(0.5);
   internaltypes.push_back("rVal");
   setupDistribWithVals(document->getModel(), "normalDistribution", id, internalargs, internalvals, internaltypes, "0, 0.5");
   writeSBML(document,testid.str().c_str());
@@ -1369,13 +1508,13 @@ void CreateTruncatedDistributionsWithValues()
   testid << "00" << testnum << "/00" << testnum << "-sbml-l3v1.xml";
   id = "exponential";
   internalargs.push_back("rate");
-  internalvals.push_back("1");
+  internalvals.push_back(1);
   internaltypes.push_back("prVal");
   internalargs.push_back("truncationLowerBound");
-  internalvals.push_back("0.25");
+  internalvals.push_back(0.25);
   internaltypes.push_back("prVal");
   internalargs.push_back("truncationUpperBound");
-  internalvals.push_back("0.75");
+  internalvals.push_back(0.75);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "exponentialDistribution", id, internalargs, internalvals, internaltypes, "");
   writeSBML(document,testid.str().c_str());
@@ -1390,13 +1529,13 @@ void CreateTruncatedDistributionsWithValues()
   testid << "00" << testnum << "/00" << testnum << "-sbml-l3v1.xml";
   id = "exponential";
   internalargs.push_back("rate");
-  internalvals.push_back("rate");
+  internalvals.push_back(VALUE_FLAG);
   internaltypes.push_back("varId");
   internalargs.push_back("truncationLowerBound");
-  internalvals.push_back("0.25");
+  internalvals.push_back(0.25);
   internaltypes.push_back("prVal");
   internalargs.push_back("truncationUpperBound");
-  internalvals.push_back("0.75");
+  internalvals.push_back(0.75);
   internaltypes.push_back("prVal");
   setupDistribWithVals(document->getModel(), "exponentialDistribution", id, internalargs, internalvals, internaltypes, "1");
   writeSBML(document,testid.str().c_str());
@@ -1404,127 +1543,13 @@ void CreateTruncatedDistributionsWithValues()
  
 }
 
-void CreateMixtureDistribution()
-{
-  int testnum = 103;
-  stringstream testid;
-  vector<string> args;
-  vector<vector<string> > allargs;
-  vector<string> distributions;
-  vector<string> weights;
-  SBMLDocument* document;
-
-  //document = createBasicSBMLDocument();
-  //args.clear();
-  //allargs.clear();
-  //distributions.clear();
-  //weights.clear();
-  //testid.str("");
-  //testnum++;
-  //testid << "00" << testnum << "/00" << testnum << "-sbml-l3v1.xml";
-  //distributions.push_back("ContinuousUnivariateMixtureModel");
-  //distributions.push_back("NormalDistribution");
-  //weights.push_back("0.5");
-  //args.push_back("mean");
-  //args.push_back("stddev");
-  //allargs.push_back(args);
-  //args.clear();
-  //distributions.push_back("NormalDistribution");
-  //weights.push_back("0.5");
-  //args.push_back("mean");
-  //args.push_back("stddev");
-  //allargs.push_back(args);
-  //args.clear();
-  //setupMixedDistrib(document->getModel(), distributions, weights, "two_mixed_normals", allargs, "-1, 0.5, 1, 0.5");
-  //writeSBML(document,testid.str().c_str());
-  //delete document;
- 
-  //document = createBasicSBMLDocument();
-  //args.clear();
-  //allargs.clear();
-  //distributions.clear();
-  //weights.clear();
-  //testid.str("");
-  //testnum++;
-  //testid << "00" << testnum << "/00" << testnum << "-sbml-l3v1.xml";
-  //distributions.push_back("ContinuousUnivariateMixtureModel");
-  //distributions.push_back("NormalDistribution");
-  //weights.push_back("0.5");
-  //args.push_back("mean");
-  //args.push_back("stddev");
-  //allargs.push_back(args);
-  //args.clear();
-  //distributions.push_back("NormalDistribution");
-  //weights.push_back("0.5");
-  //args.push_back("mean");
-  //args.push_back("stddev");
-  //allargs.push_back(args);
-  //args.clear();
-  //setupMixedDistrib(document->getModel(), distributions, weights, "two_mixed_normals", allargs, "0, 1, 1, 0.5");
-  //writeSBML(document,testid.str().c_str());
-  //delete document;
- 
-  //document = createBasicSBMLDocument();
-  //args.clear();
-  //allargs.clear();
-  //distributions.clear();
-  //weights.clear();
-  //testid.str("");
-  //testnum++;
-  //testid << "00" << testnum << "/00" << testnum << "-sbml-l3v1.xml";
-  //distributions.push_back("ContinuousUnivariateMixtureModel");
-  //distributions.push_back("NormalDistribution");
-  //weights.push_back("0.5");
-  //args.push_back("mean");
-  //args.push_back("stddev");
-  //allargs.push_back(args);
-  //args.clear();
-  //distributions.push_back("NormalDistribution");
-  //weights.push_back("0.5");
-  //args.push_back("mean");
-  //args.push_back("stddev");
-  //allargs.push_back(args);
-  //args.clear();
-  //setupMixedDistrib(document->getModel(), distributions, weights, "two_mixed_normals", allargs, "0, 1, 0, 0.5");
-  //writeSBML(document,testid.str().c_str());
-  //delete document;
- 
-  //document = createBasicSBMLDocument();
-  //args.clear();
-  //allargs.clear();
-  //distributions.clear();
-  //weights.clear();
-  //testid.str("");
-  //testnum++;
-  //testid << "00" << testnum << "/00" << testnum << "-sbml-l3v1.xml";
-  //distributions.push_back("ContinuousUnivariateMixtureModel");
-  //distributions.push_back("NormalDistribution");
-  //weights.push_back("1");
-  //args.push_back("mean");
-  //args.push_back("stddev");
-  //allargs.push_back(args);
-  //args.clear();
-  //distributions.push_back("NormalDistribution");
-  //weights.push_back("0");
-  //args.push_back("mean");
-  //args.push_back("stddev");
-  //allargs.push_back(args);
-  //args.clear();
-  //setupMixedDistrib(document->getModel(), distributions, weights, "two_mixed_normals", allargs, "0, 1, 5, 0.5");
-  //writeSBML(document,testid.str().c_str());
-  //delete document;
- 
-}
-
 int main(int argc,char** argv)
 {
   CreateStandardDistributions();
   CreateTruncatedDistributions();
-  CreateUncommonTruncatedDistributions();
-  //CreateDistributionsWithValues();
-  //CreateDistributionsWithMixedValues();
-  //CreateTruncatedDistributionsWithValues();
-  //CreateMixtureDistribution();
+  CreateDistributionsWithValues();
+  CreateDistributionsWithMixedValues();
+  CreateTruncatedDistributionsWithValues();
 
 
   //CreateUncommonTruncatedDistributions();
diff --git a/examples/c++/distrib/distrib_example1.cpp b/examples/c++/distrib/distrib_example1.cpp
index f04b63b1..482ab193 100644
--- a/examples/c++/distrib/distrib_example1.cpp
+++ b/examples/c++/distrib/distrib_example1.cpp
@@ -53,7 +53,7 @@ using namespace std;
 LIBSBML_CPP_NAMESPACE_USE
 
 unsigned int coreVersion = 1;
-DistribDrawFromDistribution* setupBasicModel()
+SBMLDocument * setupBasicModel()
 {
   SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
 
@@ -65,21 +65,7 @@ DistribDrawFromDistribution* setupBasicModel()
     = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
   distdoc->setRequired(true);
   Model* model = document->createModel();
-  FunctionDefinition* fd = model->createFunctionDefinition();
-  if (coreVersion == 1)
-  {
-    ASTNode* math = SBML_parseL3Formula("lambda(x, y, NaN)");
-    fd->setMath(math);
-    delete math;
-  }
-  else
-  {
-    fd->setMath(NULL);
-  }
-  fd->setId("distribution");
-  DistribFunctionDefinitionPlugin* dfdp = static_cast<DistribFunctionDefinitionPlugin*>(fd->getPlugin("distrib"));
-  DistribDrawFromDistribution* draw = dfdp->createDistribDrawFromDistribution();
-  return draw;
+  return document;
 }
 
 InitialAssignment* addParamAndIA(Model* model)
@@ -92,63 +78,56 @@ InitialAssignment* addParamAndIA(Model* model)
   return ia;
 }
 
-void setupArguments(DistribDrawFromDistribution* dfd, InitialAssignment* ia, Model* model, vector<string> arguments)
-{
-  string infix = "distribution(";
-  for (size_t i = 0; i < arguments.size(); i++) {
-    string arg = arguments[i];
-    Parameter* param = model->createParameter();
-    param->setConstant(true);
-    param->setId(arg);
-    DistribInput* di = dfd->createDistribInput();
-    di->setId(arg);
-    di->setIndex(i);
-    if (i > 0) {
-      infix += ", ";
-    }
-    infix += arg;
-  }
-  infix += ")";
-  ASTNode* math = SBML_parseL3Formula(infix.c_str());
-  ia->setMath(math);
-  delete math;
-}
-
-void addNormal(DistribDrawFromDistribution* dfd)
-{
-  DistribNormalDistribution normal(3, coreVersion, 1);
-  DistribUncertValue* mean = normal.createMean();
-  mean->setVar("mean");
-  DistribUncertValue* stddev = normal.createStddev();
-  stddev->setVar("stddev");
-  dfd->setDistribution(&normal);
-}
-
-void addNormalWithValues(DistribDrawFromDistribution* dfd)
-{
-  DistribNormalDistribution normal(3, coreVersion, 1);
-  DistribUncertValue* mean = normal.createMean();
-  mean->setValue(5.2);
-  DistribUncertValue* stddev = normal.createStddev();
-  stddev->setValue(1.3);
-  dfd->setDistribution(&normal);
-}
+//void setupArguments(DistribDrawFromDistribution* dfd, InitialAssignment* ia, Model* model, vector<string> arguments)
+//{
+//  string infix = "distribution(";
+//  for (size_t i = 0; i < arguments.size(); i++) {
+//    string arg = arguments[i];
+//    Parameter* param = model->createParameter();
+//    param->setConstant(true);
+//    param->setId(arg);
+//    DistribInput* di = dfd->createDistribInput();
+//    di->setId(arg);
+//    di->setIndex(i);
+//    if (i > 0) {
+//      infix += ", ";
+//    }
+//    infix += arg;
+//  }
+//  infix += ")";
+//  ASTNode* math = SBML_parseL3Formula(infix.c_str());
+//  ia->setMath(math);
+//  delete math;
+//}
+
+//void addNormal(DistribDrawFromDistribution* dfd)
+//{
+//  DistribNormalDistribution normal(3, coreVersion, 1);
+//  DistribUncertValue* mean = normal.createMean();
+//  mean->setVar("mean");
+//  DistribUncertValue* stddev = normal.createStddev();
+//  stddev->setVar("stddev");
+//  dfd->setDistribution(&normal);
+//}
+
+//void addNormalWithValues(DistribDrawFromDistribution* dfd)
+//{
+//  DistribNormalDistribution normal(3, coreVersion, 1);
+//  DistribUncertValue* mean = normal.createMean();
+//  mean->setValue(5.2);
+//  DistribUncertValue* stddev = normal.createStddev();
+//  stddev->setValue(1.3);
+//  dfd->setDistribution(&normal);
+//}
 
 void createExample1()
 {
-  DistribDrawFromDistribution* dfd = setupBasicModel();
-  SBMLDocument* doc = dfd->getSBMLDocument();
+  SBMLDocument* doc = setupBasicModel();
   Model* model = doc->getModel();
   InitialAssignment* ia = addParamAndIA(model);
-  vector<string> arguments;
-  arguments.push_back("mean");
-  arguments.push_back("stddev");
-  setupArguments(dfd, ia, model, arguments);
-  addNormal(dfd);
-  Parameter* mean = model->getParameter("mean");
-  mean->setValue(5.2);
-  Parameter* stddev = model->getParameter("stddev");
-  stddev->setValue(1.3);
+  ASTNode* astn = SBML_parseL3Formula("normal(3,2)");
+  ia->setMath(astn);
+  delete astn;
 
   writeSBMLToFile(doc, "distrib_example1.xml");
   delete doc;
@@ -156,13 +135,19 @@ void createExample1()
 
 void createExample2()
 {
-  DistribDrawFromDistribution* dfd = setupBasicModel();
-  SBMLDocument* doc = dfd->getSBMLDocument();
+  SBMLDocument* doc = setupBasicModel();
   Model* model = doc->getModel();
   InitialAssignment* ia = addParamAndIA(model);
-  vector<string> arguments;
-  setupArguments(dfd, ia, model, arguments);
-  addNormalWithValues(dfd);
+  Parameter* param = model->createParameter();
+  param->setConstant("true");
+  param->setId("x");
+  param = model->createParameter();
+  param->setConstant("true");
+  param->setId("y");
+
+  ASTNode* astn = SBML_parseL3Formula("normal(x,y)");
+  ia->setMath(astn);
+  delete astn;
 
   writeSBMLToFile(doc, "distrib_example2.xml");
   delete doc;
@@ -170,206 +155,217 @@ void createExample2()
 
 void createDistribUncertaintyExample()
 {
-  SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
-
-  // create the document
-  SBMLDocument *document = new SBMLDocument(&sbmlns);
-  DistribSBMLDocumentPlugin* distdoc
-    = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
-  distdoc->setRequired(true);
-  Model* model = document->createModel();
-  Species* s1 = model->createSpecies();
-  DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(s1->getPlugin("distrib"));
-  DistribUncertainty* uncertainty = dsbp->createDistribUncertainty();
-  DistribUncertStatistics* stats = uncertainty->createUncertStatistics();
-  DistribUncertValue* sdev = stats->createStandardDeviation();
-  sdev->setValue(0.3);
-  s1->setInitialAmount(3.22);
-  s1->setId("s1");
-  s1->setCompartment("C");
-  s1->setHasOnlySubstanceUnits(true);
-  s1->setBoundaryCondition(false);
-  s1->setConstant(false);
-  Compartment* c = model->createCompartment();
-  c->setId("C");
-  c->setConstant(true);
-  c->setSize(1);
-  c->setSpatialDimensions(3.0);
-
-  writeSBMLToFile(document, "distrib_example3.xml");
-  delete document;
+  //SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
+
+  //// create the document
+  //SBMLDocument *document = new SBMLDocument(&sbmlns);
+  //DistribSBMLDocumentPlugin* distdoc
+  //  = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
+  //distdoc->setRequired(true);
+  //Model* model = document->createModel();
+  //Species* s1 = model->createSpecies();
+  //DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(s1->getPlugin("distrib"));
+  //Uncertainty* uncertainty = dsbp->createUncertainty();
+  //UncertValue* sdev = uncertainty->createStandardDeviation();
+  //sdev->setValue(0.3);
+  //s1->setInitialAmount(3.22);
+  //s1->setId("s1");
+  //s1->setCompartment("C");
+  //s1->setHasOnlySubstanceUnits(true);
+  //s1->setBoundaryCondition(false);
+  //s1->setConstant(false);
+  //Compartment* c = model->createCompartment();
+  //c->setId("C");
+  //c->setConstant(true);
+  //c->setSize(1);
+  //c->setSpatialDimensions(3.0);
+
+  //writeSBMLToFile(document, "distrib_example3.xml");
+  //delete document;
 }
 
 void createDistribUncertaintyExample2()
 {
-  SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
-
-  // create the document
-  SBMLDocument *document = new SBMLDocument(&sbmlns);
-  DistribSBMLDocumentPlugin* distdoc
-    = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
-  distdoc->setRequired(true);
-  Model* model = document->createModel();
-  Species* s1 = model->createSpecies();
-  DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(s1->getPlugin("distrib"));
-  DistribUncertainty* uncertainty = dsbp->createDistribUncertainty();
-  DistribUncertStatistics* stats = uncertainty->createUncertStatistics();
-  DistribUncertValue* sdev = stats->createStandardDeviation();
-  sdev->setValue(0.3);
-  DistribUncertValue* mean = stats->createMean();
-  mean->setValue(3.2);
-  DistribUncertValue* var = stats->createVariance();
-  var->setValue(0.09);
-  s1->setInitialAmount(3.22);
-  s1->setId("s1");
-  s1->setCompartment("C");
-  s1->setHasOnlySubstanceUnits(true);
-  s1->setBoundaryCondition(false);
-  s1->setConstant(false);
-  Compartment* c = model->createCompartment();
-  c->setId("C");
-  c->setConstant(true);
-  c->setSize(1);
-  c->setSpatialDimensions(3.0);
-
-  writeSBMLToFile(document, "distrib_example4.xml");
-  delete document;
+  //SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
+
+  //// create the document
+  //SBMLDocument *document = new SBMLDocument(&sbmlns);
+  //DistribSBMLDocumentPlugin* distdoc
+  //  = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
+  //distdoc->setRequired(true);
+  //Model* model = document->createModel();
+  //Species* s1 = model->createSpecies();
+  //DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(s1->getPlugin("distrib"));
+  //Uncertainty* uncertainty = dsbp->createUncertainty();
+  //UncertValue* sdev = uncertainty->createStandardDeviation();
+  //sdev->setValue(0.3);
+  //UncertValue* mean = uncertainty->createMean();
+  //mean->setValue(3.2);
+  //UncertValue* var = uncertainty->createVariance();
+  //var->setValue(0.09);
+  //s1->setInitialAmount(3.22);
+  //s1->setId("s1");
+  //s1->setCompartment("C");
+  //s1->setHasOnlySubstanceUnits(true);
+  //s1->setBoundaryCondition(false);
+  //s1->setConstant(false);
+  //Compartment* c = model->createCompartment();
+  //c->setId("C");
+  //c->setConstant(true);
+  //c->setSize(1);
+  //c->setSpatialDimensions(3.0);
+
+  //writeSBMLToFile(document, "distrib_example4.xml");
+  //delete document;
 }
 
 void createDistribUncertaintyExample3()
 {
-  SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
-
-  // create the document
-  SBMLDocument *document = new SBMLDocument(&sbmlns);
-  DistribSBMLDocumentPlugin* distdoc
-    = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
-  distdoc->setRequired(true);
-  Model* model = document->createModel();
-  Parameter* p1 = model->createParameter();
-  p1->setId("mu_Z");
-  p1->setValue(10);
-  p1->setConstant(true);
-  p1 = model->createParameter();
-  p1->setId("var_Z");
-  p1->setValue(0.1);
-  p1->setConstant(true);
-  p1 = model->createParameter();
-  p1->setId("Z");
-  p1->setConstant(true);
-  DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(p1->getPlugin("distrib"));
-  DistribUncertainty* uncertainty = dsbp->createDistribUncertainty();
-  DistribNormalDistribution normal(3, coreVersion, 1);
-  DistribUncertValue* mean = normal.createMean();
-  mean->setVar("mu_Z");
-  DistribUncertValue* var = normal.createVariance();
-  var->setVar("var_Z");
-  uncertainty->setDistribution(&normal);
-
-  writeSBMLToFile(document, "distrib_example5.xml");
-  delete document;
+  //SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
+
+  //// create the document
+  //SBMLDocument *document = new SBMLDocument(&sbmlns);
+  //DistribSBMLDocumentPlugin* distdoc
+  //  = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
+  //distdoc->setRequired(true);
+  //Model* model = document->createModel();
+  //Parameter* p1 = model->createParameter();
+  //p1->setId("mu_Z");
+  //p1->setValue(10);
+  //p1->setConstant(true);
+  //p1 = model->createParameter();
+  //p1->setId("var_Z");
+  //p1->setValue(0.1);
+  //p1->setConstant(true);
+  //p1 = model->createParameter();
+  //p1->setId("Z");
+  //p1->setConstant(true);
+  //DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(p1->getPlugin("distrib"));
+  //Uncertainty* uncertainty = dsbp->createUncertainty();
+  //Distribution* dist = uncertainty->createDistribution();
+  //UncertValue* mean = uncertainty->createMean();
+  //mean->setVar("mu_Z");
+  //UncertValue* var = uncertainty->createVariance();
+  //var->setVar("var_Z");
+  //ASTNode* astn = SBML_parseL3Formula("normal(mu_Z, var_Z)");
+  //dist->setMath(astn);
+  //delete astn;
+
+  //writeSBMLToFile(document, "distrib_example5.xml");
+  //delete document;
 }
 
 void createDistribUncertaintyExample4()
 {
-  SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
-
-  // create the document
-  SBMLDocument *document = new SBMLDocument(&sbmlns);
-  DistribSBMLDocumentPlugin* distdoc
-    = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
-  distdoc->setRequired(true);
-  Model* model = document->createModel();
-  Species* s1 = model->createSpecies();
-  DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(s1->getPlugin("distrib"));
-  DistribUncertainty* uncertainty = dsbp->createDistribUncertainty();
-  DistribCategoricalDistribution d(3, coreVersion, 1);
-  DistribCategory cat(3, coreVersion, 1);
-  cat.setId("patient1");
-  DistribUncertValue* prob = cat.createProbability();
-  prob->setValue(0.5);
-  DistribUncertValue* val = cat.createValue();
-  val->setValue(1.01);
-  d.addDistribCategory(&cat);
-  cat.setId("patient2");
-  val->setValue(2.24);
-  prob->setValue(0.25);
-  d.addDistribCategory(&cat);
-  cat.setId("patient3");
-  val->setValue(1.72);
-  cat.unsetProbability(); //To let it sum to one automatically.
-  d.addDistribCategory(&cat);
-  uncertainty->setDistribution(&d);
-  s1->setId("s1");
-  s1->setCompartment("C");
-  s1->setHasOnlySubstanceUnits(true);
-  s1->setBoundaryCondition(false);
-  s1->setConstant(false);
-  Compartment* c = model->createCompartment();
-  c->setId("C");
-  c->setConstant(true);
-  c->setSize(1);
-  c->setSpatialDimensions(3.0);
-
-  writeSBMLToFile(document, "distrib_example6.xml");
-  delete document;
+  //SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
+
+  //// create the document
+  //SBMLDocument *document = new SBMLDocument(&sbmlns);
+  //DistribSBMLDocumentPlugin* distdoc
+  //  = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
+  //distdoc->setRequired(true);
+  //Model* model = document->createModel();
+  //Species* s1 = model->createSpecies();
+  //DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(s1->getPlugin("distrib"));
+  //Uncertainty* uncertainty = dsbp->createUncertainty();
+  //Distribution* dist = uncertainty->createDistribution();
+  //dist->setName("CategoricalDistribution");
+  ////  dist->setDefinitionURL("http://www.probonto.org/ontology#PROB_k0000248"); // Categorical Nonordered
+  //ExternalParameter* p = uncertainty->createExternalParameter();
+  //p->setId("patient1");
+  //p->setDefinitionURL("http://purl.obolibrary.org/obo/OBI_0001930"); // categorical value specification
+  //ExternalParameter * pp = ((ExternalParameter*)(p))->createExternalParameter();
+  //pp->setVar("probability");
+  //pp->setValue(0.5);
+  //pp->setDefinitionURL("http://www.probonto.org/ontology#PROB_k0000255"); //category probabilities of Categorical-Nonordered-1
+  //pp = ((ExternalParameter*)(p))->createExternalParameter();
+  //pp->setVar("value");
+  //pp->setValue(1.01);
+  //pp->setDefinitionURL("http://www.probonto.org/ontology#PROB_c0000019"); //random variable
+  //p = uncertainty->createExternalParameter();
+  //p->setId("patient2"); 
+  //p->setDefinitionURL("http://purl.obolibrary.org/obo/OBI_0001930"); // categorical value specification
+  //pp = ((ExternalParameter*)(p))->createExternalParameter();
+  //pp->setVar("probability");
+  //pp->setValue(0.25);
+  //pp->setDefinitionURL("http://www.probonto.org/ontology#PROB_k0000255"); //category probabilities of Categorical-Nonordered-1
+  //pp = ((ExternalParameter*)(p))->createExternalParameter();
+  //pp->setVar("value");
+  //pp->setValue(2.24);  
+  //pp->setDefinitionURL("http://www.probonto.org/ontology#PROB_c0000019"); //random variable
+  //p = uncertainty->createExternalParameter();
+  //p->setId("patient3"); 
+  //p->setDefinitionURL("http://purl.obolibrary.org/obo/OBI_0001930"); // categorical value specification
+  //pp = ((ExternalParameter*)(p))->createExternalParameter();
+  //pp->setVar("value");
+  //pp->setValue(1.72);  
+  //pp->setDefinitionURL("http://www.probonto.org/ontology#PROB_c0000019"); //random variable
+
+  //s1->setId("s1");
+  //s1->setCompartment("C");
+  //s1->setHasOnlySubstanceUnits(true);
+  //s1->setBoundaryCondition(false);
+  //s1->setConstant(false);
+  //Compartment* c = model->createCompartment();
+  //c->setId("C");
+  //c->setConstant(true);
+  //c->setSize(1);
+  //c->setSpatialDimensions(3.0);
+
+  //writeSBMLToFile(document, "distrib_example6.xml");
+  //delete document;
 }
 
 void createUncertainGender()
 {
-  SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
-
-  // create the document
-  SBMLDocument *document = new SBMLDocument(&sbmlns);
-  Model* model = document->createModel();
-  DistribSBMLDocumentPlugin* distdoc
-    = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
-  distdoc->setRequired(true);
-  Parameter* p1 = model->createParameter();
-  p1->setId("gender");
-  p1->setConstant(false);
-  DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(p1->getPlugin("distrib"));
-  DistribUncertainty* uncertainty = dsbp->createDistribUncertainty();
-  DistribCategoricalDistribution d(3, coreVersion, 1);
-  DistribCategory cat(3, coreVersion, 1);
-  cat.setId("male");
-  DistribUncertValue* prob = cat.createProbability();
-  prob->setValue(0.5);
-  DistribUncertValue* val = cat.createValue();
-  val->setValue(0);
-  d.addDistribCategory(&cat);
-  cat.setId("female");
-  val->setValue(1);
-  prob->setValue(0.5);
-  d.addDistribCategory(&cat);
-  uncertainty->setDistribution(&d);
-
-  writeSBMLToFile(document, "distrib_example7.xml");
-  delete document;
+//  SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
+//
+//  // create the document
+//  SBMLDocument *document = new SBMLDocument(&sbmlns);
+//  Model* model = document->createModel();
+//  DistribSBMLDocumentPlugin* distdoc
+//    = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
+//  distdoc->setRequired(true);
+//  Parameter* p1 = model->createParameter();
+//  p1->setId("gender");
+//  p1->setConstant(false);
+//  DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(p1->getPlugin("distrib"));
+//  Uncertainty* uncertainty = dsbp->createUncertainty();
+//  Distribution* dist = uncertainty->createDistribution();
+//  dist->setName("CategoricalDistribution");
+////  dist->setDefinitionURL("http://www.probonto.org/ontology#PROB_k0000248"); // Categorical Nonordered
+//  ExternalParameter* p = uncertainty->createExternalParameter();
+//  p->setId("male");
+//  p->setDefinitionURL("http://purl.obolibrary.org/obo/OBI_0001930"); // categorical value specification
+//  ExternalParameter * pp = ((ExternalParameter*)(p))->createExternalParameter();
+//  pp->setDefinitionURL("http://www.probonto.org/ontology#PROB_k0000255"); //category probabilities of Categorical-Nonordered-1
+//  pp->setVar("probability");
+//  pp->setValue(0.5);
+//  pp = ((ExternalParameter*)(p))->createExternalParameter();
+//  pp->setVar("value");
+//  pp->setValue(0);  
+//  pp->setDefinitionURL("http://www.probonto.org/ontology#PROB_c0000019"); //random variable
+//  p = uncertainty->createExternalParameter();
+//  p->setId("female");
+//  p->setDefinitionURL("http://purl.obolibrary.org/obo/OBI_0001930"); // categorical value specification
+//  pp = ((ExternalParameter*)(p))->createExternalParameter();
+//  pp->setDefinitionURL("http://www.probonto.org/ontology#PROB_k0000255"); //category probabilities of Categorical-Nonordered-1
+//  pp->setVar("probability");
+//  pp->setValue(0.5);
+//  pp = ((ExternalParameter*)(p))->createExternalParameter();
+//  pp->setVar("value");
+//  pp->setValue(1);
+//  pp->setDefinitionURL("http://www.probonto.org/ontology#PROB_c0000019"); //random variable
+//
+//  writeSBMLToFile(document, "distrib_example7.xml");
+//  delete document;
 }
 
 void createPkPd()
 {
   SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
-  DistribDrawFromDistribution* dfd = setupBasicModel();
-  SBMLDocument* doc = dfd->getSBMLDocument();
-  Model* model = doc->getModel();
-  FunctionDefinition* fd = model->getFunctionDefinition(0);
-  ASTNode* astn = SBML_parseL3Formula("lambda(scale, shape, NaN)");
-  fd->setMath(astn);
-  fd->setId("logNormal");
-  DistribInput* di = dfd->createDistribInput();
-  di->setId("scale");
-  di->setIndex(0);
-  di = dfd->createDistribInput();
-  di->setId("shape");
-  di->setIndex(1);
-  DistribLogNormalDistribution logn(3, coreVersion, 1);
-  DistribUncertValue* uv = logn.createLogScale();
-  uv->setVar("scale");
-  uv = logn.createShape();
-  uv->setVar("shape");
-  dfd->setDistribution(&logn);
+  SBMLDocument * doc = setupBasicModel();
+  Model * model = doc->getModel();
 
   Compartment comp(&sbmlns);
   comp.setId("central");
@@ -405,8 +401,7 @@ void createPkPd()
 
   InitialAssignment ia(&sbmlns);
   ia.setSymbol("central");
-  delete astn;
-  astn = SBML_parseL3Formula("logNormal(0.5, 0.1)");
+  ASTNode* astn = SBML_parseL3Formula("lognormal(0.5, 0.1)");
   ia.setMath(astn);
   model->addInitialAssignment(&ia);
   ia.setSymbol("ka");
@@ -460,193 +455,193 @@ void createPkPd()
   delete doc;
 }
 
-void createExternalExponential()
-{
-  SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
-
-  // create the document
-  SBMLDocument *document = new SBMLDocument(&sbmlns);
-  DistribSBMLDocumentPlugin* distdoc
-    = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
-  distdoc->setRequired(true);
-  Model* model = document->createModel();
-  FunctionDefinition* fd = model->createFunctionDefinition();
-  fd->setId("Exponential2");
-  DistribFunctionDefinitionPlugin* dfdp = static_cast<DistribFunctionDefinitionPlugin*>(fd->getPlugin("distrib"));
-  DistribDrawFromDistribution* dfd = dfdp->createDistribDrawFromDistribution();
-  DistribInput* input = dfd->createDistribInput();
-  input->setId("beta");
-  input->setIndex(0);
-  DistribExternalDistribution ext(3, coreVersion, 1);
-  ext.setDefinitionURL("http://www.probonto.org/ontology#PROB_k0000353");
-  ext.setName("Exponential 2");
-  DistribExternalParameter* param = ext.createDistribExternalParameter();
-  param->setDefinitionURL("http://www.probonto.org/ontology#PROB_k0000362");
-  param->setName("Beta");
-  param->setVar("beta");
-  dfd->setDistribution(&ext);
-
-  writeSBMLToFile(document, "distrib_example8.xml");
-  delete document;
-}
-
-void createUserDefined()
-{
-  DistribDrawFromDistribution* dfd = setupBasicModel();
-  SBMLDocument* doc = dfd->getSBMLDocument();
-  Model* model = doc->getModel();
-  InitialAssignment* ia = addParamAndIA(model);
-  addNormal(dfd);
-
-  vector<string> arguments;
-  arguments.push_back("mean");
-  arguments.push_back("stddev");
-  setupArguments(dfd, ia, model, arguments);
-  Parameter* param = model->createParameter();
-  param->setConstant(true);
-  param->setId("V_pop");
-  param->setValue(100);
-  param = model->createParameter();
-  param->setConstant(true);
-  param->setId("V_omega");
-  param->setValue(0.25);
-  ASTNode* astn = SBML_parseL3Formula("normal(V_pop, V_omega)");
-  ia->setMath(astn);
-  param = model->getParameter("P1");
-  param->setId("V");
-  ia->setSymbol("V");
-  delete astn;
-  DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(ia->getPlugin("distrib"));
-  DistribUncertainty* uncert = dsbp->createDistribUncertainty();
-  DistribUncertStatistics* stats = uncert->createUncertStatistics();
-  DistribUncertValue uv(3, coreVersion, 1);
-  uv.setVar("V_pop");
-  stats->setMean(&uv);
-  uv.setVar("V_omega");
-  stats->setStandardDeviation(&uv);
-
-  dsbp = static_cast<DistribSBasePlugin*>(param->getPlugin("distrib"));
-  dsbp->setDistribUncertainty(uncert);
-
-  model->removeParameter("mean");
-  model->removeParameter("stddev");
-  FunctionDefinition* fd = model->getFunctionDefinition(0);
-  fd->setId("normal");
-  if (coreVersion == 1)
-  {
-    ASTNode* math = SBML_parseL3Formula("lambda(x, y, notanumber)");
-    fd->setMath(math);
-    delete math;
-  }
-  else
-  {
-    fd->setMath(NULL);
-  }
-  writeSBMLToFile(doc, "user-defined.xml");
-  delete doc;
-}
-
-void createConfidenceIntervalEx()
-{
-  SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
-  // create the document
-  SBMLDocument *document = new SBMLDocument(&sbmlns);
-  DistribSBMLDocumentPlugin* distdoc
-    = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
-  distdoc->setRequired(true);
-  Model* model = document->createModel();
-  Parameter param(&sbmlns);
-  param.setConstant(true);
-  DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(param.getPlugin("distrib"));
-  DistribUncertainty* uncert = dsbp->createDistribUncertainty();
-  DistribUncertStatistics* stats = uncert->createUncertStatistics();
-  DistribUncertStatisticSpan uss(3, coreVersion, 1);
-  param.setId("P1");
-  param.setValue(5.13);
-  uss.setValueLower(5.0);
-  uss.setValueUpper(5.32);
-  stats->setConfidenceInterval(&uss);
-  model->addParameter(&param);
-
-  param.setId("P2");
-  param.setValue(15.0);
-  uss.setValueLower(10.22);
-  uss.setValueUpper(15.02);
-  stats->setConfidenceInterval(&uss);
-  model->addParameter(&param);
-
-  param.setId("P3");
-  param.setValue(0.003);
-  uss.setValueLower(-0.001);
-  uss.setValueUpper(0.0041);
-  stats->setConfidenceInterval(&uss);
-  model->addParameter(&param);
-
-  param.setId("P4");
-  param.setValue(.34);
-  uss.setValueLower(.22);
-  uss.setValueUpper(.51);
-  stats->setConfidenceInterval(&uss);
-  model->addParameter(&param);
-
-  param.setId("P5");
-  param.setValue(92);
-  uss.setValueLower(90);
-  uss.setValueUpper(99);
-  stats->setConfidenceInterval(&uss);
-  model->addParameter(&param);
-
-  param.setId("P6");
-  param.setValue(40.002);
-  uss.setValueLower(40.0018);
-  uss.setValueUpper(40.0021);
-  stats->setConfidenceInterval(&uss);
-  model->addParameter(&param);
-
-  Compartment* c = model->createCompartment();
-  c->setId("C");
-  c->setConstant(true);
-  c->setSize(1);
-  c->setSpatialDimensions(3.0);
-
-  Species s(&sbmlns);
-  s.setConstant(false);
-  s.setBoundaryCondition(false);
-  s.setHasOnlySubstanceUnits(false);
-  s.setCompartment("C");
-  dsbp = static_cast<DistribSBasePlugin*>(s.getPlugin("distrib"));
-  uncert = dsbp->createDistribUncertainty();
-  stats = uncert->createUncertStatistics();
-  DistribUncertValue uv(3, coreVersion, 1);
-  
-  s.setId("S1");
-  s.setInitialAmount(5.2);
-  uv.setValue(0.3);
-  stats->setStandardDeviation(&uv);
-  model->addSpecies(&s);
-
-  s.setId("S2");
-  s.setInitialAmount(8.7);
-  uv.setValue(0.01);
-  stats->setStandardDeviation(&uv);
-  model->addSpecies(&s);
-
-  s.setId("S3");
-  s.setInitialAmount(1102);
-  uv.setValue(53);
-  stats->setStandardDeviation(&uv);
-  model->addSpecies(&s);
-
-  s.setId("S4");
-  s.setInitialAmount(0.026);
-  uv.setValue(0.004);
-  stats->setStandardDeviation(&uv);
-  model->addSpecies(&s);
-
-
-  writeSBMLToFile(document, "confidence-intervals.xml");
-  delete document;
-}
+//void createExternalExponential()
+//{
+//  SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
+//
+//  // create the document
+//  SBMLDocument *document = new SBMLDocument(&sbmlns);
+//  DistribSBMLDocumentPlugin* distdoc
+//    = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
+//  distdoc->setRequired(true);
+//  Model* model = document->createModel();
+//  FunctionDefinition* fd = model->createFunctionDefinition();
+//  fd->setId("Exponential2");
+//  DistribFunctionDefinitionPlugin* dfdp = static_cast<DistribFunctionDefinitionPlugin*>(fd->getPlugin("distrib"));
+//  DistribDrawFromDistribution* dfd = dfdp->createDistribDrawFromDistribution();
+//  DistribInput* input = dfd->createDistribInput();
+//  input->setId("beta");
+//  input->setIndex(0);
+//  DistribExternalDistribution ext(3, coreVersion, 1);
+//  ext.setDefinitionURL("http://www.probonto.org/ontology#PROB_k0000353");
+//  ext.setName("Exponential 2");
+//  DistribExternalParameter* param = ext.createDistribExternalParameter();
+//  param->setDefinitionURL("http://www.probonto.org/ontology#PROB_k0000362");
+//  param->setName("Beta");
+//  param->setVar("beta");
+//  dfd->setDistribution(&ext);
+//
+//  writeSBMLToFile(document, "distrib_example8.xml");
+//  delete document;
+//}
+
+//void createUserDefined()
+//{
+//  DistribDrawFromDistribution* dfd = setupBasicModel();
+//  SBMLDocument* doc = dfd->getSBMLDocument();
+//  Model* model = doc->getModel();
+//  InitialAssignment* ia = addParamAndIA(model);
+//  addNormal(dfd);
+//
+//  vector<string> arguments;
+//  arguments.push_back("mean");
+//  arguments.push_back("stddev");
+//  setupArguments(dfd, ia, model, arguments);
+//  Parameter* param = model->createParameter();
+//  param->setConstant(true);
+//  param->setId("V_pop");
+//  param->setValue(100);
+//  param = model->createParameter();
+//  param->setConstant(true);
+//  param->setId("V_omega");
+//  param->setValue(0.25);
+//  ASTNode* astn = SBML_parseL3Formula("normal(V_pop, V_omega)");
+//  ia->setMath(astn);
+//  param = model->getParameter("P1");
+//  param->setId("V");
+//  ia->setSymbol("V");
+//  delete astn;
+//  DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(ia->getPlugin("distrib"));
+//  DistribUncertainty* uncert = dsbp->createDistribUncertainty();
+//  DistribUncertStatistics* stats = uncert->createUncertStatistics();
+//  DistribUncertValue uv(3, coreVersion, 1);
+//  uv.setVar("V_pop");
+//  stats->setMean(&uv);
+//  uv.setVar("V_omega");
+//  stats->setStandardDeviation(&uv);
+//
+//  dsbp = static_cast<DistribSBasePlugin*>(param->getPlugin("distrib"));
+//  dsbp->setDistribUncertainty(uncert);
+//
+//  model->removeParameter("mean");
+//  model->removeParameter("stddev");
+//  FunctionDefinition* fd = model->getFunctionDefinition(0);
+//  fd->setId("normal");
+//  if (coreVersion == 1)
+//  {
+//    ASTNode* math = SBML_parseL3Formula("lambda(x, y, notanumber)");
+//    fd->setMath(math);
+//    delete math;
+//  }
+//  else
+//  {
+//    fd->setMath(NULL);
+//  }
+//  writeSBMLToFile(doc, "user-defined.xml");
+//  delete doc;
+//}
+
+//void createConfidenceIntervalEx()
+//{
+//  SBMLNamespaces sbmlns(3, coreVersion, "distrib", 1);
+//  // create the document
+//  SBMLDocument *document = new SBMLDocument(&sbmlns);
+//  DistribSBMLDocumentPlugin* distdoc
+//    = static_cast<DistribSBMLDocumentPlugin*>(document->getPlugin("distrib"));
+//  distdoc->setRequired(true);
+//  Model* model = document->createModel();
+//  Parameter param(&sbmlns);
+//  param.setConstant(true);
+//  DistribSBasePlugin* dsbp = static_cast<DistribSBasePlugin*>(param.getPlugin("distrib"));
+//  DistribUncertainty* uncert = dsbp->createDistribUncertainty();
+//  DistribUncertStatistics* stats = uncert->createUncertStatistics();
+//  DistribUncertStatisticSpan uss(3, coreVersion, 1);
+//  param.setId("P1");
+//  param.setValue(5.13);
+//  uss.setValueLower(5.0);
+//  uss.setValueUpper(5.32);
+//  stats->setConfidenceInterval(&uss);
+//  model->addParameter(&param);
+//
+//  param.setId("P2");
+//  param.setValue(15.0);
+//  uss.setValueLower(10.22);
+//  uss.setValueUpper(15.02);
+//  stats->setConfidenceInterval(&uss);
+//  model->addParameter(&param);
+//
+//  param.setId("P3");
+//  param.setValue(0.003);
+//  uss.setValueLower(-0.001);
+//  uss.setValueUpper(0.0041);
+//  stats->setConfidenceInterval(&uss);
+//  model->addParameter(&param);
+//
+//  param.setId("P4");
+//  param.setValue(.34);
+//  uss.setValueLower(.22);
+//  uss.setValueUpper(.51);
+//  stats->setConfidenceInterval(&uss);
+//  model->addParameter(&param);
+//
+//  param.setId("P5");
+//  param.setValue(92);
+//  uss.setValueLower(90);
+//  uss.setValueUpper(99);
+//  stats->setConfidenceInterval(&uss);
+//  model->addParameter(&param);
+//
+//  param.setId("P6");
+//  param.setValue(40.002);
+//  uss.setValueLower(40.0018);
+//  uss.setValueUpper(40.0021);
+//  stats->setConfidenceInterval(&uss);
+//  model->addParameter(&param);
+//
+//  Compartment* c = model->createCompartment();
+//  c->setId("C");
+//  c->setConstant(true);
+//  c->setSize(1);
+//  c->setSpatialDimensions(3.0);
+//
+//  Species s(&sbmlns);
+//  s.setConstant(false);
+//  s.setBoundaryCondition(false);
+//  s.setHasOnlySubstanceUnits(false);
+//  s.setCompartment("C");
+//  dsbp = static_cast<DistribSBasePlugin*>(s.getPlugin("distrib"));
+//  uncert = dsbp->createDistribUncertainty();
+//  stats = uncert->createUncertStatistics();
+//  DistribUncertValue uv(3, coreVersion, 1);
+//  
+//  s.setId("S1");
+//  s.setInitialAmount(5.2);
+//  uv.setValue(0.3);
+//  stats->setStandardDeviation(&uv);
+//  model->addSpecies(&s);
+//
+//  s.setId("S2");
+//  s.setInitialAmount(8.7);
+//  uv.setValue(0.01);
+//  stats->setStandardDeviation(&uv);
+//  model->addSpecies(&s);
+//
+//  s.setId("S3");
+//  s.setInitialAmount(1102);
+//  uv.setValue(53);
+//  stats->setStandardDeviation(&uv);
+//  model->addSpecies(&s);
+//
+//  s.setId("S4");
+//  s.setInitialAmount(0.026);
+//  uv.setValue(0.004);
+//  stats->setStandardDeviation(&uv);
+//  model->addSpecies(&s);
+//
+//
+//  writeSBMLToFile(document, "confidence-intervals.xml");
+//  delete document;
+//}
 
 
 
@@ -662,7 +657,7 @@ main (int argc, char* argv[])
   createDistribUncertaintyExample4();
   createUncertainGender();
   createPkPd();
-  createExternalExponential();
-  createUserDefined();
-  createConfidenceIntervalEx();
+  //createExternalExponential();
+  //createUserDefined();
+  //createConfidenceIntervalEx();
 }
diff --git a/examples/c++/validateSBML.cpp b/examples/c++/validateSBML.cpp
index 0871e701..ebe5086e 100644
--- a/examples/c++/validateSBML.cpp
+++ b/examples/c++/validateSBML.cpp
@@ -57,6 +57,28 @@ bool validateSBML(const string& filename, bool enableUnitCheck=true);
 const string usage = "Usage: validateSBML [-u] filename [...]\n"
                      " -u : disable unit consistency check";
 
+#ifdef WIN32
+
+#include <conio.h>
+
+/**
+ * Basic callback class that interrupts reading the document upon a keypress
+ */
+class ProcessingCB : public Callback
+{
+public:
+  virtual int process(SBMLDocument* doc)
+  {
+    if (kbhit())
+      return LIBSBML_OPERATION_FAILED;
+    return LIBSBML_OPERATION_SUCCESS;
+  }
+
+};
+
+#endif // WIN32
+
+
 int
 main (int argc, char* argv[])
 {
@@ -76,6 +98,13 @@ main (int argc, char* argv[])
     }       
   }
 
+# ifdef WIN32
+  ProcessingCB cb;
+  CallbackRegistry::addCallback(&cb);
+  cout << "(Registered callback, press any key to interrupt validation)" << endl;
+
+#endif
+
   int  argIndex = 1;
   
   if ( string("-u") == string(argv[1]) )
diff --git a/examples/python/validateSBMLWithCallback.py b/examples/python/validateSBMLWithCallback.py
new file mode 100644
index 00000000..ac0c9d70
--- /dev/null
+++ b/examples/python/validateSBMLWithCallback.py
@@ -0,0 +1,226 @@
+#!/usr/bin/env python
+##
+## @file    validateSBML.py
+## @brief   Validates one or more SBML files
+## @author  Akiya Jouraku (translated from libSBML C++ examples)
+## @author  Ben Bornstein
+## @author  Michael Hucka
+##
+## <!--------------------------------------------------------------------------
+## This sample program is distributed under a different license than the rest
+## of libSBML.  This program uses the open-source MIT license, as follows:
+##
+## Copyright (c) 2013-2018 by the California Institute of Technology
+## (California, USA), the European Bioinformatics Institute (EMBL-EBI, UK)
+## and the University of Heidelberg (Germany), with support from the National
+## Institutes of Health (USA) under grant R01GM070923.  All rights reserved.
+##
+## Permission is hereby granted, free of charge, to any person obtaining a
+## copy of this software and associated documentation files (the "Software"),
+## to deal in the Software without restriction, including without limitation
+## the rights to use, copy, modify, merge, publish, distribute, sublicense,
+## and/or sell copies of the Software, and to permit persons to whom the
+## Software is furnished to do so, subject to the following conditions:
+##
+## The above copyright notice and this permission notice shall be included in
+## all copies or substantial portions of the Software.
+##
+## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+## FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+## DEALINGS IN THE SOFTWARE.
+##
+## Neither the name of the California Institute of Technology (Caltech), nor
+## of the European Bioinformatics Institute (EMBL-EBI), nor of the University
+## of Heidelberg, nor the names of any contributors, may be used to endorse
+## or promote products derived from this software without specific prior
+## written permission.
+## ------------------------------------------------------------------------ -->
+
+import sys
+import os.path
+import time
+import libsbml
+import signal
+
+
+class PythonProgress(libsbml.Callback):
+    def __init__(self):
+        super(PythonProgress, self).__init__()
+        self.shouldProceed = True
+
+    def process(self, doc):
+        if self.shouldProceed:
+          return libsbml.LIBSBML_OPERATION_SUCCESS
+        return libsbml.LIBSBML_OPERATION_FAILED
+
+    def askToStop(self):
+        print('task should stop soon ...')
+        self.shouldProceed = False
+
+# instantiate progress report
+progress = PythonProgress().__disown__()
+
+# now setup a handler to ask to stop the processing
+def sigint_handler(signum, frame):
+    global progress
+    progress.askToStop()
+
+signal.signal(signal.SIGINT, sigint_handler)
+
+class validateSBML:
+  def __init__(self, ucheck):
+    self.reader    = libsbml.SBMLReader()
+    self.ucheck    = ucheck
+    self.numinvalid = 0
+
+  def validate(self, file):
+    if not os.path.exists(file):
+      print("[Error] %s : No such file." % infile)
+      self.numinvalid += 1
+      return
+
+    start    = time.time()
+    sbmlDoc  = libsbml.readSBML(file)
+    stop     = time.time()
+    timeRead = (stop - start)*1000
+    errors   = sbmlDoc.getNumErrors()
+    
+    seriousErrors = False
+
+    numReadErr  = 0
+    numReadWarn = 0
+    errMsgRead  = ""
+
+    if errors > 0:
+      
+      for i in range(errors):
+        severity = sbmlDoc.getError(i).getSeverity()
+        if (severity == libsbml.LIBSBML_SEV_ERROR) or (severity == libsbml.LIBSBML_SEV_FATAL):
+          seriousErrors = True
+          numReadErr += 1
+        else:
+          numReadWarn += 1
+
+        errMsgRead = sbmlDoc.getErrorLog().toString()
+
+    # If serious errors are encountered while reading an SBML document, it
+    # does not make sense to go on and do full consistency checking because
+    # the model may be nonsense in the first place.
+
+    numCCErr  = 0
+    numCCWarn = 0
+    errMsgCC  = ""
+    skipCC    = False
+    timeCC    = 0.0
+
+    if seriousErrors:
+      skipCC = True
+      errMsgRead += "Further consistency checking and validation aborted."
+      self.numinvalid += 1
+    else:
+      sbmlDoc.setConsistencyChecks(libsbml.LIBSBML_CAT_UNITS_CONSISTENCY, self.ucheck)
+      start    = time.time()
+      failures = sbmlDoc.checkConsistency()
+      stop     = time.time()
+      timeCC   = (stop - start)*1000
+  
+ 
+      if failures > 0:
+
+        isinvalid = False
+        for i in range(failures):
+          severity = sbmlDoc.getError(i).getSeverity()
+          if (severity == libsbml.LIBSBML_SEV_ERROR) or (severity == libsbml.LIBSBML_SEV_FATAL):
+            numCCErr += 1
+            isinvalid = True
+          else:
+            numCCWarn += 1
+
+        if isinvalid:
+          self.numinvalid += 1
+
+        errMsgCC = sbmlDoc.getErrorLog().toString()
+
+    #
+    # print results
+    #
+        
+    print("                 filename : %s" % file)
+    print("         file size (byte) : %d" % (os.path.getsize(file)))
+    print("           read time (ms) : %f" % timeRead)
+
+    if not skipCC :
+      print( "        c-check time (ms) : %f" % timeCC)
+    else:
+      print( "        c-check time (ms) : skipped")
+
+    print( "      validation error(s) : %d" % (numReadErr  + numCCErr))
+    if not skipCC :
+      print( "    (consistency error(s)): %d" % numCCErr)
+    else:
+      print( "    (consistency error(s)): skipped")
+
+    print( "    validation warning(s) : %d" % (numReadWarn + numCCWarn))
+    if not skipCC :
+      print( "  (consistency warning(s)): %d" % numCCWarn)
+    else:
+      print( "  (consistency warning(s)): skipped")
+
+    if errMsgRead or errMsgCC: 
+      print()
+      print( "===== validation error/warning messages =====\n")
+      if errMsgRead : 
+        print( errMsgRead)
+      if errMsgCC : 
+        print( "*** consistency check ***\n")
+        print( errMsgCC)
+
+
+def main (args):
+  """usage: validateSBML.py [-u] inputfile1 [inputfile2 ...]
+  -u  skips unit consistency check
+  """
+  if len(args) < 2:
+    print( main.__doc__)
+    sys.exit(1)
+  elif (len(args) == 1) and (args[1] == "-u"):
+    print( main.__doc__)
+    sys.exit(1)
+
+  enableUnitCCheck = True
+
+  if args[1] == "-u":
+    enableUnitCCheck = False
+
+  global progress
+  libsbml.CallbackRegistry.addCallback(progress)
+  print ("(Callback registered, press Ctrl+C to interrupt validation)")
+  
+  validator = validateSBML(enableUnitCCheck)
+
+  fnum = 0
+
+  for i in range(1,len(args)):
+    if args[i] == "-u":
+      continue
+    print( "---------------------------------------------------------------------------")
+    validator.validate(args[i])
+    fnum += 1
+
+  numinvalid = validator.numinvalid
+
+  print( "---------------------------------------------------------------------------")
+  print( "Validated %d files, %d valid files, %d invalid files" % (fnum, fnum - numinvalid, numinvalid))
+  if not enableUnitCCheck:
+    print( "(Unit consistency checks skipped)")
+
+  if numinvalid > 0:
+    sys.exit(1)
+
+if __name__ == '__main__':
+  main(sys.argv)  
+
diff --git a/spatial-package.cmake b/spatial-package.cmake
index 2b22514e..5d4cf458 100644
--- a/spatial-package.cmake
+++ b/spatial-package.cmake
@@ -1,38 +1,43 @@
-####################################################################
-#
-# SBML Spatial package 
-#
-# This file is part of libSBML.  Please visit http://sbml.org for more
-# information about SBML, and the latest version of libSBML.
-#
-# Copyright (C) 2013-2017 jointly by the following organizations:
-#     1. California Institute of Technology, Pasadena, CA, USA
-#     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
-#     3. University of Heidelberg, Heidelberg, Germany
-#
-# Copyright (C) 2009-2013 jointly by the following organizations: 
-#     1. California Institute of Technology, Pasadena, CA, USA
-#     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
-#  
-# Copyright (C) 2006-2008 by the California Institute of Technology,
-#     Pasadena, CA, USA 
-#  
-# Copyright (C) 2002-2005 jointly by the following organizations: 
-#     1. California Institute of Technology, Pasadena, CA, USA
-#     2. Japan Science and Technology Agency, Japan
-# 
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation.  A copy of the license agreement is provided
-# in the file named "LICENSE.txt" included with this software distribution
-# and also available online as http://sbml.org/software/libsbml/license.html
-#
-###############################################################################
-
+#################################################
+ # @file spatial-package.cmake
+ # @brief Top-level CMake file for spatial package
+ # @author SBMLTeam
+ #
+ # <!--------------------------------------------------------------------------
+ # This file is part of libSBML. Please visit http://sbml.org for more
+ # information about SBML, and the latest version of libSBML.
+ #
+ # Copyright (C) 2019 jointly by the following organizations:
+ # 1. California Institute of Technology, Pasadena, CA, USA
+ # 2. University of Heidelberg, Heidelberg, Germany
+ #
+ # Copyright (C) 2013-2018 jointly by the following organizations:
+ # 1. California Institute of Technology, Pasadena, CA, USA
+ # 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
+ # 3. University of Heidelberg, Heidelberg, Germany
+ #
+ # Copyright (C) 2009-2013 jointly by the following organizations:
+ # 1. California Institute of Technology, Pasadena, CA, USA
+ # 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
+ #
+ # Copyright (C) 2006-2008 by the California Institute of Technology,
+ # Pasadena, CA, USA
+ #
+ # Copyright (C) 2002-2005 jointly by the following organizations:
+ # 1. California Institute of Technology, Pasadena, CA, USA
+ # 2. Japan Science and Technology Agency, Japan
+ #
+ # This library is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License as published by the
+ # Free Software Foundation. A copy of the license agreement is provided in the
+ # file named "LICENSE.txt" included with this software distribution and also
+ # available online as http://sbml.org/software/libsbml/license.html
+ # ------------------------------------------------------------------------ -->
+ #
 
 option(ENABLE_SPATIAL     "Enable libSBML support for the SBML Level 3 Spatial Processes ('spatial') package."    OFF )
 
-# provide summary status                                    =
+ # provide summary status
 list(APPEND LIBSBML_PACKAGE_SUMMARY "SBML 'spatial' package = ${ENABLE_SPATIAL}")
 
 if(ENABLE_SPATIAL)
@@ -41,3 +46,4 @@ if(ENABLE_SPATIAL)
 	list(APPEND SWIG_EXTRA_ARGS -DUSE_SPATIAL)	
 	list(APPEND SWIG_SWIGDOCDEFINES --define USE_SPATIAL)
 endif()
+
diff --git a/src/bindings/csharp/Compiler.cs b/src/bindings/csharp/Compiler.cs
index b8d741fd..aa381f1a 100644
--- a/src/bindings/csharp/Compiler.cs
+++ b/src/bindings/csharp/Compiler.cs
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/TestRW.cs b/src/bindings/csharp/TestRW.cs
index d23ca2f0..56104ac0 100644
--- a/src/bindings/csharp/TestRW.cs
+++ b/src/bindings/csharp/TestRW.cs
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/TestRunner.cs b/src/bindings/csharp/TestRunner.cs
index fe1d6816..012bcd9f 100644
--- a/src/bindings/csharp/TestRunner.cs
+++ b/src/bindings/csharp/TestRunner.cs
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/csdoc.i b/src/bindings/csharp/csdoc.i
index dd92042e..ddca8da2 100644
--- a/src/bindings/csharp/csdoc.i
+++ b/src/bindings/csharp/csdoc.i
@@ -2835,7 +2835,7 @@ if (doc.getNumErrors() > 0)
 ";
 
 
-%csmethodmodifiers SBase::getAncestorOfType(int type, const std::string pkgName = "core") "
+%csmethodmodifiers SBase::getAncestorOfType(int type, const std::string& pkgName = "core") "
 /**
    * Returns the first ancestor object that has the given SBML type code from the given package.
    *
@@ -3933,7 +3933,7 @@ if (doc.getNumErrors() > 0)
 ";
 
 
-%csmethodmodifiers SBase::removeTopLevelAnnotationElement(const std::string elementName, const std::string elementURI = "", bool removeEmpty = true) "
+%csmethodmodifiers SBase::removeTopLevelAnnotationElement(const std::string& elementName, const std::string elementURI = "", bool removeEmpty = true) "
 /**
    * Removes the top-level element within the \'annotation\' subelement of this
    * SBML object with the given name and optional URI.
@@ -6410,12 +6410,12 @@ newModel.addSpecies(s1);
 ";
 
 
-%csmethodmodifiers SBase::logError(  unsigned int       id , const unsigned int level   = 2 , const unsigned int version = 3 , const std::string& details = "" ) "
+%csmethodmodifiers SBase::logError(  unsigned int       id , const unsigned int level   = 2 , const unsigned int version = 3 , const std::string details = "" ) "
 /** */ /* libsbml-internal */ public
 ";
 
 
-%csmethodmodifiers SBase::logUnknownAttribute( const std::string& attribute, const unsigned int level, const unsigned int version, const std::string& element, const std::string& prefix="") "
+%csmethodmodifiers SBase::logUnknownAttribute( const std::string& attribute, const unsigned int level, const unsigned int version, const std::string& element, const std::string prefix="") "
 /** */ /* libsbml-internal */ public
 ";
 
@@ -6470,7 +6470,7 @@ newModel.addSpecies(s1);
 ";
 
 
-%csmethodmodifiers SBase::checkDefaultNamespace(const XMLNamespaces* xmlns, const std::string& elementName, const std::string& prefix = "") "
+%csmethodmodifiers SBase::checkDefaultNamespace(const XMLNamespaces* xmlns, const std::string& elementName, const std::string prefix = "") "
 /** */ /* libsbml-internal */ public
 ";
 
@@ -12773,7 +12773,7 @@ sp.setId(\'MySpecies\');
 ";
 
 
-%csmethodmodifiers SBMLDocument::createModel(const std::string& sid = "") "
+%csmethodmodifiers SBMLDocument::createModel(const std::string sid = "") "
 /**
    * Creates a new Model inside this SBMLDocument, and returns a pointer to
    * it.
@@ -33802,7 +33802,7 @@ sp.setId(\'MySpecies\');
 ";
 
 
-%csmethodmodifiers Reaction::addReactant(const Species* species, double stoichiometry = 1.0, const std::string& id = "", bool constant = true) "
+%csmethodmodifiers Reaction::addReactant(const Species* species, double stoichiometry = 1.0, const std::string id = "", bool constant = true) "
 /**
    * Adds the given species as a reactant with the given stoichiometry
    *
@@ -33886,7 +33886,7 @@ sp.setId(\'MySpecies\');
 ";
 
 
-%csmethodmodifiers Reaction::addProduct(const Species* species, double stoichiometry = 1.0, const std::string& id = "", bool constant = true) "
+%csmethodmodifiers Reaction::addProduct(const Species* species, double stoichiometry = 1.0, const std::string id = "", bool constant = true) "
 /**
    * Adds the given species as a product with the given stoichiometry
    *
@@ -33973,7 +33973,7 @@ sp.setId(\'MySpecies\');
 ";
 
 
-%csmethodmodifiers Reaction::addModifier(const Species *species, const std::string &id = "") "
+%csmethodmodifiers Reaction::addModifier(const Species *species, const std::string id = "") "
 /**
    * Adds the given species as a modifier to this reaction
    *
@@ -43798,7 +43798,7 @@ sp.setId(\'MySpecies\');
 ";
 
 
-%csmethodmodifiers SBO::writeTerm(XMLOutputStream& stream, int sboTerm, const std::string& prefix = "") "
+%csmethodmodifiers SBO::writeTerm(XMLOutputStream& stream, int sboTerm, const std::string prefix = "") "
 /** */ /* libsbml-internal */ public
 ";
 
@@ -45604,7 +45604,7 @@ sp.setId(\'MySpecies\');
 ";
 
 
-%csmethodmodifiers SBMLNamespaces::SBMLNamespaces(unsigned int level, unsigned int version, const std::string &pkgName, unsigned int pkgVersion, const std::string& pkgPrefix = "") "
+%csmethodmodifiers SBMLNamespaces::SBMLNamespaces(unsigned int level, unsigned int version, const std::string &pkgName, unsigned int pkgVersion, const std::string pkgPrefix = "") "
 /**
    * (For extensions) Creates a new SBMLNamespaces object corresponding to
    * the combination of (1) the given SBML @p level and @p version, and (2)
@@ -46312,7 +46312,7 @@ else
 "
 
 
-%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, const std::string& value="", ConversionOptionType_t type=CNV_TYPE_STRING, const std::string& description="") "
+%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, const std::string value="", ConversionOptionType_t type=CNV_TYPE_STRING, const std::string description="") "
 /**
    * Creates a new ConversionOption.
    *
@@ -46339,7 +46339,7 @@ else
 ";
 
 
-%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, const char* value, const std::string& description="") "
+%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, const char* value, const std::string description="") "
 /**
    * Creates a new ConversionOption specialized for string-type options.
    *
@@ -46352,7 +46352,7 @@ else
 ";
 
 
-%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, bool value, const std::string& description="") "
+%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, bool value, const std::string description="") "
 /**
    * Creates a new ConversionOption specialized for Boolean-type options.
    *
@@ -46365,7 +46365,7 @@ else
 ";
 
 
-%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, double value, const std::string& description="") "
+%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, double value, const std::string description="") "
 /**
    * Creates a new ConversionOption specialized for double-type options.
    *
@@ -46378,7 +46378,7 @@ else
 ";
 
 
-%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, float value, const std::string& description="") "
+%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, float value, const std::string description="") "
 /**
    * Creates a new ConversionOption specialized for float-type options.
    *
@@ -46391,7 +46391,7 @@ else
 ";
 
 
-%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, int value, const std::string& description="") "
+%csmethodmodifiers ConversionOption::ConversionOption(const std::string& key, int value, const std::string description="") "
 /**
    * Creates a new ConversionOption specialized for integer-type options.
    *
@@ -46888,7 +46888,7 @@ if (config != None) {
 ";
 
 
-%csmethodmodifiers ConversionProperties::addOption(const std::string& key, const std::string& value="", ConversionOptionType_t type=CNV_TYPE_STRING, const std::string& description="") "
+%csmethodmodifiers ConversionProperties::addOption(const std::string& key, const std::string value="", ConversionOptionType_t type=CNV_TYPE_STRING, const std::string description="") "
 /**
    * Adds a new ConversionOption object with the given parameters.
    *
@@ -46903,7 +46903,7 @@ if (config != None) {
 ";
 
 
-%csmethodmodifiers ConversionProperties::addOption(const std::string& key, const char* value, const std::string& description="") "
+%csmethodmodifiers ConversionProperties::addOption(const std::string& key, const char* value, const std::string description="") "
 /**
    * Adds a new ConversionOption object with the given parameters.
    *
@@ -46916,7 +46916,7 @@ if (config != None) {
 ";
 
 
-%csmethodmodifiers ConversionProperties::addOption(const std::string& key, bool value, const std::string& description="") "
+%csmethodmodifiers ConversionProperties::addOption(const std::string& key, bool value, const std::string description="") "
 /**
    * Adds a new ConversionOption object with the given parameters.
    *
@@ -46929,7 +46929,7 @@ if (config != None) {
 ";
 
 
-%csmethodmodifiers ConversionProperties::addOption(const std::string& key, double value, const std::string& description="") "
+%csmethodmodifiers ConversionProperties::addOption(const std::string& key, double value, const std::string description="") "
 /**
    * Adds a new ConversionOption object with the given parameters.
    *
@@ -46942,7 +46942,7 @@ if (config != None) {
 ";
 
 
-%csmethodmodifiers ConversionProperties::addOption(const std::string& key, float value, const std::string& description="") "
+%csmethodmodifiers ConversionProperties::addOption(const std::string& key, float value, const std::string description="") "
 /**
    * Adds a new ConversionOption object with the given parameters.
    *
@@ -46955,7 +46955,7 @@ if (config != None) {
 ";
 
 
-%csmethodmodifiers ConversionProperties::addOption(const std::string& key, int value, const std::string& description="") "
+%csmethodmodifiers ConversionProperties::addOption(const std::string& key, int value, const std::string description="") "
 /**
    * Adds a new ConversionOption object with the given parameters.
    *
@@ -51562,7 +51562,7 @@ if (config != None) {
 ";
 
 
-%csmethodmodifiers XMLAttributes::add(  const std::string& name , const std::string& value , const std::string& namespaceURI = "" , const std::string& prefix = "") "
+%csmethodmodifiers XMLAttributes::add(  const std::string& name , const std::string& value , const std::string namespaceURI = "" , const std::string prefix = "") "
 /**
    * Adds an attribute to this list of attributes.
    *
@@ -51883,7 +51883,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLAttributes::remove(const std::string& name, const std::string& uri = "") "
+%csmethodmodifiers XMLAttributes::remove(const std::string& name, const std::string uri = "") "
 /**
    * Removes a named attribute from this list of attributes.
    *
@@ -52217,7 +52217,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLAttributes::getValue(const std::string name) const "
+%csmethodmodifiers XMLAttributes::getValue(const std::string& name) const "
 /**
    * Returns a named attribute\'s value.
    *
@@ -52245,7 +52245,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLAttributes::getValue(const std::string name, const std::string uri) const "
+%csmethodmodifiers XMLAttributes::getValue(const std::string& name, const std::string& uri) const "
 /**
    * Returns a named attribute\'s value.
    *
@@ -52312,7 +52312,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLAttributes::hasAttribute(const std::string name, const std::string uri="") const "
+%csmethodmodifiers XMLAttributes::hasAttribute(const std::string& name, const std::string uri="") const "
 /**
    * Returns @c true if an attribute with a given name and namespace URI
    * exists.
@@ -53279,7 +53279,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLNamespaces::add(const std::string& uri, const std::string& prefix = "") "
+%csmethodmodifiers XMLNamespaces::add(const std::string& uri, const std::string prefix = "") "
 /**
    * Appends an XML namespace prefix and URI pair to this list of namespace
    * declarations.
@@ -53370,7 +53370,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLNamespaces::getIndex(const std::string uri) const "
+%csmethodmodifiers XMLNamespaces::getIndex(const std::string& uri) const "
 /**
    * Look up the index of an XML namespace declaration by URI.
    *
@@ -53386,7 +53386,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLNamespaces::containsUri(const std::string uri) const "
+%csmethodmodifiers XMLNamespaces::containsUri(const std::string& uri) const "
 /**
    * Tests whether the given uri is contained in this set of namespaces. 
    * 
@@ -53394,7 +53394,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLNamespaces::getIndexByPrefix(const std::string prefix) const "
+%csmethodmodifiers XMLNamespaces::getIndexByPrefix(const std::string& prefix) const "
 /**
    * Look up the index of an XML namespace declaration by @p prefix.
    *
@@ -53490,7 +53490,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLNamespaces::getURI(const std::string& prefix = "") const "
+%csmethodmodifiers XMLNamespaces::getURI(const std::string prefix = "") const "
 /**
    * Look up the URI of an XML namespace declaration by its prefix.
    *
@@ -53777,7 +53777,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLToken::addAttr(  const std::string& name , const std::string& value , const std::string& namespaceURI = "" , const std::string& prefix = "") "
+%csmethodmodifiers XMLToken::addAttr(  const std::string& name , const std::string& value , const std::string namespaceURI = "" , const std::string prefix = "") "
 /**
    * Adds an attribute to the XML element represented by this token.
    *
@@ -53900,7 +53900,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLToken::removeAttr(const std::string& name, const std::string& uri = "") "
+%csmethodmodifiers XMLToken::removeAttr(const std::string& name, const std::string uri = "") "
 /**
    * Removes an attribute from the XML element represented by this token.
    *
@@ -53986,7 +53986,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLToken::getAttrIndex(const std::string& name, const std::string& uri="") const "
+%csmethodmodifiers XMLToken::getAttrIndex(const std::string& name, const std::string uri="") const "
 /**
    * Returns the index of the attribute with the given name and namespace
    * URI.
@@ -54137,7 +54137,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLToken::getAttrValue(const std::string name, const std::string uri="") const "
+%csmethodmodifiers XMLToken::getAttrValue(const std::string& name, const std::string uri="") const "
 /**
    * Returns the value of the attribute with a given name and XML namespace URI.
    *
@@ -54189,7 +54189,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLToken::hasAttr(const std::string name, const std::string uri="") const "
+%csmethodmodifiers XMLToken::hasAttr(const std::string& name, const std::string uri="") const "
 /**
    * Returns @c true if an attribute with a given name and namespace URI
    * exists.
@@ -54271,7 +54271,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLToken::addNamespace(const std::string& uri, const std::string& prefix = "") "
+%csmethodmodifiers XMLToken::addNamespace(const std::string& uri, const std::string prefix = "") "
 /**
    * Appends an XML namespace declaration to this token.
    *
@@ -54479,7 +54479,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%csmethodmodifiers XMLToken::getNamespaceURI(const std::string& prefix = "") const "
+%csmethodmodifiers XMLToken::getNamespaceURI(const std::string prefix = "") const "
 /**
    * Returns the URI of an XML namespace with a given prefix.
    *
@@ -55599,7 +55599,7 @@ output_stream.endElement(\'testElement\')
 "
 
 
-%csmethodmodifiers XMLOutputStream::XMLOutputStream(std::ostream&       stream , const std::string&  encoding       = "UTF-8" , bool                writeXMLDecl   = true , const std::string&  programName    = "" , const std::string&  programVersion = "") "
+%csmethodmodifiers XMLOutputStream::XMLOutputStream(std::ostream&       stream , const std::string  encoding       = "UTF-8" , bool                writeXMLDecl   = true , const std::string  programName    = "" , const std::string  programVersion = "") "
 /**
    * Creates a new XMLOutputStream that wraps the given @p stream.
    *
@@ -55655,7 +55655,7 @@ on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
 ";
 
 
-%csmethodmodifiers XMLOutputStream::endElement(const std::string& name, const std::string& prefix = "") "
+%csmethodmodifiers XMLOutputStream::endElement(const std::string& name, const std::string prefix = "") "
 /**
    * Writes the given XML end element name to this XMLOutputStream.
    *
@@ -55689,7 +55689,7 @@ on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
 ";
 
 
-%csmethodmodifiers XMLOutputStream::startElement(const std::string& name, const std::string& prefix = "") "
+%csmethodmodifiers XMLOutputStream::startElement(const std::string& name, const std::string prefix = "") "
 /**
    * Writes the given XML start element name to this XMLOutputStream.
    *
@@ -55714,7 +55714,7 @@ on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
 ";
 
 
-%csmethodmodifiers XMLOutputStream::startEndElement(const std::string& name, const std::string& prefix = "") "
+%csmethodmodifiers XMLOutputStream::startEndElement(const std::string& name, const std::string prefix = "") "
 /**
    * Writes the given XML start and end element name to this XMLOutputStream.
    *
@@ -56204,7 +56204,7 @@ on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
 ";
 
 
-%csmethodmodifiers XMLOutputStream::writeName(const std::string& name, const std::string& prefix = "") "
+%csmethodmodifiers XMLOutputStream::writeName(const std::string& name, const std::string prefix = "") "
 /** */ /* libsbml-internal */ public
 ";
 
@@ -56259,7 +56259,7 @@ on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
 ";
 
 
-%csmethodmodifiers XMLOutputStringStream::XMLOutputStringStream(  std::ostringstream& stream , const std::string&  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string&  programName  = "" , const std::string&  programVersion = "") "
+%csmethodmodifiers XMLOutputStringStream::XMLOutputStringStream(  std::ostringstream& stream , const std::string  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string  programName  = "" , const std::string  programVersion = "") "
 /** */ /* libsbml-internal */ public
 ";
 
@@ -56269,17 +56269,17 @@ on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
 ";
 
 
-%csmethodmodifiers XMLOwningOutputStringStream::XMLOwningOutputStringStream(  const std::string&  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string&  programName  = "" , const std::string&  programVersion = "") "
+%csmethodmodifiers XMLOwningOutputStringStream::XMLOwningOutputStringStream(  const std::string  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string  programName  = "" , const std::string  programVersion = "") "
 /** */ /* libsbml-internal */ public
 ";
 
 
-%csmethodmodifiers XMLOutputFileStream::XMLOutputFileStream(  std::ofstream&      stream , const std::string&  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string&  programName  = "" , const std::string&  programVersion = "") "
+%csmethodmodifiers XMLOutputFileStream::XMLOutputFileStream(  std::ofstream&      stream , const std::string  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string  programName  = "" , const std::string  programVersion = "") "
 /** */ /* libsbml-internal */ public
 ";
 
 
-%csmethodmodifiers XMLOwningOutputFileStream::XMLOwningOutputFileStream(const std::string&  filename , const std::string&  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string&  programName  = "" , const std::string&  programVersion = "") "
+%csmethodmodifiers XMLOwningOutputFileStream::XMLOwningOutputFileStream(const std::string&  filename , const std::string  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string  programName  = "" , const std::string  programVersion = "") "
 /** */ /* libsbml-internal */ public
 ";
 
@@ -56531,7 +56531,7 @@ on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
 ";
 
 
-%csmethodmodifiers XMLInputStream::determineNumberChildren(const std::string& elementName = "") "
+%csmethodmodifiers XMLInputStream::determineNumberChildren(const std::string elementName = "") "
 /**
    * Returns the number of child tokens of the given element in this stream.
    *
@@ -56935,7 +56935,7 @@ on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
 "
 
 
-%csmethodmodifiers XMLError::XMLError( const int errorId           = 0 , const std::string& details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_FATAL , const unsigned int category = LIBSBML_CAT_INTERNAL ) "
+%csmethodmodifiers XMLError::XMLError( const int errorId           = 0 , const std::string details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_FATAL , const unsigned int category = LIBSBML_CAT_INTERNAL ) "
 /**
    * Creates a new XMLError to report that something occurred during XML
    * processing.
@@ -57980,12 +57980,12 @@ on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
 ";
 
 
-%csmethodmodifiers SBMLErrorLog::logError( const unsigned int errorId  = 0 , const unsigned int level    = SBML_DEFAULT_LEVEL , const unsigned int version  = SBML_DEFAULT_VERSION , const std::string& details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_ERROR , const unsigned int category = LIBSBML_CAT_SBML ) "
+%csmethodmodifiers SBMLErrorLog::logError( const unsigned int errorId  = 0 , const unsigned int level    = SBML_DEFAULT_LEVEL , const unsigned int version  = SBML_DEFAULT_VERSION , const std::string details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_ERROR , const unsigned int category = LIBSBML_CAT_SBML ) "
 /** */ /* libsbml-internal */ public
 ";
 
 
-%csmethodmodifiers SBMLErrorLog::logPackageError( const std::string& package    = "core" , const unsigned int errorId    = 0 , const unsigned int pkgVersion = 1 , const unsigned int level      = SBML_DEFAULT_LEVEL , const unsigned int version    = SBML_DEFAULT_VERSION , const std::string& details    = "" , const unsigned int line       = 0 , const unsigned int column     = 0 , const unsigned int severity   = LIBSBML_SEV_ERROR , const unsigned int category   = LIBSBML_CAT_SBML ) "
+%csmethodmodifiers SBMLErrorLog::logPackageError( const std::string package    = "core" , const unsigned int errorId    = 0 , const unsigned int pkgVersion = 1 , const unsigned int level      = SBML_DEFAULT_LEVEL , const unsigned int version    = SBML_DEFAULT_VERSION , const std::string details    = "" , const unsigned int line       = 0 , const unsigned int column     = 0 , const unsigned int severity   = LIBSBML_SEV_ERROR , const unsigned int category   = LIBSBML_CAT_SBML ) "
 /** */ /* libsbml-internal */ public
 ";
 
@@ -68665,7 +68665,7 @@ on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
 "
 
 
-%csmethodmodifiers SBMLError::SBMLError( const unsigned int errorId  = 0 , const unsigned int level    = SBML_DEFAULT_LEVEL , const unsigned int version  = SBML_DEFAULT_VERSION , const std::string& details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_ERROR , const unsigned int category = LIBSBML_CAT_SBML , const std::string& package  = "core" , const unsigned int pkgVersion = 1 ) "
+%csmethodmodifiers SBMLError::SBMLError( const unsigned int errorId  = 0 , const unsigned int level    = SBML_DEFAULT_LEVEL , const unsigned int version  = SBML_DEFAULT_VERSION , const std::string details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_ERROR , const unsigned int category = LIBSBML_CAT_SBML , const std::string package  = "core" , const unsigned int pkgVersion = 1 ) "
 /**
    * Creates a new SBMLError to report that something occurred during SBML
    * processing.
@@ -75168,6 +75168,88 @@ if (doc->getLevel() == 2)
 ";
 
 
+%csmethodmodifiers Callback::process(SBMLDocument* doc) "
+/**
+	 * The processing function to be implemented by the callback
+	 * 
+	 * In order to stop processing return a value other than 
+	 * LIBSBML_OPERATION_SUCCESS. 
+	 * 
+	 * @return LIBSBML_OPERATION_SUCCESS to continue the operations
+	 *         any other value to stop
+	 */ public new
+";
+
+
+%csmethodmodifiers CallbackRegistry::invokeCallbacks(SBMLDocument* doc) "
+/**
+	 * Invokes all registered callbacks on the given document. If the callbacks indicate
+	 * that processing should be stopped they return a value other than operation success.
+	 * 
+	 * @return LIBSBML_OPERATION_SUCCESS to indicate that processing should be continued, 
+	 *         any other value to stop processing
+	 */ public
+";
+
+
+%csmethodmodifiers CallbackRegistry::clearCallbacks "
+/**
+   * Clears all registered processing callbacks
+   */ public
+";
+
+
+%csmethodmodifiers CallbackRegistry::addCallback(Callback *cb) "
+/**
+   * Registers a new processing callback that will be called with a newly instantiated
+   * ModelDefinition object. This allows for all post processing on it that needs to
+   * happen before integrating it with the target document.
+   *
+   * @param cb the callback.
+   */ public
+";
+
+
+%csmethodmodifiers CallbackRegistry::getNumCallbacks "
+/**
+	 * @return the number of registered callbacks.
+	 */ public
+";
+
+
+%csmethodmodifiers CallbackRegistry::removeCallback(int index) "
+/**
+   * Removes the callback with given index.
+   *
+   * @param index the index of the callback to be removed from the list.
+   *
+   */ public
+";
+
+
+%csmethodmodifiers CallbackRegistry::removeCallback(Callback *cb) "
+/**
+	 * Removes the specified callback from the list of registered callbacks
+	 *
+	 * @param cb the callback to be removed.
+	 */ public
+";
+
+
+%csmethodmodifiers CallbackRegistry::getInstance "
+/**
+	 * the static instance of the class
+	 */ /* libsbml-internal */ public
+";
+
+
+%csmethodmodifiers CallbackRegistry::CallbackRegistry "
+/**
+   * protected constructor, use the static methods for access.
+   */ /* libsbml-internal */ public
+";
+
+
 %typemap(csimports) OStream "
  using System;
  using System.Runtime.InteropServices;
@@ -77041,7 +77123,7 @@ setValue(value, 0);
 ";
 
 
-%csmethodmodifiers ASTNode::replaceArgument(const std::string bvar, ASTNode * arg) "
+%csmethodmodifiers ASTNode::replaceArgument(const std::string& bvar, ASTNode * arg) "
 /**
    * Replaces occurences of a given name within this ASTNode with the
    * name/value/formula represented by @p arg.
@@ -77300,7 +77382,7 @@ setValue(value, 0);
 ";
 
 
-%csmethodmodifiers ASTNode::getASTPlugin(const std::string& name, bool isCsymbol = false) "
+%csmethodmodifiers ASTNode::getASTPlugin(const std::string& name, bool isCsymbol = false, bool strCmpIsCaseSensitive = false) "
 /** */ public
 ";
 
@@ -77315,7 +77397,7 @@ setValue(value, 0);
 ";
 
 
-%csmethodmodifiers ASTNode::getASTPlugin(const std::string& name, bool isCsymbol = false) const "
+%csmethodmodifiers ASTNode::getASTPlugin(const std::string& name, bool isCsymbol = false, bool strCmpIsCaseSensitive = false) const "
 /** */ public
 ";
 
@@ -77345,7 +77427,7 @@ setValue(value, 0);
 ";
 
 
-%csmethodmodifiers ASTNode::containsVariable(const std::string id) const "
+%csmethodmodifiers ASTNode::containsVariable(const std::string& id) const "
 /** */ /* libsbml-internal */ public
 ";
 
@@ -79620,6 +79702,127 @@ setValue(value, 0);
 ";
 
 
+%typemap(csimports) DefinitionURLRegistry "
+ using System;
+ using System.Runtime.InteropServices;
+
+/** 
+ * @sbmlpackage{core}
+ *
+@htmlinclude pkg-marker-core.html Registry of all libSBML SBML DefinitionURLs.
+ *
+ * @htmlinclude libsbml-facility-only-warning.html
+ *
+ * LibSBML provides facilities for transforming and converting SBML
+ * documents in various ways.  These transformations can involve
+ * essentially anything that can be written algorithmically; examples
+ * include converting the units of measurement in a model, or converting
+ * from one Level+Version combination of SBML to another.  DefinitionURLs are
+ * implemented as objects derived from the class DefinitionURL.
+ *
+ * The DefinitionURL registry, implemented as a singleton object of class
+ * DefinitionURLRegistry, maintains a list of known DefinitionURLs and provides
+ * methods for discovering them.  Callers can use the method
+ * DefinitionURLRegistry::getNumDefinitionURLs() to find out how many
+ * DefinitionURLs are registered, then use
+ * DefinitionURLRegistry::getDefinitionURLByIndex(@if java int@endif) to
+ * iterate over each one; alternatively, callers can use
+ * DefinitionURLRegistry::getDefinitionURLFor(@if java ConversionProperties@endif)
+ * to search for a DefinitionURL having specific properties.
+ */
+"
+
+
+%csmethodmodifiers DefinitionURLRegistry::getInstance "
+/**
+   * Returns the singleton instance for the DefinitionURL registry.
+   *
+   * Prior to using the registry, callers have to obtain a copy of the
+   * registry.  This static method provides the means for doing that.
+   *
+   * @return the singleton for the DefinitionURL registry.
+   */ public
+";
+
+
+%csmethodmodifiers DefinitionURLRegistry::addDefinitionURL(const std::string& url, int type) "
+/**
+   * Adds the given DefinitionURL to the registry of SBML DefinitionURLs.
+   *
+   * @param DefinitionURL the DefinitionURL to add to the registry.
+   *
+   *
+ * @return integer value indicating success/failure of the
+ * function.  @if clike The value is drawn from the
+ * enumeration #OperationReturnValues_t. @endif The possible values
+ * returned by this function are:
+ *
+ *
+   * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
+   * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
+   */ public
+";
+
+
+%csmethodmodifiers DefinitionURLRegistry::getNumDefinitionURLs "
+/**
+   * Returns the number of DefinitionURLs known by the registry.
+   *
+   * @return the number of registered DefinitionURLs.
+   *
+   * @see getDefinitionURLByIndex(@if java int@endif)
+   */ public
+";
+
+
+%csmethodmodifiers DefinitionURLRegistry::addSBMLDefinitions "
+/** */ public
+";
+
+
+%csmethodmodifiers DefinitionURLRegistry::getCoreDefinitionsAdded "
+/** */ public
+";
+
+
+%csmethodmodifiers DefinitionURLRegistry::getType(const std::string& url) "
+/** */ public
+";
+
+
+%csmethodmodifiers DefinitionURLRegistry::getDefinitionUrlByIndex(int index) "
+/** */ public
+";
+
+
+%csmethodmodifiers DefinitionURLRegistry::clearDefinitions "
+/** */ public
+";
+
+
+%csmethodmodifiers DefinitionURLRegistry::DefinitionURLRegistry "
+/** */ /* libsbml-internal */ public
+";
+
+
+%csmethodmodifiers DefinitionURLRegistry::setCoreDefinitionsAdded "
+/** */ /* libsbml-internal */ public
+";
+
+
+%typemap(csimports) MathFilter "
+ using System;
+ using System.Runtime.InteropServices;
+
+/** 
+ * @sbmlpackage{core}
+ *
+@htmlinclude pkg-marker-core.html 
+ * @internal
+ */
+"
+
+
 %typemap(csimports) ASTBasePlugin "
  using System;
  using System.Runtime.InteropServices;
@@ -79795,7 +79998,7 @@ setValue(value, 0);
 ";
 
 
-%csmethodmodifiers ASTBasePlugin::getPackageFunctionFor(const std::string& name) const "
+%csmethodmodifiers ASTBasePlugin::getPackageFunctionFor(const std::string& name, bool strCmpIsCaseSensitive = false) const "
 /** */ /* libsbml-internal */ public new
 ";
 
diff --git a/src/bindings/csharp/csharp-files-win/ASTBasePlugin.cs b/src/bindings/csharp/csharp-files-win/ASTBasePlugin.cs
index 398c4d4b..045838bd 100644
--- a/src/bindings/csharp/csharp-files-win/ASTBasePlugin.cs
+++ b/src/bindings/csharp/csharp-files-win/ASTBasePlugin.cs
@@ -102,8 +102,13 @@ public class ASTBasePlugin : global::System.IDisposable {
     return ret;
   }
 
+  public virtual bool defines(string name, bool strCmpIsCaseSensitive) {
+    bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_1(swigCPtr, name, strCmpIsCaseSensitive);
+    return ret;
+  }
+
   public virtual bool defines(string name) {
-    bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_1(swigCPtr, name);
+    bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_2(swigCPtr, name);
     return ret;
   }
 
@@ -148,6 +153,12 @@ public class ASTBasePlugin : global::System.IDisposable {
     return ret;
   }
 
+  public ASTNodeValues_t getASTNodeValue(long n) {
+    global::System.IntPtr cPtr = libsbmlPINVOKE.ASTBasePlugin_getASTNodeValue(swigCPtr, n);
+    ASTNodeValues_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new ASTNodeValues_t(cPtr, false);
+    return ret;
+  }
+
   
 /** */ /* libsbml-internal */ public new
  int allowedInFunctionDefinition(int type) {
diff --git a/src/bindings/csharp/csharp-files-win/ASTNode.cs b/src/bindings/csharp/csharp-files-win/ASTNode.cs
index b9f8cf37..89ed56f3 100644
--- a/src/bindings/csharp/csharp-files-win/ASTNode.cs
+++ b/src/bindings/csharp/csharp-files-win/ASTNode.cs
@@ -2228,16 +2228,23 @@ setValue(value, 0);
 }
 
   
+/** */ public
+ ASTBasePlugin getASTPlugin(string name, bool isCsymbol, bool strCmpIsCaseSensitive) {
+        ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTNode_getASTPlugin__SWIG_2(swigCPtr, name, isCsymbol, strCmpIsCaseSensitive), false);
+        return ret;
+}
+
+  
 /** */ public
  ASTBasePlugin getASTPlugin(string name, bool isCsymbol) {
-        ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTNode_getASTPlugin__SWIG_2(swigCPtr, name, isCsymbol), false);
+        ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTNode_getASTPlugin__SWIG_3(swigCPtr, name, isCsymbol), false);
         return ret;
 }
 
   
 /** */ public
  ASTBasePlugin getASTPlugin(string name) {
-        ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTNode_getASTPlugin__SWIG_3(swigCPtr, name), false);
+        ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTNode_getASTPlugin__SWIG_4(swigCPtr, name), false);
         return ret;
 }
 
diff --git a/src/bindings/csharp/csharp-files-win/Callback.cs b/src/bindings/csharp/csharp-files-win/Callback.cs
new file mode 100644
index 00000000..512ac7d4
--- /dev/null
+++ b/src/bindings/csharp/csharp-files-win/Callback.cs
@@ -0,0 +1,100 @@
+//------------------------------------------------------------------------------
+// <auto-generated />
+//
+// This file was automatically generated by SWIG (http://www.swig.org).
+// Version 3.0.12
+//
+// Do not make changes to this file unless you know what you are doing--modify
+// the SWIG interface file instead.
+//------------------------------------------------------------------------------
+
+namespace libsbml {
+
+public class Callback : global::System.IDisposable {
+	private HandleRef swigCPtr;
+	protected bool swigCMemOwn;
+	
+	internal Callback(IntPtr cPtr, bool cMemoryOwn)
+	{
+		swigCMemOwn = cMemoryOwn;
+		swigCPtr    = new HandleRef(this, cPtr);
+	}
+	
+	internal static HandleRef getCPtr(Callback obj)
+	{
+		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+	}
+	
+	internal static HandleRef getCPtrAndDisown (Callback obj)
+	{
+		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
+		
+		if (obj != null)
+		{
+			ptr             = obj.swigCPtr;
+			obj.swigCMemOwn = false;
+		}
+		
+		return ptr;
+	}
+
+  ~Callback() {
+    Dispose();
+  }
+
+  public virtual void Dispose() {
+    lock(this) {
+      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
+        if (swigCMemOwn) {
+          swigCMemOwn = false;
+          libsbmlPINVOKE.delete_Callback(swigCPtr);
+        }
+        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+      }
+      global::System.GC.SuppressFinalize(this);
+    }
+  }
+
+  
+/**
+	 * The processing function to be implemented by the callback
+	 * 
+	 * In order to stop processing return a value other than 
+	 * LIBSBML_OPERATION_SUCCESS. 
+	 * 
+	 * @return LIBSBML_OPERATION_SUCCESS to continue the operations
+	 *         any other value to stop
+	 */ public new
+ int process(SBMLDocument doc) {
+    int ret = (SwigDerivedClassHasMethod("process", swigMethodTypes0) ? libsbmlPINVOKE.Callback_processSwigExplicitCallback(swigCPtr, SBMLDocument.getCPtr(doc)) : libsbmlPINVOKE.Callback_process(swigCPtr, SBMLDocument.getCPtr(doc)));
+    return ret;
+  }
+
+  public Callback() : this(libsbmlPINVOKE.new_Callback(), true) {
+    SwigDirectorConnect();
+  }
+
+  private void SwigDirectorConnect() {
+    if (SwigDerivedClassHasMethod("process", swigMethodTypes0))
+      swigDelegate0 = new SwigDelegateCallback_0(SwigDirectorprocess);
+    libsbmlPINVOKE.Callback_director_connect(swigCPtr, swigDelegate0);
+  }
+
+  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
+    global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
+    bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(Callback));
+    return hasDerivedMethod;
+  }
+
+  private int SwigDirectorprocess(global::System.IntPtr doc) {
+    return process((doc == global::System.IntPtr.Zero) ? null : new SBMLDocument(doc, false));
+  }
+
+  public delegate int SwigDelegateCallback_0(global::System.IntPtr doc);
+
+  private SwigDelegateCallback_0 swigDelegate0;
+
+  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(SBMLDocument) };
+}
+
+}
diff --git a/src/bindings/csharp/csharp-files-win/CallbackRegistry.cs b/src/bindings/csharp/csharp-files-win/CallbackRegistry.cs
new file mode 100644
index 00000000..6b74da76
--- /dev/null
+++ b/src/bindings/csharp/csharp-files-win/CallbackRegistry.cs
@@ -0,0 +1,123 @@
+//------------------------------------------------------------------------------
+// <auto-generated />
+//
+// This file was automatically generated by SWIG (http://www.swig.org).
+// Version 3.0.12
+//
+// Do not make changes to this file unless you know what you are doing--modify
+// the SWIG interface file instead.
+//------------------------------------------------------------------------------
+
+namespace libsbml {
+
+public class CallbackRegistry : global::System.IDisposable {
+	private HandleRef swigCPtr;
+	protected bool swigCMemOwn;
+	
+	internal CallbackRegistry(IntPtr cPtr, bool cMemoryOwn)
+	{
+		swigCMemOwn = cMemoryOwn;
+		swigCPtr    = new HandleRef(this, cPtr);
+	}
+	
+	internal static HandleRef getCPtr(CallbackRegistry obj)
+	{
+		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+	}
+	
+	internal static HandleRef getCPtrAndDisown (CallbackRegistry obj)
+	{
+		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
+		
+		if (obj != null)
+		{
+			ptr             = obj.swigCPtr;
+			obj.swigCMemOwn = false;
+		}
+		
+		return ptr;
+	}
+
+  ~CallbackRegistry() {
+    Dispose();
+  }
+
+  public virtual void Dispose() {
+    lock(this) {
+      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
+        if (swigCMemOwn) {
+          swigCMemOwn = false;
+          libsbmlPINVOKE.delete_CallbackRegistry(swigCPtr);
+        }
+        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+      }
+      global::System.GC.SuppressFinalize(this);
+    }
+  }
+
+  
+/**
+	 * Invokes all registered callbacks on the given document. If the callbacks indicate
+	 * that processing should be stopped they return a value other than operation success.
+	 * 
+	 * @return LIBSBML_OPERATION_SUCCESS to indicate that processing should be continued, 
+	 *         any other value to stop processing
+	 */ public
+ static int invokeCallbacks(SBMLDocument doc) {
+    int ret = libsbmlPINVOKE.CallbackRegistry_invokeCallbacks(SBMLDocument.getCPtr(doc));
+    return ret;
+  }
+
+  
+/**
+   * Clears all registered processing callbacks
+   */ public
+ static void clearCallbacks() {
+    libsbmlPINVOKE.CallbackRegistry_clearCallbacks();
+  }
+
+  
+/**
+   * Registers a new processing callback that will be called with a newly instantiated
+   * ModelDefinition object. This allows for all post processing on it that needs to
+   * happen before integrating it with the target document.
+   *
+   * @param cb the callback.
+   */ public
+ static void addCallback(Callback cb) {
+    libsbmlPINVOKE.CallbackRegistry_addCallback(Callback.getCPtr(cb));
+  }
+
+  
+/**
+	 * @return the number of registered callbacks.
+	 */ public
+ static int getNumCallbacks() {
+    int ret = libsbmlPINVOKE.CallbackRegistry_getNumCallbacks();
+    return ret;
+  }
+
+  
+/**
+   * Removes the callback with given index.
+   *
+   * @param index the index of the callback to be removed from the list.
+   *
+   */ public
+ static void removeCallback(int index) {
+    libsbmlPINVOKE.CallbackRegistry_removeCallback__SWIG_0(index);
+  }
+
+  
+/**
+	 * Removes the specified callback from the list of registered callbacks
+	 *
+	 * @param cb the callback to be removed.
+	 */ public
+ static void removeCallback(Callback cb) {
+    libsbmlPINVOKE.CallbackRegistry_removeCallback__SWIG_1(Callback.getCPtr(cb));
+  }
+
+}
+
+}
diff --git a/src/bindings/csharp/csharp-files-win/DefinitionURLRegistry.cs b/src/bindings/csharp/csharp-files-win/DefinitionURLRegistry.cs
new file mode 100644
index 00000000..ed97f3b5
--- /dev/null
+++ b/src/bindings/csharp/csharp-files-win/DefinitionURLRegistry.cs
@@ -0,0 +1,169 @@
+//------------------------------------------------------------------------------
+// <auto-generated />
+//
+// This file was automatically generated by SWIG (http://www.swig.org).
+// Version 3.0.12
+//
+// Do not make changes to this file unless you know what you are doing--modify
+// the SWIG interface file instead.
+//------------------------------------------------------------------------------
+
+namespace libsbml {
+
+ using System;
+ using System.Runtime.InteropServices;
+
+/** 
+ * @sbmlpackage{core}
+ *
+@htmlinclude pkg-marker-core.html Registry of all libSBML SBML DefinitionURLs.
+ *
+ * @htmlinclude libsbml-facility-only-warning.html
+ *
+ * LibSBML provides facilities for transforming and converting SBML
+ * documents in various ways.  These transformations can involve
+ * essentially anything that can be written algorithmically; examples
+ * include converting the units of measurement in a model, or converting
+ * from one Level+Version combination of SBML to another.  DefinitionURLs are
+ * implemented as objects derived from the class DefinitionURL.
+ *
+ * The DefinitionURL registry, implemented as a singleton object of class
+ * DefinitionURLRegistry, maintains a list of known DefinitionURLs and provides
+ * methods for discovering them.  Callers can use the method
+ * DefinitionURLRegistry::getNumDefinitionURLs() to find out how many
+ * DefinitionURLs are registered, then use
+ * DefinitionURLRegistry::getDefinitionURLByIndex(@if java int@endif) to
+ * iterate over each one; alternatively, callers can use
+ * DefinitionURLRegistry::getDefinitionURLFor(@if java ConversionProperties@endif)
+ * to search for a DefinitionURL having specific properties.
+ */
+
+public class DefinitionURLRegistry : global::System.IDisposable {
+	private HandleRef swigCPtr;
+	protected bool swigCMemOwn;
+	
+	internal DefinitionURLRegistry(IntPtr cPtr, bool cMemoryOwn)
+	{
+		swigCMemOwn = cMemoryOwn;
+		swigCPtr    = new HandleRef(this, cPtr);
+	}
+	
+	internal static HandleRef getCPtr(DefinitionURLRegistry obj)
+	{
+		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+	}
+	
+	internal static HandleRef getCPtrAndDisown (DefinitionURLRegistry obj)
+	{
+		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
+		
+		if (obj != null)
+		{
+			ptr             = obj.swigCPtr;
+			obj.swigCMemOwn = false;
+		}
+		
+		return ptr;
+	}
+
+  ~DefinitionURLRegistry() {
+    Dispose();
+  }
+
+  public virtual void Dispose() {
+    lock(this) {
+      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
+        if (swigCMemOwn) {
+          swigCMemOwn = false;
+          libsbmlPINVOKE.delete_DefinitionURLRegistry(swigCPtr);
+        }
+        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+      }
+      global::System.GC.SuppressFinalize(this);
+    }
+  }
+
+  
+/**
+   * Returns the singleton instance for the DefinitionURL registry.
+   *
+   * Prior to using the registry, callers have to obtain a copy of the
+   * registry.  This static method provides the means for doing that.
+   *
+   * @return the singleton for the DefinitionURL registry.
+   */ public
+ static DefinitionURLRegistry getInstance() {
+    DefinitionURLRegistry ret = new DefinitionURLRegistry(libsbmlPINVOKE.DefinitionURLRegistry_getInstance(), false);
+    return ret;
+  }
+
+  
+/**
+   * Adds the given DefinitionURL to the registry of SBML DefinitionURLs.
+   *
+   * @param DefinitionURL the DefinitionURL to add to the registry.
+   *
+   *
+ * @return integer value indicating success/failure of the
+ * function.  @if clike The value is drawn from the
+ * enumeration #OperationReturnValues_t. @endif The possible values
+ * returned by this function are:
+ *
+ *
+   * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
+   * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
+   */ public
+ static int addDefinitionURL(string url, int type) {
+    int ret = libsbmlPINVOKE.DefinitionURLRegistry_addDefinitionURL(url, type);
+    return ret;
+  }
+
+  
+/**
+   * Returns the number of DefinitionURLs known by the registry.
+   *
+   * @return the number of registered DefinitionURLs.
+   *
+   * @see getDefinitionURLByIndex(@if java int@endif)
+   */ public
+ static int getNumDefinitionURLs() {
+    int ret = libsbmlPINVOKE.DefinitionURLRegistry_getNumDefinitionURLs();
+    return ret;
+  }
+
+  
+/** */ public
+ static void addSBMLDefinitions() {
+    libsbmlPINVOKE.DefinitionURLRegistry_addSBMLDefinitions();
+  }
+
+  
+/** */ public
+ static bool getCoreDefinitionsAdded() {
+    bool ret = libsbmlPINVOKE.DefinitionURLRegistry_getCoreDefinitionsAdded();
+    return ret;
+  }
+
+  
+/** */ public
+ static int getType(string url) {
+    int ret = libsbmlPINVOKE.DefinitionURLRegistry_getType(url);
+    return ret;
+  }
+
+  
+/** */ public
+ static string getDefinitionUrlByIndex(int index) {
+    string ret = libsbmlPINVOKE.DefinitionURLRegistry_getDefinitionUrlByIndex(index);
+    return ret;
+  }
+
+  
+/** */ public
+ static void clearDefinitions() {
+    libsbmlPINVOKE.DefinitionURLRegistry_clearDefinitions();
+  }
+
+}
+
+}
diff --git a/src/bindings/csharp/csharp-files-win/MathFilter.cs b/src/bindings/csharp/csharp-files-win/MathFilter.cs
index bdafa3ae..7a286d6e 100644
--- a/src/bindings/csharp/csharp-files-win/MathFilter.cs
+++ b/src/bindings/csharp/csharp-files-win/MathFilter.cs
@@ -10,6 +10,16 @@
 
 namespace libsbml {
 
+ using System;
+ using System.Runtime.InteropServices;
+
+/** 
+ * @sbmlpackage{core}
+ *
+@htmlinclude pkg-marker-core.html 
+ * @internal
+ */
+
 public class MathFilter : ElementFilter {
 	private HandleRef swigCPtr;
 	
@@ -55,18 +65,51 @@ public class MathFilter : ElementFilter {
     }
   }
 
-  
-/** */ /* libsbml-internal */ public
- MathFilter() : this(libsbmlPINVOKE.new_MathFilter(), true) {
+  public MathFilter() : this(libsbmlPINVOKE.new_MathFilter(), true) {
+    SwigDirectorConnect();
   }
 
   
-/** */ /* libsbml-internal */ public new
+/**
+   * Predicate to test elements.
+   *
+   * This is the central predicate of the ElementFilter class.  In subclasses
+   * of ElementFilter, callers should implement this method such that it
+   * returns @c true for @p element arguments that are 'desirable' and
+   * @c false for those that are 'undesirable' in whatever filtering context the
+   * ElementFilter subclass is designed to be used.
+   *
+   * @param element the element to be tested.
+   *
+   * @return @c true if the @p element is desirable or should be kept,
+   * @c false otherwise.
+   */ public virtual
  bool filter(SBase element) {
-    bool ret = libsbmlPINVOKE.MathFilter_filter(swigCPtr, SBase.getCPtr(element));
+    bool ret = (SwigDerivedClassHasMethod("filter", swigMethodTypes0) ? libsbmlPINVOKE.MathFilter_filterSwigExplicitMathFilter(swigCPtr, SBase.getCPtr(element)) : libsbmlPINVOKE.MathFilter_filter(swigCPtr, SBase.getCPtr(element)));
     return ret;
   }
 
+  private void SwigDirectorConnect() {
+    if (SwigDerivedClassHasMethod("filter", swigMethodTypes0))
+      swigDelegate0 = new SwigDelegateMathFilter_0(SwigDirectorfilter);
+    libsbmlPINVOKE.MathFilter_director_connect(swigCPtr, swigDelegate0);
+  }
+
+  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
+    global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
+    bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(MathFilter));
+    return hasDerivedMethod;
+  }
+
+  private bool SwigDirectorfilter(global::System.IntPtr element) {
+    return filter((element == global::System.IntPtr.Zero) ? null : new SBase(element, false));
+  }
+
+  public delegate bool SwigDelegateMathFilter_0(global::System.IntPtr element);
+
+  private SwigDelegateMathFilter_0 swigDelegate0;
+
+  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(SBase) };
 }
 
 }
diff --git a/src/bindings/csharp/csharp-files-win/libsbml.cs b/src/bindings/csharp/csharp-files-win/libsbml.cs
index 35ede155..9f98373f 100644
--- a/src/bindings/csharp/csharp-files-win/libsbml.cs
+++ b/src/bindings/csharp/csharp-files-win/libsbml.cs
@@ -2547,9 +2547,9 @@ if (doc.getNumErrors() > 0)
     libsbmlPINVOKE.SBML_deleteL3Parser();
   }
 
-  public const string LIBSBML_DOTTED_VERSION = "5.17.2";
-  public const int LIBSBML_VERSION = 51702;
-  public const string LIBSBML_VERSION_STRING = "51702";
+  public const string LIBSBML_DOTTED_VERSION = "5.18.0";
+  public const int LIBSBML_VERSION = 51800;
+  public const string LIBSBML_VERSION_STRING = "51800";
   // OperationReturnValues_t 
   public const int LIBSBML_OPERATION_SUCCESS = 0;
   public const int LIBSBML_INDEX_EXCEEDS_SIZE = -1;
@@ -2889,6 +2889,7 @@ if (doc.getNumErrors() > 0)
   public const int InvalidFunctionDefReturnType = 20305;
   public const int OneMathElementPerFunc = 20306;
   public const int AllowedAttributesOnFunc = 20307;
+  public const int OnlyCiInsideBVar = 99304;
   public const int InvalidUnitDefId = 20401;
   public const int InvalidSubstanceRedefinition = 20402;
   public const int InvalidLengthRedefinition = 20403;
@@ -3181,6 +3182,7 @@ if (doc.getNumErrors() > 0)
   public const int MultiplierNotValidAttribute = 99924;
   public const int OffsetNotValidAttribute = 99925;
   public const int L3SpatialDimensionsUnset = 99926;
+  public const int OperationInterrupted = 99950;
   public const int UnknownCoreAttribute = 99994;
   public const int UnknownPackageAttribute = 99995;
   public const int PackageConversionNotSupported = 99996;
diff --git a/src/bindings/csharp/csharp-files-win/libsbmlPINVOKE.cs b/src/bindings/csharp/csharp-files-win/libsbmlPINVOKE.cs
index 200dffa7..47eaec3f 100644
--- a/src/bindings/csharp/csharp-files-win/libsbmlPINVOKE.cs
+++ b/src/bindings/csharp/csharp-files-win/libsbmlPINVOKE.cs
@@ -7787,6 +7787,42 @@ class libsbmlPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_SBMLExtensionRegistry_getASTPlugin")]
   public static extern global::System.IntPtr SBMLExtensionRegistry_getASTPlugin(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2);
 
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_delete_Callback")]
+  public static extern void delete_Callback(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_Callback_process")]
+  public static extern int Callback_process(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_Callback_processSwigExplicitCallback")]
+  public static extern int Callback_processSwigExplicitCallback(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_new_Callback")]
+  public static extern global::System.IntPtr new_Callback();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_Callback_director_connect")]
+  public static extern void Callback_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, Callback.SwigDelegateCallback_0 delegate0);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_CallbackRegistry_invokeCallbacks")]
+  public static extern int CallbackRegistry_invokeCallbacks(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_CallbackRegistry_clearCallbacks")]
+  public static extern void CallbackRegistry_clearCallbacks();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_CallbackRegistry_addCallback")]
+  public static extern void CallbackRegistry_addCallback(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_CallbackRegistry_getNumCallbacks")]
+  public static extern int CallbackRegistry_getNumCallbacks();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_CallbackRegistry_removeCallback__SWIG_0")]
+  public static extern void CallbackRegistry_removeCallback__SWIG_0(int jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_CallbackRegistry_removeCallback__SWIG_1")]
+  public static extern void CallbackRegistry_removeCallback__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_delete_CallbackRegistry")]
+  public static extern void delete_CallbackRegistry(global::System.Runtime.InteropServices.HandleRef jarg1);
+
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_new_ASTNode__SWIG_0")]
   public static extern global::System.IntPtr new_ASTNode__SWIG_0(int jarg1);
 
@@ -8146,10 +8182,13 @@ class libsbmlPINVOKE {
   public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
 
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_ASTNode_getASTPlugin__SWIG_2")]
-  public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]string jarg2, bool jarg3);
+  public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]string jarg2, bool jarg3, bool jarg4);
 
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_ASTNode_getASTPlugin__SWIG_3")]
-  public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_3(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]string jarg2);
+  public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_3(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]string jarg2, bool jarg3);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_ASTNode_getASTPlugin__SWIG_4")]
+  public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_4(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]string jarg2);
 
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_ASTNode_getPlugin__SWIG_0")]
   public static extern global::System.IntPtr ASTNode_getPlugin__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]string jarg2);
@@ -8295,6 +8334,49 @@ class libsbmlPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_L3ParserSettings_visitPackageInfixSyntax")]
   public static extern void L3ParserSettings_visitPackageInfixSyntax(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4);
 
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_DefinitionURLRegistry_getInstance")]
+  public static extern global::System.IntPtr DefinitionURLRegistry_getInstance();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_DefinitionURLRegistry_addDefinitionURL")]
+  public static extern int DefinitionURLRegistry_addDefinitionURL([MarshalAs(UnmanagedType.LPWStr)]string jarg1, int jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_DefinitionURLRegistry_getNumDefinitionURLs")]
+  public static extern int DefinitionURLRegistry_getNumDefinitionURLs();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_DefinitionURLRegistry_addSBMLDefinitions")]
+  public static extern void DefinitionURLRegistry_addSBMLDefinitions();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_delete_DefinitionURLRegistry")]
+  public static extern void delete_DefinitionURLRegistry(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_DefinitionURLRegistry_getCoreDefinitionsAdded")]
+  public static extern bool DefinitionURLRegistry_getCoreDefinitionsAdded();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_DefinitionURLRegistry_getType")]
+  public static extern int DefinitionURLRegistry_getType([MarshalAs(UnmanagedType.LPWStr)]string jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_DefinitionURLRegistry_getDefinitionUrlByIndex")]
+  [return: MarshalAs(UnmanagedType.LPWStr)]
+  public static extern string DefinitionURLRegistry_getDefinitionUrlByIndex(int jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_DefinitionURLRegistry_clearDefinitions")]
+  public static extern void DefinitionURLRegistry_clearDefinitions();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_new_MathFilter")]
+  public static extern global::System.IntPtr new_MathFilter();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_delete_MathFilter")]
+  public static extern void delete_MathFilter(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_MathFilter_filter")]
+  public static extern bool MathFilter_filter(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_MathFilter_filterSwigExplicitMathFilter")]
+  public static extern bool MathFilter_filterSwigExplicitMathFilter(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_MathFilter_director_connect")]
+  public static extern void MathFilter_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, MathFilter.SwigDelegateMathFilter_0 delegate0);
+
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_ASTNodeValues_t_name_set")]
   public static extern void ASTNodeValues_t_name_set(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]string jarg2);
 
@@ -8364,7 +8446,10 @@ class libsbmlPINVOKE {
   public static extern bool ASTBasePlugin_defines__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
 
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_ASTBasePlugin_defines__SWIG_1")]
-  public static extern bool ASTBasePlugin_defines__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]string jarg2);
+  public static extern bool ASTBasePlugin_defines__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]string jarg2, bool jarg3);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_ASTBasePlugin_defines__SWIG_2")]
+  public static extern bool ASTBasePlugin_defines__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]string jarg2);
 
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_ASTBasePlugin_isFunction")]
   public static extern bool ASTBasePlugin_isFunction(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
@@ -8390,6 +8475,9 @@ class libsbmlPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_ASTBasePlugin_getUnitDefinitionFromPackage")]
   public static extern global::System.IntPtr ASTBasePlugin_getUnitDefinitionFromPackage(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, bool jarg4, int jarg5);
 
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_ASTBasePlugin_getASTNodeValue")]
+  public static extern global::System.IntPtr ASTBasePlugin_getASTNodeValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2);
+
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_ASTBasePlugin_allowedInFunctionDefinition")]
   public static extern int ASTBasePlugin_allowedInFunctionDefinition(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
 
@@ -8831,6 +8919,9 @@ class libsbmlPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_SBMLDocumentPlugin_SWIGUpcast")]
   public static extern global::System.IntPtr SBMLDocumentPlugin_SWIGUpcast(global::System.IntPtr jarg1);
 
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_MathFilter_SWIGUpcast")]
+  public static extern global::System.IntPtr MathFilter_SWIGUpcast(global::System.IntPtr jarg1);
+
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbml_L3v2extendedmathPkgNamespaces_SWIGUpcast")]
   public static extern global::System.IntPtr L3v2extendedmathPkgNamespaces_SWIGUpcast(global::System.IntPtr jarg1);
 
diff --git a/src/bindings/csharp/csharp-files/ASTBasePlugin.cs b/src/bindings/csharp/csharp-files/ASTBasePlugin.cs
index 9270e0e2..e970f4f1 100644
--- a/src/bindings/csharp/csharp-files/ASTBasePlugin.cs
+++ b/src/bindings/csharp/csharp-files/ASTBasePlugin.cs
@@ -107,8 +107,14 @@ public class ASTBasePlugin : global::System.IDisposable {
     return ret;
   }
 
+  public virtual bool defines(string name, bool strCmpIsCaseSensitive) {
+    bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_1(swigCPtr, name, strCmpIsCaseSensitive);
+    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
   public virtual bool defines(string name) {
-    bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_1(swigCPtr, name);
+    bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_2(swigCPtr, name);
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     return ret;
   }
@@ -155,6 +161,12 @@ public class ASTBasePlugin : global::System.IDisposable {
     return ret;
   }
 
+  public ASTNodeValues_t getASTNodeValue(long n) {
+    global::System.IntPtr cPtr = libsbmlPINVOKE.ASTBasePlugin_getASTNodeValue(swigCPtr, n);
+    ASTNodeValues_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new ASTNodeValues_t(cPtr, false);
+    return ret;
+  }
+
   
 /** */ /* libsbml-internal */ public new
  int allowedInFunctionDefinition(int type) {
diff --git a/src/bindings/csharp/csharp-files/ASTNode.cs b/src/bindings/csharp/csharp-files/ASTNode.cs
index 76f2d39a..dff80088 100644
--- a/src/bindings/csharp/csharp-files/ASTNode.cs
+++ b/src/bindings/csharp/csharp-files/ASTNode.cs
@@ -2241,9 +2241,17 @@ setValue(value, 0);
 }
 
   
+/** */ public
+ ASTBasePlugin getASTPlugin(string name, bool isCsymbol, bool strCmpIsCaseSensitive) {
+        ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTNode_getASTPlugin__SWIG_2(swigCPtr, name, isCsymbol, strCmpIsCaseSensitive), false);
+    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
+        return ret;
+}
+
+  
 /** */ public
  ASTBasePlugin getASTPlugin(string name, bool isCsymbol) {
-        ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTNode_getASTPlugin__SWIG_2(swigCPtr, name, isCsymbol), false);
+        ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTNode_getASTPlugin__SWIG_3(swigCPtr, name, isCsymbol), false);
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
         return ret;
 }
@@ -2251,7 +2259,7 @@ setValue(value, 0);
   
 /** */ public
  ASTBasePlugin getASTPlugin(string name) {
-        ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTNode_getASTPlugin__SWIG_3(swigCPtr, name), false);
+        ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTNode_getASTPlugin__SWIG_4(swigCPtr, name), false);
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
         return ret;
 }
diff --git a/src/bindings/csharp/csharp-files/Callback.cs b/src/bindings/csharp/csharp-files/Callback.cs
new file mode 100644
index 00000000..2d6ae4ea
--- /dev/null
+++ b/src/bindings/csharp/csharp-files/Callback.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Runtime.InteropServices;
+ 
+//------------------------------------------------------------------------------
+// <auto-generated />
+//
+// This file was automatically generated by SWIG (http://www.swig.org).
+// Version 3.0.12
+//
+// Do not make changes to this file unless you know what you are doing--modify
+// the SWIG interface file instead.
+//------------------------------------------------------------------------------
+
+namespace libsbmlcs {
+
+public class Callback : global::System.IDisposable {
+	private HandleRef swigCPtr;
+	protected bool swigCMemOwn;
+	
+	internal Callback(IntPtr cPtr, bool cMemoryOwn)
+	{
+		swigCMemOwn = cMemoryOwn;
+		swigCPtr    = new HandleRef(this, cPtr);
+	}
+	
+	internal static HandleRef getCPtr(Callback obj)
+	{
+		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+	}
+	
+	internal static HandleRef getCPtrAndDisown (Callback obj)
+	{
+		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
+		
+		if (obj != null)
+		{
+			ptr             = obj.swigCPtr;
+			obj.swigCMemOwn = false;
+		}
+		
+		return ptr;
+	}
+
+  ~Callback() {
+    Dispose();
+  }
+
+  public virtual void Dispose() {
+    lock(this) {
+      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
+        if (swigCMemOwn) {
+          swigCMemOwn = false;
+          libsbmlPINVOKE.delete_Callback(swigCPtr);
+        }
+        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+      }
+      global::System.GC.SuppressFinalize(this);
+    }
+  }
+
+  
+/**
+	 * The processing function to be implemented by the callback
+	 * 
+	 * In order to stop processing return a value other than 
+	 * LIBSBML_OPERATION_SUCCESS. 
+	 * 
+	 * @return LIBSBML_OPERATION_SUCCESS to continue the operations
+	 *         any other value to stop
+	 */ public new
+ int process(SBMLDocument doc) {
+    int ret = (SwigDerivedClassHasMethod("process", swigMethodTypes0) ? libsbmlPINVOKE.Callback_processSwigExplicitCallback(swigCPtr, SBMLDocument.getCPtr(doc)) : libsbmlPINVOKE.Callback_process(swigCPtr, SBMLDocument.getCPtr(doc)));
+    return ret;
+  }
+
+  public Callback() : this(libsbmlPINVOKE.new_Callback(), true) {
+    SwigDirectorConnect();
+  }
+
+  private void SwigDirectorConnect() {
+    if (SwigDerivedClassHasMethod("process", swigMethodTypes0))
+      swigDelegate0 = new SwigDelegateCallback_0(SwigDirectorprocess);
+    libsbmlPINVOKE.Callback_director_connect(swigCPtr, swigDelegate0);
+  }
+
+  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
+    global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
+    bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(Callback));
+    return hasDerivedMethod;
+  }
+
+  private int SwigDirectorprocess(global::System.IntPtr doc) {
+    return process((doc == global::System.IntPtr.Zero) ? null : new SBMLDocument(doc, false));
+  }
+
+  public delegate int SwigDelegateCallback_0(global::System.IntPtr doc);
+
+  private SwigDelegateCallback_0 swigDelegate0;
+
+  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(SBMLDocument) };
+}
+
+}
diff --git a/src/bindings/csharp/csharp-files/CallbackRegistry.cs b/src/bindings/csharp/csharp-files/CallbackRegistry.cs
new file mode 100644
index 00000000..b0f28592
--- /dev/null
+++ b/src/bindings/csharp/csharp-files/CallbackRegistry.cs
@@ -0,0 +1,126 @@
+using System;
+using System.Runtime.InteropServices;
+ 
+//------------------------------------------------------------------------------
+// <auto-generated />
+//
+// This file was automatically generated by SWIG (http://www.swig.org).
+// Version 3.0.12
+//
+// Do not make changes to this file unless you know what you are doing--modify
+// the SWIG interface file instead.
+//------------------------------------------------------------------------------
+
+namespace libsbmlcs {
+
+public class CallbackRegistry : global::System.IDisposable {
+	private HandleRef swigCPtr;
+	protected bool swigCMemOwn;
+	
+	internal CallbackRegistry(IntPtr cPtr, bool cMemoryOwn)
+	{
+		swigCMemOwn = cMemoryOwn;
+		swigCPtr    = new HandleRef(this, cPtr);
+	}
+	
+	internal static HandleRef getCPtr(CallbackRegistry obj)
+	{
+		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+	}
+	
+	internal static HandleRef getCPtrAndDisown (CallbackRegistry obj)
+	{
+		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
+		
+		if (obj != null)
+		{
+			ptr             = obj.swigCPtr;
+			obj.swigCMemOwn = false;
+		}
+		
+		return ptr;
+	}
+
+  ~CallbackRegistry() {
+    Dispose();
+  }
+
+  public virtual void Dispose() {
+    lock(this) {
+      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
+        if (swigCMemOwn) {
+          swigCMemOwn = false;
+          libsbmlPINVOKE.delete_CallbackRegistry(swigCPtr);
+        }
+        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+      }
+      global::System.GC.SuppressFinalize(this);
+    }
+  }
+
+  
+/**
+	 * Invokes all registered callbacks on the given document. If the callbacks indicate
+	 * that processing should be stopped they return a value other than operation success.
+	 * 
+	 * @return LIBSBML_OPERATION_SUCCESS to indicate that processing should be continued, 
+	 *         any other value to stop processing
+	 */ public
+ static int invokeCallbacks(SBMLDocument doc) {
+    int ret = libsbmlPINVOKE.CallbackRegistry_invokeCallbacks(SBMLDocument.getCPtr(doc));
+    return ret;
+  }
+
+  
+/**
+   * Clears all registered processing callbacks
+   */ public
+ static void clearCallbacks() {
+    libsbmlPINVOKE.CallbackRegistry_clearCallbacks();
+  }
+
+  
+/**
+   * Registers a new processing callback that will be called with a newly instantiated
+   * ModelDefinition object. This allows for all post processing on it that needs to
+   * happen before integrating it with the target document.
+   *
+   * @param cb the callback.
+   */ public
+ static void addCallback(Callback cb) {
+    libsbmlPINVOKE.CallbackRegistry_addCallback(Callback.getCPtr(cb));
+  }
+
+  
+/**
+	 * @return the number of registered callbacks.
+	 */ public
+ static int getNumCallbacks() {
+    int ret = libsbmlPINVOKE.CallbackRegistry_getNumCallbacks();
+    return ret;
+  }
+
+  
+/**
+   * Removes the callback with given index.
+   *
+   * @param index the index of the callback to be removed from the list.
+   *
+   */ public
+ static void removeCallback(int index) {
+    libsbmlPINVOKE.CallbackRegistry_removeCallback__SWIG_0(index);
+  }
+
+  
+/**
+	 * Removes the specified callback from the list of registered callbacks
+	 *
+	 * @param cb the callback to be removed.
+	 */ public
+ static void removeCallback(Callback cb) {
+    libsbmlPINVOKE.CallbackRegistry_removeCallback__SWIG_1(Callback.getCPtr(cb));
+  }
+
+}
+
+}
diff --git a/src/bindings/csharp/csharp-files/DefinitionURLRegistry.cs b/src/bindings/csharp/csharp-files/DefinitionURLRegistry.cs
new file mode 100644
index 00000000..ec58d859
--- /dev/null
+++ b/src/bindings/csharp/csharp-files/DefinitionURLRegistry.cs
@@ -0,0 +1,174 @@
+using System;
+using System.Runtime.InteropServices;
+ 
+//------------------------------------------------------------------------------
+// <auto-generated />
+//
+// This file was automatically generated by SWIG (http://www.swig.org).
+// Version 3.0.12
+//
+// Do not make changes to this file unless you know what you are doing--modify
+// the SWIG interface file instead.
+//------------------------------------------------------------------------------
+
+namespace libsbmlcs {
+
+ using System;
+ using System.Runtime.InteropServices;
+
+/** 
+ * @sbmlpackage{core}
+ *
+@htmlinclude pkg-marker-core.html Registry of all libSBML SBML DefinitionURLs.
+ *
+ * @htmlinclude libsbml-facility-only-warning.html
+ *
+ * LibSBML provides facilities for transforming and converting SBML
+ * documents in various ways.  These transformations can involve
+ * essentially anything that can be written algorithmically; examples
+ * include converting the units of measurement in a model, or converting
+ * from one Level+Version combination of SBML to another.  DefinitionURLs are
+ * implemented as objects derived from the class DefinitionURL.
+ *
+ * The DefinitionURL registry, implemented as a singleton object of class
+ * DefinitionURLRegistry, maintains a list of known DefinitionURLs and provides
+ * methods for discovering them.  Callers can use the method
+ * DefinitionURLRegistry::getNumDefinitionURLs() to find out how many
+ * DefinitionURLs are registered, then use
+ * DefinitionURLRegistry::getDefinitionURLByIndex(@if java int@endif) to
+ * iterate over each one; alternatively, callers can use
+ * DefinitionURLRegistry::getDefinitionURLFor(@if java ConversionProperties@endif)
+ * to search for a DefinitionURL having specific properties.
+ */
+
+public class DefinitionURLRegistry : global::System.IDisposable {
+	private HandleRef swigCPtr;
+	protected bool swigCMemOwn;
+	
+	internal DefinitionURLRegistry(IntPtr cPtr, bool cMemoryOwn)
+	{
+		swigCMemOwn = cMemoryOwn;
+		swigCPtr    = new HandleRef(this, cPtr);
+	}
+	
+	internal static HandleRef getCPtr(DefinitionURLRegistry obj)
+	{
+		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+	}
+	
+	internal static HandleRef getCPtrAndDisown (DefinitionURLRegistry obj)
+	{
+		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
+		
+		if (obj != null)
+		{
+			ptr             = obj.swigCPtr;
+			obj.swigCMemOwn = false;
+		}
+		
+		return ptr;
+	}
+
+  ~DefinitionURLRegistry() {
+    Dispose();
+  }
+
+  public virtual void Dispose() {
+    lock(this) {
+      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
+        if (swigCMemOwn) {
+          swigCMemOwn = false;
+          libsbmlPINVOKE.delete_DefinitionURLRegistry(swigCPtr);
+        }
+        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+      }
+      global::System.GC.SuppressFinalize(this);
+    }
+  }
+
+  
+/**
+   * Returns the singleton instance for the DefinitionURL registry.
+   *
+   * Prior to using the registry, callers have to obtain a copy of the
+   * registry.  This static method provides the means for doing that.
+   *
+   * @return the singleton for the DefinitionURL registry.
+   */ public
+ static DefinitionURLRegistry getInstance() {
+    DefinitionURLRegistry ret = new DefinitionURLRegistry(libsbmlPINVOKE.DefinitionURLRegistry_getInstance(), false);
+    return ret;
+  }
+
+  
+/**
+   * Adds the given DefinitionURL to the registry of SBML DefinitionURLs.
+   *
+   * @param DefinitionURL the DefinitionURL to add to the registry.
+   *
+   *
+ * @return integer value indicating success/failure of the
+ * function.  @if clike The value is drawn from the
+ * enumeration #OperationReturnValues_t. @endif The possible values
+ * returned by this function are:
+ *
+ *
+   * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
+   * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
+   */ public
+ static int addDefinitionURL(string url, int type) {
+    int ret = libsbmlPINVOKE.DefinitionURLRegistry_addDefinitionURL(url, type);
+    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  
+/**
+   * Returns the number of DefinitionURLs known by the registry.
+   *
+   * @return the number of registered DefinitionURLs.
+   *
+   * @see getDefinitionURLByIndex(@if java int@endif)
+   */ public
+ static int getNumDefinitionURLs() {
+    int ret = libsbmlPINVOKE.DefinitionURLRegistry_getNumDefinitionURLs();
+    return ret;
+  }
+
+  
+/** */ public
+ static void addSBMLDefinitions() {
+    libsbmlPINVOKE.DefinitionURLRegistry_addSBMLDefinitions();
+  }
+
+  
+/** */ public
+ static bool getCoreDefinitionsAdded() {
+    bool ret = libsbmlPINVOKE.DefinitionURLRegistry_getCoreDefinitionsAdded();
+    return ret;
+  }
+
+  
+/** */ public
+ static int getType(string url) {
+    int ret = libsbmlPINVOKE.DefinitionURLRegistry_getType(url);
+    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  
+/** */ public
+ static string getDefinitionUrlByIndex(int index) {
+    string ret = libsbmlPINVOKE.DefinitionURLRegistry_getDefinitionUrlByIndex(index);
+    return ret;
+  }
+
+  
+/** */ public
+ static void clearDefinitions() {
+    libsbmlPINVOKE.DefinitionURLRegistry_clearDefinitions();
+  }
+
+}
+
+}
diff --git a/src/bindings/csharp/csharp-files/MathFilter.cs b/src/bindings/csharp/csharp-files/MathFilter.cs
new file mode 100644
index 00000000..f1fcb5f1
--- /dev/null
+++ b/src/bindings/csharp/csharp-files/MathFilter.cs
@@ -0,0 +1,118 @@
+using System;
+using System.Runtime.InteropServices;
+ 
+//------------------------------------------------------------------------------
+// <auto-generated />
+//
+// This file was automatically generated by SWIG (http://www.swig.org).
+// Version 3.0.12
+//
+// Do not make changes to this file unless you know what you are doing--modify
+// the SWIG interface file instead.
+//------------------------------------------------------------------------------
+
+namespace libsbmlcs {
+
+ using System;
+ using System.Runtime.InteropServices;
+
+/** 
+ * @sbmlpackage{core}
+ *
+@htmlinclude pkg-marker-core.html 
+ * @internal
+ */
+
+public class MathFilter : ElementFilter {
+	private HandleRef swigCPtr;
+	
+	internal MathFilter(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.MathFilter_SWIGUpcast(cPtr), cMemoryOwn)
+	{
+		//super(libsbmlPINVOKE.MathFilterUpcast(cPtr), cMemoryOwn);
+		swigCPtr = new HandleRef(this, cPtr);
+	}
+	
+	internal static HandleRef getCPtr(MathFilter obj)
+	{
+		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+	}
+	
+	internal static HandleRef getCPtrAndDisown (MathFilter obj)
+	{
+		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
+		
+		if (obj != null)
+		{
+			ptr             = obj.swigCPtr;
+			obj.swigCMemOwn = false;
+		}
+		
+		return ptr;
+	}
+
+  ~MathFilter() {
+    Dispose();
+  }
+
+  public override void Dispose() {
+    lock(this) {
+      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
+        if (swigCMemOwn) {
+          swigCMemOwn = false;
+          libsbmlPINVOKE.delete_MathFilter(swigCPtr);
+        }
+        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+      }
+      global::System.GC.SuppressFinalize(this);
+      base.Dispose();
+    }
+  }
+
+  public MathFilter() : this(libsbmlPINVOKE.new_MathFilter(), true) {
+    SwigDirectorConnect();
+  }
+
+  
+/**
+   * Predicate to test elements.
+   *
+   * This is the central predicate of the ElementFilter class.  In subclasses
+   * of ElementFilter, callers should implement this method such that it
+   * returns @c true for @p element arguments that are 'desirable' and
+   * @c false for those that are 'undesirable' in whatever filtering context the
+   * ElementFilter subclass is designed to be used.
+   *
+   * @param element the element to be tested.
+   *
+   * @return @c true if the @p element is desirable or should be kept,
+   * @c false otherwise.
+   */ public virtual
+ bool filter(SBase element) {
+    bool ret = (SwigDerivedClassHasMethod("filter", swigMethodTypes0) ? libsbmlPINVOKE.MathFilter_filterSwigExplicitMathFilter(swigCPtr, SBase.getCPtr(element)) : libsbmlPINVOKE.MathFilter_filter(swigCPtr, SBase.getCPtr(element)));
+    return ret;
+  }
+
+  private void SwigDirectorConnect() {
+    if (SwigDerivedClassHasMethod("filter", swigMethodTypes0))
+      swigDelegate0 = new SwigDelegateMathFilter_0(SwigDirectorfilter);
+    libsbmlPINVOKE.MathFilter_director_connect(swigCPtr, swigDelegate0);
+  }
+
+  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
+    global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
+    bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(MathFilter));
+    return hasDerivedMethod;
+  }
+
+  private bool SwigDirectorfilter(global::System.IntPtr element) {
+    return filter((element == global::System.IntPtr.Zero) ? null : new SBase(element, false));
+  }
+
+  public delegate bool SwigDelegateMathFilter_0(global::System.IntPtr element);
+
+  private SwigDelegateMathFilter_0 swigDelegate0;
+
+  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(SBase) };
+}
+
+}
diff --git a/src/bindings/csharp/csharp-files/libsbml.cs b/src/bindings/csharp/csharp-files/libsbml.cs
index 812e10b3..767dd9e6 100644
--- a/src/bindings/csharp/csharp-files/libsbml.cs
+++ b/src/bindings/csharp/csharp-files/libsbml.cs
@@ -2550,9 +2550,9 @@ if (doc.getNumErrors() > 0)
     libsbmlPINVOKE.SBML_deleteL3Parser();
   }
 
-  public const string LIBSBML_DOTTED_VERSION = "5.17.2";
-  public const int LIBSBML_VERSION = 51702;
-  public const string LIBSBML_VERSION_STRING = "51702";
+  public const string LIBSBML_DOTTED_VERSION = "5.18.0";
+  public const int LIBSBML_VERSION = 51800;
+  public const string LIBSBML_VERSION_STRING = "51800";
   // OperationReturnValues_t 
   public const int LIBSBML_OPERATION_SUCCESS = 0;
   public const int LIBSBML_INDEX_EXCEEDS_SIZE = -1;
@@ -2892,6 +2892,7 @@ if (doc.getNumErrors() > 0)
   public const int InvalidFunctionDefReturnType = 20305;
   public const int OneMathElementPerFunc = 20306;
   public const int AllowedAttributesOnFunc = 20307;
+  public const int OnlyCiInsideBVar = 99304;
   public const int InvalidUnitDefId = 20401;
   public const int InvalidSubstanceRedefinition = 20402;
   public const int InvalidLengthRedefinition = 20403;
@@ -3184,6 +3185,7 @@ if (doc.getNumErrors() > 0)
   public const int MultiplierNotValidAttribute = 99924;
   public const int OffsetNotValidAttribute = 99925;
   public const int L3SpatialDimensionsUnset = 99926;
+  public const int OperationInterrupted = 99950;
   public const int UnknownCoreAttribute = 99994;
   public const int UnknownPackageAttribute = 99995;
   public const int PackageConversionNotSupported = 99996;
diff --git a/src/bindings/csharp/csharp-files/libsbmlPINVOKE.cs b/src/bindings/csharp/csharp-files/libsbmlPINVOKE.cs
index 611113c6..39069ed9 100644
--- a/src/bindings/csharp/csharp-files/libsbmlPINVOKE.cs
+++ b/src/bindings/csharp/csharp-files/libsbmlPINVOKE.cs
@@ -7574,6 +7574,42 @@ class libsbmlPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_SBMLExtensionRegistry_getASTPlugin")]
   public static extern global::System.IntPtr SBMLExtensionRegistry_getASTPlugin(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2);
 
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_delete_Callback")]
+  public static extern void delete_Callback(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_Callback_process")]
+  public static extern int Callback_process(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_Callback_processSwigExplicitCallback")]
+  public static extern int Callback_processSwigExplicitCallback(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_new_Callback")]
+  public static extern global::System.IntPtr new_Callback();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_Callback_director_connect")]
+  public static extern void Callback_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, Callback.SwigDelegateCallback_0 delegate0);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_CallbackRegistry_invokeCallbacks")]
+  public static extern int CallbackRegistry_invokeCallbacks(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_CallbackRegistry_clearCallbacks")]
+  public static extern void CallbackRegistry_clearCallbacks();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_CallbackRegistry_addCallback")]
+  public static extern void CallbackRegistry_addCallback(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_CallbackRegistry_getNumCallbacks")]
+  public static extern int CallbackRegistry_getNumCallbacks();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_CallbackRegistry_removeCallback__SWIG_0")]
+  public static extern void CallbackRegistry_removeCallback__SWIG_0(int jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_CallbackRegistry_removeCallback__SWIG_1")]
+  public static extern void CallbackRegistry_removeCallback__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_delete_CallbackRegistry")]
+  public static extern void delete_CallbackRegistry(global::System.Runtime.InteropServices.HandleRef jarg1);
+
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_new_ASTNode__SWIG_0")]
   public static extern global::System.IntPtr new_ASTNode__SWIG_0(int jarg1);
 
@@ -7926,10 +7962,13 @@ class libsbmlPINVOKE {
   public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
 
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_ASTNode_getASTPlugin__SWIG_2")]
-  public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, bool jarg3);
+  public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, bool jarg3, bool jarg4);
 
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_ASTNode_getASTPlugin__SWIG_3")]
-  public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_3(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
+  public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_3(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, bool jarg3);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_ASTNode_getASTPlugin__SWIG_4")]
+  public static extern global::System.IntPtr ASTNode_getASTPlugin__SWIG_4(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
 
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_ASTNode_getPlugin__SWIG_0")]
   public static extern global::System.IntPtr ASTNode_getPlugin__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
@@ -8069,6 +8108,48 @@ class libsbmlPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_L3ParserSettings_visitPackageInfixSyntax")]
   public static extern void L3ParserSettings_visitPackageInfixSyntax(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4);
 
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_DefinitionURLRegistry_getInstance")]
+  public static extern global::System.IntPtr DefinitionURLRegistry_getInstance();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_DefinitionURLRegistry_addDefinitionURL")]
+  public static extern int DefinitionURLRegistry_addDefinitionURL(string jarg1, int jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_DefinitionURLRegistry_getNumDefinitionURLs")]
+  public static extern int DefinitionURLRegistry_getNumDefinitionURLs();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_DefinitionURLRegistry_addSBMLDefinitions")]
+  public static extern void DefinitionURLRegistry_addSBMLDefinitions();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_delete_DefinitionURLRegistry")]
+  public static extern void delete_DefinitionURLRegistry(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_DefinitionURLRegistry_getCoreDefinitionsAdded")]
+  public static extern bool DefinitionURLRegistry_getCoreDefinitionsAdded();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_DefinitionURLRegistry_getType")]
+  public static extern int DefinitionURLRegistry_getType(string jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_DefinitionURLRegistry_getDefinitionUrlByIndex")]
+  public static extern string DefinitionURLRegistry_getDefinitionUrlByIndex(int jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_DefinitionURLRegistry_clearDefinitions")]
+  public static extern void DefinitionURLRegistry_clearDefinitions();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_new_MathFilter")]
+  public static extern global::System.IntPtr new_MathFilter();
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_delete_MathFilter")]
+  public static extern void delete_MathFilter(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_MathFilter_filter")]
+  public static extern bool MathFilter_filter(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_MathFilter_filterSwigExplicitMathFilter")]
+  public static extern bool MathFilter_filterSwigExplicitMathFilter(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_MathFilter_director_connect")]
+  public static extern void MathFilter_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, MathFilter.SwigDelegateMathFilter_0 delegate0);
+
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_ASTNodeValues_t_name_set")]
   public static extern void ASTNodeValues_t_name_set(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
 
@@ -8133,7 +8214,10 @@ class libsbmlPINVOKE {
   public static extern bool ASTBasePlugin_defines__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
 
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_ASTBasePlugin_defines__SWIG_1")]
-  public static extern bool ASTBasePlugin_defines__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
+  public static extern bool ASTBasePlugin_defines__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, bool jarg3);
+
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_ASTBasePlugin_defines__SWIG_2")]
+  public static extern bool ASTBasePlugin_defines__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
 
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_ASTBasePlugin_isFunction")]
   public static extern bool ASTBasePlugin_isFunction(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
@@ -8159,6 +8243,9 @@ class libsbmlPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_ASTBasePlugin_getUnitDefinitionFromPackage")]
   public static extern global::System.IntPtr ASTBasePlugin_getUnitDefinitionFromPackage(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, bool jarg4, int jarg5);
 
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_ASTBasePlugin_getASTNodeValue")]
+  public static extern global::System.IntPtr ASTBasePlugin_getASTNodeValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2);
+
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_ASTBasePlugin_allowedInFunctionDefinition")]
   public static extern int ASTBasePlugin_allowedInFunctionDefinition(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
 
@@ -8588,6 +8675,9 @@ class libsbmlPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_SBMLDocumentPlugin_SWIGUpcast")]
   public static extern global::System.IntPtr SBMLDocumentPlugin_SWIGUpcast(global::System.IntPtr jarg1);
 
+  [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_MathFilter_SWIGUpcast")]
+  public static extern global::System.IntPtr MathFilter_SWIGUpcast(global::System.IntPtr jarg1);
+
   [global::System.Runtime.InteropServices.DllImport("libsbmlcs", EntryPoint="CSharp_libsbmlcs_L3v2extendedmathPkgNamespaces_SWIGUpcast")]
   public static extern global::System.IntPtr L3v2extendedmathPkgNamespaces_SWIGUpcast(global::System.IntPtr jarg1);
 
diff --git a/src/bindings/csharp/libsbml.i b/src/bindings/csharp/libsbml.i
index 18b24dce..420b6b43 100644
--- a/src/bindings/csharp/libsbml.i
+++ b/src/bindings/csharp/libsbml.i
@@ -8,6 +8,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/libsbml_wrap-win.cpp b/src/bindings/csharp/libsbml_wrap-win.cpp
index f8d6fd1e..728b9378 100644
--- a/src/bindings/csharp/libsbml_wrap-win.cpp
+++ b/src/bindings/csharp/libsbml_wrap-win.cpp
@@ -509,7 +509,8 @@ SWIGINTERN ListWrapper< SBase > *SBasePlugin_getListOfAllElements__SWIG_0(SBaseP
 #include <sbml/math/FormulaParser.h>
 #include <sbml/math/L3Parser.h>
 #include <sbml/math/L3ParserSettings.h>
-
+#include <sbml/math/DefinitionURLRegistry.h>
+#include <sbml/util/MathFilter.h>
 
 
 
@@ -883,6 +884,70 @@ void SwigDirector_SBMLValidator::swig_init_callbacks() {
   swig_callbackclearFailures = 0;
 }
 
+SwigDirector_Callback::SwigDirector_Callback() : Callback(), Swig::Director() {
+  swig_init_callbacks();
+}
+
+SwigDirector_Callback::~SwigDirector_Callback() {
+  
+}
+
+
+int SwigDirector_Callback::process(SBMLDocument *doc) {
+  int c_result = SwigValueInit< int >() ;
+  int jresult = 0 ;
+  void * jdoc = 0 ;
+  
+  if (!swig_callbackprocess) {
+    return Callback::process(doc);
+  } else {
+    jdoc = (void *) doc; 
+    jresult = (int) swig_callbackprocess(jdoc);
+    c_result = (int)jresult; 
+  }
+  return c_result;
+}
+
+void SwigDirector_Callback::swig_connect_director(SWIG_Callback0_t callbackprocess) {
+  swig_callbackprocess = callbackprocess;
+}
+
+void SwigDirector_Callback::swig_init_callbacks() {
+  swig_callbackprocess = 0;
+}
+
+SwigDirector_MathFilter::SwigDirector_MathFilter() : MathFilter(), Swig::Director() {
+  swig_init_callbacks();
+}
+
+SwigDirector_MathFilter::~SwigDirector_MathFilter() {
+  
+}
+
+
+bool SwigDirector_MathFilter::filter(SBase const *element) {
+  bool c_result = SwigValueInit< bool >() ;
+  unsigned int jresult = 0 ;
+  void * jelement = 0 ;
+  
+  if (!swig_callbackfilter) {
+    return MathFilter::filter(element);
+  } else {
+    jelement = (void *) element; 
+    jresult = (unsigned int) swig_callbackfilter(jelement);
+    c_result = jresult ? true : false; 
+  }
+  return c_result;
+}
+
+void SwigDirector_MathFilter::swig_connect_director(SWIG_Callback0_t callbackfilter) {
+  swig_callbackfilter = callbackfilter;
+}
+
+void SwigDirector_MathFilter::swig_init_callbacks() {
+  swig_callbackfilter = 0;
+}
+
 
 #ifdef __cplusplus
 extern "C" {
@@ -2845,17 +2910,21 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_SBase_getAncestorOfType__SWIG_0(voi
   void * jresult ;
   SBase *arg1 = (SBase *) 0 ;
   int arg2 ;
-  std::string arg3 ;
+  std::string *arg3 = 0 ;
+  std::string arg_str3 ;
   SBase *result = 0 ;
   
   arg1 = (SBase *)jarg1; 
   arg2 = (int)jarg2; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    (&arg3)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str3.assign(mbstr);
+    arg3 = &arg_str3;
     delete[] mbstr;
   }
-  result = (SBase *)(arg1)->getAncestorOfType(arg2,arg3);
+  result = (SBase *)(arg1)->getAncestorOfType(arg2,(std::string const &)*arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -3216,15 +3285,19 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_SBase_appendAnnotation__SWIG_1(void *
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_SBase_removeTopLevelAnnotationElement__SWIG_0(void * jarg1, wchar_t* jarg2, wchar_t* jarg3, unsigned int jarg4) {
   int jresult ;
   SBase *arg1 = (SBase *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
   bool arg4 ;
+  std::string arg_str2 ;
   int result;
   
   arg1 = (SBase *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
   {
@@ -3233,7 +3306,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_SBase_removeTopLevelAnnotationElement_
     delete[] mbstr;
   }
   arg4 = jarg4 ? true : false; 
-  result = (int)(arg1)->removeTopLevelAnnotationElement(arg2,arg3,arg4);
+  result = (int)(arg1)->removeTopLevelAnnotationElement((std::string const &)*arg2,arg3,arg4);
   jresult = result; 
   return jresult;
 }
@@ -3242,14 +3315,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_SBase_removeTopLevelAnnotationElement_
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_SBase_removeTopLevelAnnotationElement__SWIG_1(void * jarg1, wchar_t* jarg2, wchar_t* jarg3) {
   int jresult ;
   SBase *arg1 = (SBase *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
+  std::string arg_str2 ;
   int result;
   
   arg1 = (SBase *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
   {
@@ -3257,7 +3334,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_SBase_removeTopLevelAnnotationElement_
     (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->removeTopLevelAnnotationElement(arg2,arg3);
+  result = (int)(arg1)->removeTopLevelAnnotationElement((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -3266,16 +3343,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_SBase_removeTopLevelAnnotationElement_
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_SBase_removeTopLevelAnnotationElement__SWIG_2(void * jarg1, wchar_t* jarg2) {
   int jresult ;
   SBase *arg1 = (SBase *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
+  std::string arg_str2 ;
   int result;
   
   arg1 = (SBase *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
-  result = (int)(arg1)->removeTopLevelAnnotationElement(arg2);
+  result = (int)(arg1)->removeTopLevelAnnotationElement((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -8577,20 +8658,16 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_SBMLDocument_setModel(void * jarg1, vo
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_SBMLDocument_createModel__SWIG_0(void * jarg1, wchar_t* jarg2) {
   void * jresult ;
   SBMLDocument *arg1 = (SBMLDocument *) 0 ;
-  std::string *arg2 = 0 ;
-  std::string arg_str2 ;
+  std::string arg2 ;
   Model *result = 0 ;
   
   arg1 = (SBMLDocument *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (Model *)(arg1)->createModel((std::string const &)*arg2);
+  result = (Model *)(arg1)->createModel(arg2);
   jresult = (void *)result; 
   return jresult;
 }
@@ -19000,9 +19077,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_Reaction_addReactant__SWIG_1(void * ja
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   bool arg5 ;
-  std::string arg_str4 ;
   int result;
   
   arg1 = (Reaction *)jarg1; 
@@ -19010,14 +19086,11 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_Reaction_addReactant__SWIG_1(void * ja
   arg3 = (double)jarg3; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   arg5 = jarg5 ? true : false; 
-  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,(std::string const &)*arg4,arg5);
+  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,arg4,arg5);
   jresult = result; 
   return jresult;
 }
@@ -19028,8 +19101,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_Reaction_addReactant__SWIG_2(void * ja
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
-  std::string arg_str4 ;
+  std::string arg4 ;
   int result;
   
   arg1 = (Reaction *)jarg1; 
@@ -19037,13 +19109,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_Reaction_addReactant__SWIG_2(void * ja
   arg3 = (double)jarg3; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,(std::string const &)*arg4);
+  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,arg4);
   jresult = result; 
   return jresult;
 }
@@ -19098,9 +19167,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_Reaction_addProduct__SWIG_1(void * jar
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   bool arg5 ;
-  std::string arg_str4 ;
   int result;
   
   arg1 = (Reaction *)jarg1; 
@@ -19108,14 +19176,11 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_Reaction_addProduct__SWIG_1(void * jar
   arg3 = (double)jarg3; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   arg5 = jarg5 ? true : false; 
-  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,(std::string const &)*arg4,arg5);
+  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,arg4,arg5);
   jresult = result; 
   return jresult;
 }
@@ -19126,8 +19191,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_Reaction_addProduct__SWIG_2(void * jar
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
-  std::string arg_str4 ;
+  std::string arg4 ;
   int result;
   
   arg1 = (Reaction *)jarg1; 
@@ -19135,13 +19199,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_Reaction_addProduct__SWIG_2(void * jar
   arg3 = (double)jarg3; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,(std::string const &)*arg4);
+  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,arg4);
   jresult = result; 
   return jresult;
 }
@@ -19195,21 +19256,17 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_Reaction_addModifier__SWIG_1(void * ja
   int jresult ;
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
-  std::string *arg3 = 0 ;
-  std::string arg_str3 ;
+  std::string arg3 ;
   int result;
   
   arg1 = (Reaction *)jarg1; 
   arg2 = (Species *)jarg2; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->addModifier((Species const *)arg2,(std::string const &)*arg3);
+  result = (int)(arg1)->addModifier((Species const *)arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -25191,9 +25248,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLNamespaces__SWIG_3(long lon
   unsigned int arg2 ;
   std::string *arg3 = 0 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   std::string arg_str3 ;
-  std::string arg_str5 ;
   SBMLNamespaces *result = 0 ;
   
   {
@@ -25215,15 +25271,12 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLNamespaces__SWIG_3(long lon
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg5);
-    if (!mbstr) return 0;
-    
-    arg_str5.assign(mbstr);
-    arg5 = &arg_str5;
+    (&arg5)->assign(mbstr);
     delete[] mbstr;
   }
   
   try {
-    result = (SBMLNamespaces *)new SBMLNamespaces(arg1,arg2,(std::string const &)*arg3,arg4,(std::string const &)*arg5);
+    result = (SBMLNamespaces *)new SBMLNamespaces(arg1,arg2,(std::string const &)*arg3,arg4,arg5);
   }
   catch (const SBMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),0);
@@ -25984,12 +26037,10 @@ SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_SBMLConstructorException_getSBMLE
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_0(wchar_t* jarg1, wchar_t* jarg2, int jarg3, wchar_t* jarg4) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   ConversionOptionType_t arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   std::string arg_str1 ;
-  std::string arg_str2 ;
-  std::string arg_str4 ;
   ConversionOption *result = 0 ;
   
   {
@@ -26002,22 +26053,16 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_0(wchar_
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   arg3 = (ConversionOptionType_t)jarg3; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3,arg4);
   jresult = (void *)result; 
   return jresult;
 }
@@ -26026,10 +26071,9 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_0(wchar_
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_1(wchar_t* jarg1, wchar_t* jarg2, int jarg3) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   ConversionOptionType_t arg3 ;
   std::string arg_str1 ;
-  std::string arg_str2 ;
   ConversionOption *result = 0 ;
   
   {
@@ -26042,14 +26086,11 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_1(wchar_
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   arg3 = (ConversionOptionType_t)jarg3; 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(std::string const &)*arg2,arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -26058,9 +26099,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_1(wchar_
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_2(wchar_t* jarg1, wchar_t* jarg2) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   std::string arg_str1 ;
-  std::string arg_str2 ;
   ConversionOption *result = 0 ;
   
   {
@@ -26073,13 +26113,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_2(wchar_
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(std::string const &)*arg2);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2);
   jresult = (void *)result; 
   return jresult;
 }
@@ -26109,9 +26146,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_4(wchar_
   void * jresult ;
   std::string *arg1 = 0 ;
   char *arg2 = (char *) 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str1 ;
-  std::string arg_str3 ;
   ConversionOption *result = 0 ;
   
   {
@@ -26131,13 +26167,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_4(wchar_
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(char const *)arg2,(std::string const &)*arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(char const *)arg2,arg3);
   jresult = (void *)result; 
   {
     delete[] arg2;
@@ -26150,9 +26183,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_6(wchar_
   void * jresult ;
   std::string *arg1 = 0 ;
   bool arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str1 ;
-  std::string arg_str3 ;
   ConversionOption *result = 0 ;
   
   {
@@ -26166,13 +26198,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_6(wchar_
   arg2 = jarg2 ? true : false; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -26204,9 +26233,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_8(wchar_
   void * jresult ;
   std::string *arg1 = 0 ;
   double arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str1 ;
-  std::string arg_str3 ;
   ConversionOption *result = 0 ;
   
   {
@@ -26220,13 +26248,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_8(wchar_
   arg2 = (double)jarg2; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -26258,9 +26283,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_10(wchar
   void * jresult ;
   std::string *arg1 = 0 ;
   float arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str1 ;
-  std::string arg_str3 ;
   ConversionOption *result = 0 ;
   
   {
@@ -26274,13 +26298,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_10(wchar
   arg2 = (float)jarg2; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -26312,9 +26333,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_12(wchar
   void * jresult ;
   std::string *arg1 = 0 ;
   int arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str1 ;
-  std::string arg_str3 ;
   ConversionOption *result = 0 ;
   
   {
@@ -26328,13 +26348,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ConversionOption__SWIG_12(wchar
   arg2 = (int)jarg2; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -26807,12 +26824,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_1(void * jarg1, wchar_t* jarg2, wchar_t* jarg3, int jarg4, wchar_t* jarg5) {
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOptionType_t arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   std::string arg_str2 ;
-  std::string arg_str3 ;
-  std::string arg_str5 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   {
@@ -26825,32 +26840,25 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return ;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
   arg4 = (ConversionOptionType_t)jarg4; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg5);
-    if (!mbstr) return ;
-    
-    arg_str5.assign(mbstr);
-    arg5 = &arg_str5;
+    (&arg5)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->addOption((std::string const &)*arg2,(std::string const &)*arg3,arg4,(std::string const &)*arg5);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4,arg5);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_2(void * jarg1, wchar_t* jarg2, wchar_t* jarg3, int jarg4) {
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOptionType_t arg4 ;
   std::string arg_str2 ;
-  std::string arg_str3 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   {
@@ -26863,23 +26871,19 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return ;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
   arg4 = (ConversionOptionType_t)jarg4; 
-  (arg1)->addOption((std::string const &)*arg2,(std::string const &)*arg3,arg4);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_3(void * jarg1, wchar_t* jarg2, wchar_t* jarg3) {
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str2 ;
-  std::string arg_str3 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   {
@@ -26892,13 +26896,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return ;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->addOption((std::string const &)*arg2,(std::string const &)*arg3);
+  (arg1)->addOption((std::string const &)*arg2,arg3);
 }
 
 
@@ -26924,9 +26925,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   char *arg3 = (char *) 0 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   std::string arg_str2 ;
-  std::string arg_str4 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   {
@@ -26946,13 +26946,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return ;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->addOption((std::string const &)*arg2,(char const *)arg3,(std::string const &)*arg4);
+  (arg1)->addOption((std::string const &)*arg2,(char const *)arg3,arg4);
   {
     delete[] arg3;
   }
@@ -26963,9 +26960,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   std::string arg_str2 ;
-  std::string arg_str4 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   {
@@ -26979,13 +26975,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   arg3 = jarg3 ? true : false; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return ;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -27013,9 +27006,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   std::string arg_str2 ;
-  std::string arg_str4 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   {
@@ -27029,13 +27021,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   arg3 = (double)jarg3; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return ;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -27063,9 +27052,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   float arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   std::string arg_str2 ;
-  std::string arg_str4 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   {
@@ -27079,13 +27067,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   arg3 = (float)jarg3; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return ;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -27113,9 +27098,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   std::string arg_str2 ;
-  std::string arg_str4 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   {
@@ -27129,13 +27113,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ConversionProperties_addOption__SWIG_
   arg3 = (int)jarg3; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return ;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -29504,12 +29485,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLAttributes_add__SWIG_0(void * jarg1
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
+  std::string arg4 ;
+  std::string arg5 ;
   std::string arg_str2 ;
   std::string arg_str3 ;
-  std::string arg_str4 ;
-  std::string arg_str5 ;
   int result;
   
   arg1 = (XMLAttributes *)jarg1; 
@@ -29531,21 +29510,15 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLAttributes_add__SWIG_0(void * jarg1
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg5);
-    if (!mbstr) return 0;
-    
-    arg_str5.assign(mbstr);
-    arg5 = &arg_str5;
+    (&arg5)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5);
   jresult = result; 
   return jresult;
 }
@@ -29556,10 +29529,9 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLAttributes_add__SWIG_1(void * jarg1
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   std::string arg_str2 ;
   std::string arg_str3 ;
-  std::string arg_str4 ;
   int result;
   
   arg1 = (XMLAttributes *)jarg1; 
@@ -29581,13 +29553,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLAttributes_add__SWIG_1(void * jarg1
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
+  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,arg4);
   jresult = result; 
   return jresult;
 }
@@ -29685,9 +29654,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLAttributes_remove__SWIG_1(void * ja
   int jresult ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str2 ;
-  std::string arg_str3 ;
   int result;
   
   arg1 = (XMLAttributes *)jarg1; 
@@ -29701,13 +29669,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLAttributes_remove__SWIG_1(void * ja
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->remove((std::string const &)*arg2,(std::string const &)*arg3);
+  result = (int)(arg1)->remove((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -29959,16 +29924,20 @@ SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLAttributes_getValue__SWIG_0(vo
 SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLAttributes_getValue__SWIG_1(void * jarg1, wchar_t* jarg2) {
   wchar_t* jresult ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
+  std::string arg_str2 ;
   std::string result;
   
   arg1 = (XMLAttributes *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
-  result = ((XMLAttributes const *)arg1)->getValue(arg2);
+  result = ((XMLAttributes const *)arg1)->getValue((std::string const &)*arg2);
   {
     jresult = convertUTF8ToUnicode( (&result)->c_str() );
     wchar_t* unistr = convertUTF8ToUnicode( (&result)->c_str() );
@@ -29982,22 +29951,30 @@ SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLAttributes_getValue__SWIG_1(vo
 SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLAttributes_getValue__SWIG_2(void * jarg1, wchar_t* jarg2, wchar_t* jarg3) {
   wchar_t* jresult ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
-  std::string arg3 ;
+  std::string *arg2 = 0 ;
+  std::string *arg3 = 0 ;
+  std::string arg_str2 ;
+  std::string arg_str3 ;
   std::string result;
   
   arg1 = (XMLAttributes *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    (&arg3)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str3.assign(mbstr);
+    arg3 = &arg_str3;
     delete[] mbstr;
   }
-  result = ((XMLAttributes const *)arg1)->getValue(arg2,arg3);
+  result = ((XMLAttributes const *)arg1)->getValue((std::string const &)*arg2,(std::string const &)*arg3);
   {
     jresult = convertUTF8ToUnicode( (&result)->c_str() );
     wchar_t* unistr = convertUTF8ToUnicode( (&result)->c_str() );
@@ -30048,14 +30025,18 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLAttributes_hasAttribute__S
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLAttributes_hasAttribute__SWIG_1(void * jarg1, wchar_t* jarg2, wchar_t* jarg3) {
   unsigned int jresult ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
+  std::string arg_str2 ;
   bool result;
   
   arg1 = (XMLAttributes *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
   {
@@ -30063,7 +30044,7 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLAttributes_hasAttribute__S
     (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (bool)((XMLAttributes const *)arg1)->hasAttribute(arg2,arg3);
+  result = (bool)((XMLAttributes const *)arg1)->hasAttribute((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -30072,16 +30053,20 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLAttributes_hasAttribute__S
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLAttributes_hasAttribute__SWIG_2(void * jarg1, wchar_t* jarg2) {
   unsigned int jresult ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
+  std::string arg_str2 ;
   bool result;
   
   arg1 = (XMLAttributes *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
-  result = (bool)((XMLAttributes const *)arg1)->hasAttribute(arg2);
+  result = (bool)((XMLAttributes const *)arg1)->hasAttribute((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -30199,9 +30184,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLNamespaces_add__SWIG_0(void * jarg1
   int jresult ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str2 ;
-  std::string arg_str3 ;
   int result;
   
   arg1 = (XMLNamespaces *)jarg1; 
@@ -30215,13 +30199,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLNamespaces_add__SWIG_0(void * jarg1
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3);
+  result = (int)(arg1)->add((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -30300,16 +30281,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLNamespaces_clear(void * jarg1) {
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLNamespaces_getIndex(void * jarg1, wchar_t* jarg2) {
   int jresult ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
+  std::string arg_str2 ;
   int result;
   
   arg1 = (XMLNamespaces *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
-  result = (int)((XMLNamespaces const *)arg1)->getIndex(arg2);
+  result = (int)((XMLNamespaces const *)arg1)->getIndex((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -30318,16 +30303,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLNamespaces_getIndex(void * jarg1, w
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLNamespaces_containsUri(void * jarg1, wchar_t* jarg2) {
   unsigned int jresult ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
+  std::string arg_str2 ;
   bool result;
   
   arg1 = (XMLNamespaces *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
-  result = (bool)((XMLNamespaces const *)arg1)->containsUri(arg2);
+  result = (bool)((XMLNamespaces const *)arg1)->containsUri((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -30336,16 +30325,20 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLNamespaces_containsUri(voi
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLNamespaces_getIndexByPrefix(void * jarg1, wchar_t* jarg2) {
   int jresult ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
+  std::string arg_str2 ;
   int result;
   
   arg1 = (XMLNamespaces *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
-  result = (int)((XMLNamespaces const *)arg1)->getIndexByPrefix(arg2);
+  result = (int)((XMLNamespaces const *)arg1)->getIndexByPrefix((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -30443,20 +30436,16 @@ SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLNamespaces_getURI__SWIG_0(void
 SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLNamespaces_getURI__SWIG_1(void * jarg1, wchar_t* jarg2) {
   wchar_t* jresult ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string *arg2 = 0 ;
-  std::string arg_str2 ;
+  std::string arg2 ;
   std::string result;
   
   arg1 = (XMLNamespaces *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
-  result = ((XMLNamespaces const *)arg1)->getURI((std::string const &)*arg2);
+  result = ((XMLNamespaces const *)arg1)->getURI(arg2);
   {
     jresult = convertUTF8ToUnicode( (&result)->c_str() );
     wchar_t* unistr = convertUTF8ToUnicode( (&result)->c_str() );
@@ -31057,12 +31046,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLToken_addAttr__SWIG_0(void * jarg1,
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
+  std::string arg4 ;
+  std::string arg5 ;
   std::string arg_str2 ;
   std::string arg_str3 ;
-  std::string arg_str4 ;
-  std::string arg_str5 ;
   int result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -31084,21 +31071,15 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLToken_addAttr__SWIG_0(void * jarg1,
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg5);
-    if (!mbstr) return 0;
-    
-    arg_str5.assign(mbstr);
-    arg5 = &arg_str5;
+    (&arg5)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5);
   jresult = result; 
   return jresult;
 }
@@ -31109,10 +31090,9 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLToken_addAttr__SWIG_1(void * jarg1,
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   std::string arg_str2 ;
   std::string arg_str3 ;
-  std::string arg_str4 ;
   int result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -31134,13 +31114,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLToken_addAttr__SWIG_1(void * jarg1,
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
+  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,arg4);
   jresult = result; 
   return jresult;
 }
@@ -31224,9 +31201,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLToken_removeAttr__SWIG_1(void * jar
   int jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str2 ;
-  std::string arg_str3 ;
   int result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -31240,13 +31216,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLToken_removeAttr__SWIG_1(void * jar
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->removeAttr((std::string const &)*arg2,(std::string const &)*arg3);
+  result = (int)(arg1)->removeAttr((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -31308,9 +31281,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLToken_getAttrIndex__SWIG_0(void * j
   int jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str2 ;
-  std::string arg_str3 ;
   int result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -31324,13 +31296,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLToken_getAttrIndex__SWIG_0(void * j
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)((XMLToken const *)arg1)->getAttrIndex((std::string const &)*arg2,(std::string const &)*arg3);
+  result = (int)((XMLToken const *)arg1)->getAttrIndex((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -31486,14 +31455,18 @@ SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLToken_getAttrValue__SWIG_0(voi
 SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLToken_getAttrValue__SWIG_1(void * jarg1, wchar_t* jarg2, wchar_t* jarg3) {
   wchar_t* jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
+  std::string arg_str2 ;
   std::string result;
   
   arg1 = (XMLToken *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
   {
@@ -31501,7 +31474,7 @@ SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLToken_getAttrValue__SWIG_1(voi
     (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = ((XMLToken const *)arg1)->getAttrValue(arg2,arg3);
+  result = ((XMLToken const *)arg1)->getAttrValue((std::string const &)*arg2,arg3);
   {
     jresult = convertUTF8ToUnicode( (&result)->c_str() );
     wchar_t* unistr = convertUTF8ToUnicode( (&result)->c_str() );
@@ -31515,16 +31488,20 @@ SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLToken_getAttrValue__SWIG_1(voi
 SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLToken_getAttrValue__SWIG_2(void * jarg1, wchar_t* jarg2) {
   wchar_t* jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
+  std::string arg_str2 ;
   std::string result;
   
   arg1 = (XMLToken *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
-  result = ((XMLToken const *)arg1)->getAttrValue(arg2);
+  result = ((XMLToken const *)arg1)->getAttrValue((std::string const &)*arg2);
   {
     jresult = convertUTF8ToUnicode( (&result)->c_str() );
     wchar_t* unistr = convertUTF8ToUnicode( (&result)->c_str() );
@@ -31575,14 +31552,18 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLToken_hasAttr__SWIG_0(void
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLToken_hasAttr__SWIG_1(void * jarg1, wchar_t* jarg2, wchar_t* jarg3) {
   unsigned int jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
+  std::string arg_str2 ;
   bool result;
   
   arg1 = (XMLToken *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
   {
@@ -31590,7 +31571,7 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLToken_hasAttr__SWIG_1(void
     (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (bool)((XMLToken const *)arg1)->hasAttr(arg2,arg3);
+  result = (bool)((XMLToken const *)arg1)->hasAttr((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -31599,16 +31580,20 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLToken_hasAttr__SWIG_1(void
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLToken_hasAttr__SWIG_2(void * jarg1, wchar_t* jarg2) {
   unsigned int jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
+  std::string arg_str2 ;
   bool result;
   
   arg1 = (XMLToken *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
-  result = (bool)((XMLToken const *)arg1)->hasAttr(arg2);
+  result = (bool)((XMLToken const *)arg1)->hasAttr((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -31678,9 +31663,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLToken_addNamespace__SWIG_0(void * j
   int jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str2 ;
-  std::string arg_str3 ;
   int result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -31694,13 +31678,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_XMLToken_addNamespace__SWIG_0(void * j
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (int)(arg1)->addNamespace((std::string const &)*arg2,(std::string const &)*arg3);
+  result = (int)(arg1)->addNamespace((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -31900,20 +31881,16 @@ SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLToken_getNamespaceURI__SWIG_0(
 SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_XMLToken_getNamespaceURI__SWIG_1(void * jarg1, wchar_t* jarg2) {
   wchar_t* jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string *arg2 = 0 ;
-  std::string arg_str2 ;
+  std::string arg2 ;
   std::string result;
   
   arg1 = (XMLToken *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
-  result = ((XMLToken const *)arg1)->getNamespaceURI((std::string const &)*arg2);
+  result = ((XMLToken const *)arg1)->getNamespaceURI(arg2);
   {
     jresult = convertUTF8ToUnicode( (&result)->c_str() );
     wchar_t* unistr = convertUTF8ToUnicode( (&result)->c_str() );
@@ -33333,13 +33310,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_delete_XMLTriple(void * jarg1) {
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOutputStream__SWIG_0(void * jarg1, wchar_t* jarg2, unsigned int jarg3, wchar_t* jarg4, wchar_t* jarg5) {
   void * jresult ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
-  std::string arg_str2 ;
-  std::string arg_str4 ;
-  std::string arg_str5 ;
+  std::string arg4 ;
+  std::string arg5 ;
   XMLOutputStream *result = 0 ;
   
   arg1 = (std::ostream *)jarg1;
@@ -33349,32 +33323,23 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOutputStream__SWIG_0(void *
   } 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   arg3 = jarg3 ? true : false; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg5);
-    if (!mbstr) return 0;
-    
-    arg_str5.assign(mbstr);
-    arg5 = &arg_str5;
+    (&arg5)->assign(mbstr);
     delete[] mbstr;
   }
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2,arg3,arg4,arg5);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -33388,11 +33353,9 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOutputStream__SWIG_0(void *
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOutputStream__SWIG_1(void * jarg1, wchar_t* jarg2, unsigned int jarg3, wchar_t* jarg4) {
   void * jresult ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
-  std::string arg_str2 ;
-  std::string arg_str4 ;
+  std::string arg4 ;
   XMLOutputStream *result = 0 ;
   
   arg1 = (std::ostream *)jarg1;
@@ -33402,24 +33365,18 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOutputStream__SWIG_1(void *
   } 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   arg3 = jarg3 ? true : false; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2,arg3,arg4);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -33433,9 +33390,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOutputStream__SWIG_1(void *
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOutputStream__SWIG_2(void * jarg1, wchar_t* jarg2, unsigned int jarg3) {
   void * jresult ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string arg_str2 ;
   XMLOutputStream *result = 0 ;
   
   arg1 = (std::ostream *)jarg1;
@@ -33445,16 +33401,13 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOutputStream__SWIG_2(void *
   } 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   arg3 = jarg3 ? true : false; 
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2,arg3);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2,arg3);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -33468,8 +33421,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOutputStream__SWIG_2(void *
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOutputStream__SWIG_3(void * jarg1, wchar_t* jarg2) {
   void * jresult ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
-  std::string arg_str2 ;
+  std::string arg2 ;
   XMLOutputStream *result = 0 ;
   
   arg1 = (std::ostream *)jarg1;
@@ -33479,15 +33431,12 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOutputStream__SWIG_3(void *
   } 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -33532,9 +33481,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_delete_XMLOutputStream(void * jarg1)
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_XMLOutputStream_endElement__SWIG_0(void * jarg1, wchar_t* jarg2, wchar_t* jarg3) {
   XMLOutputStream *arg1 = (XMLOutputStream *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str2 ;
-  std::string arg_str3 ;
   
   arg1 = (XMLOutputStream *)jarg1; 
   {
@@ -33547,13 +33495,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_XMLOutputStream_endElement__SWIG_0(vo
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return ;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->endElement((std::string const &)*arg2,(std::string const &)*arg3);
+  (arg1)->endElement((std::string const &)*arg2,arg3);
 }
 
 
@@ -33618,9 +33563,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_XMLOutputStream_setAutoIndent(void *
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_XMLOutputStream_startElement__SWIG_0(void * jarg1, wchar_t* jarg2, wchar_t* jarg3) {
   XMLOutputStream *arg1 = (XMLOutputStream *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str2 ;
-  std::string arg_str3 ;
   
   arg1 = (XMLOutputStream *)jarg1; 
   {
@@ -33633,13 +33577,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_XMLOutputStream_startElement__SWIG_0(
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return ;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->startElement((std::string const &)*arg2,(std::string const &)*arg3);
+  (arg1)->startElement((std::string const &)*arg2,arg3);
 }
 
 
@@ -33678,9 +33619,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_XMLOutputStream_startElement__SWIG_2(
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_XMLOutputStream_startEndElement__SWIG_0(void * jarg1, wchar_t* jarg2, wchar_t* jarg3) {
   XMLOutputStream *arg1 = (XMLOutputStream *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   std::string arg_str2 ;
-  std::string arg_str3 ;
   
   arg1 = (XMLOutputStream *)jarg1; 
   {
@@ -33693,13 +33633,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_XMLOutputStream_startEndElement__SWIG
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return ;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->startEndElement((std::string const &)*arg2,(std::string const &)*arg3);
+  (arg1)->startEndElement((std::string const &)*arg2,arg3);
 }
 
 
@@ -34301,41 +34238,29 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_XMLOutputStream_setIndent(void * jarg
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputStringStream__SWIG_0(wchar_t* jarg1, unsigned int jarg2, wchar_t* jarg3, wchar_t* jarg4) {
   void * jresult ;
-  std::string *arg1 = 0 ;
+  std::string arg1 ;
   bool arg2 ;
-  std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
-  std::string arg_str1 ;
-  std::string arg_str3 ;
-  std::string arg_str4 ;
+  std::string arg3 ;
+  std::string arg4 ;
   XMLOwningOutputStringStream *result = 0 ;
   
   {
     char*  mbstr = convertUnicodeToUTF8(jarg1);
-    if (!mbstr) return 0;
-    
-    arg_str1.assign(mbstr);
-    arg1 = &arg_str1;
+    (&arg1)->assign(mbstr);
     delete[] mbstr;
   }
   arg2 = jarg2 ? true : false; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4);
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1,arg2,arg3,arg4);
   jresult = (void *)result; 
   return jresult;
 }
@@ -34343,31 +34268,23 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputStringStream__SW
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputStringStream__SWIG_1(wchar_t* jarg1, unsigned int jarg2, wchar_t* jarg3) {
   void * jresult ;
-  std::string *arg1 = 0 ;
+  std::string arg1 ;
   bool arg2 ;
-  std::string *arg3 = 0 ;
-  std::string arg_str1 ;
-  std::string arg_str3 ;
+  std::string arg3 ;
   XMLOwningOutputStringStream *result = 0 ;
   
   {
     char*  mbstr = convertUnicodeToUTF8(jarg1);
-    if (!mbstr) return 0;
-    
-    arg_str1.assign(mbstr);
-    arg1 = &arg_str1;
+    (&arg1)->assign(mbstr);
     delete[] mbstr;
   }
   arg2 = jarg2 ? true : false; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg3);
-    if (!mbstr) return 0;
-    
-    arg_str3.assign(mbstr);
-    arg3 = &arg_str3;
+    (&arg3)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -34375,21 +34292,17 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputStringStream__SW
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputStringStream__SWIG_2(wchar_t* jarg1, unsigned int jarg2) {
   void * jresult ;
-  std::string *arg1 = 0 ;
+  std::string arg1 ;
   bool arg2 ;
-  std::string arg_str1 ;
   XMLOwningOutputStringStream *result = 0 ;
   
   {
     char*  mbstr = convertUnicodeToUTF8(jarg1);
-    if (!mbstr) return 0;
-    
-    arg_str1.assign(mbstr);
-    arg1 = &arg_str1;
+    (&arg1)->assign(mbstr);
     delete[] mbstr;
   }
   arg2 = jarg2 ? true : false; 
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1,arg2);
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1,arg2);
   jresult = (void *)result; 
   return jresult;
 }
@@ -34397,19 +34310,15 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputStringStream__SW
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputStringStream__SWIG_3(wchar_t* jarg1) {
   void * jresult ;
-  std::string *arg1 = 0 ;
-  std::string arg_str1 ;
+  std::string arg1 ;
   XMLOwningOutputStringStream *result = 0 ;
   
   {
     char*  mbstr = convertUnicodeToUTF8(jarg1);
-    if (!mbstr) return 0;
-    
-    arg_str1.assign(mbstr);
-    arg1 = &arg_str1;
+    (&arg1)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1);
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1);
   jresult = (void *)result; 
   return jresult;
 }
@@ -34436,14 +34345,11 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_delete_XMLOwningOutputStringStream(vo
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputFileStream__SWIG_0(wchar_t* jarg1, wchar_t* jarg2, unsigned int jarg3, wchar_t* jarg4, wchar_t* jarg5) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
+  std::string arg4 ;
+  std::string arg5 ;
   std::string arg_str1 ;
-  std::string arg_str2 ;
-  std::string arg_str4 ;
-  std::string arg_str5 ;
   XMLOwningOutputFileStream *result = 0 ;
   
   {
@@ -34456,30 +34362,21 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputFileStream__SWIG
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   arg3 = jarg3 ? true : false; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg5);
-    if (!mbstr) return 0;
-    
-    arg_str5.assign(mbstr);
-    arg5 = &arg_str5;
+    (&arg5)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2,arg3,arg4,arg5);
   jresult = (void *)result; 
   return jresult;
 }
@@ -34488,12 +34385,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputFileStream__SWIG
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputFileStream__SWIG_1(wchar_t* jarg1, wchar_t* jarg2, unsigned int jarg3, wchar_t* jarg4) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   std::string arg_str1 ;
-  std::string arg_str2 ;
-  std::string arg_str4 ;
   XMLOwningOutputFileStream *result = 0 ;
   
   {
@@ -34506,22 +34401,16 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputFileStream__SWIG
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   arg3 = jarg3 ? true : false; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2,arg3,arg4);
   jresult = (void *)result; 
   return jresult;
 }
@@ -34530,10 +34419,9 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputFileStream__SWIG
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputFileStream__SWIG_2(wchar_t* jarg1, wchar_t* jarg2, unsigned int jarg3) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
   std::string arg_str1 ;
-  std::string arg_str2 ;
   XMLOwningOutputFileStream *result = 0 ;
   
   {
@@ -34546,14 +34434,11 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputFileStream__SWIG
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   arg3 = jarg3 ? true : false; 
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2,arg3);
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -34562,9 +34447,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputFileStream__SWIG
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputFileStream__SWIG_3(wchar_t* jarg1, wchar_t* jarg2) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   std::string arg_str1 ;
-  std::string arg_str2 ;
   XMLOwningOutputFileStream *result = 0 ;
   
   {
@@ -34577,13 +34461,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLOwningOutputFileStream__SWIG
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2);
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2);
   jresult = (void *)result; 
   return jresult;
 }
@@ -34913,20 +34794,16 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_XMLInputStream_setSBMLNamespaces(void
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLInputStream_determineNumberChildren__SWIG_0(void * jarg1, wchar_t* jarg2) {
   unsigned int jresult ;
   XMLInputStream *arg1 = (XMLInputStream *) 0 ;
-  std::string *arg2 = 0 ;
-  std::string arg_str2 ;
+  std::string arg2 ;
   unsigned int result;
   
   arg1 = (XMLInputStream *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (unsigned int)(arg1)->determineNumberChildren((std::string const &)*arg2);
+  result = (unsigned int)(arg1)->determineNumberChildren(arg2);
   jresult = result; 
   return jresult;
 }
@@ -35011,21 +34888,17 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_XMLInputStream_containsChild(
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_0(int jarg1, wchar_t* jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6) {
   void * jresult ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string arg_str2 ;
   XMLError *result = 0 ;
   
   arg1 = (int)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -35042,7 +34915,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_0(int jarg1, wch
   }
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3,arg4,arg5,arg6);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -35056,20 +34929,16 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_0(int jarg1, wch
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_1(int jarg1, wchar_t* jarg2, long long jarg3, long long jarg4, long long jarg5) {
   void * jresult ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
-  std::string arg_str2 ;
   XMLError *result = 0 ;
   
   arg1 = (int)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -35083,7 +34952,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_1(int jarg1, wch
   }
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3,arg4,arg5);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -35097,19 +34966,15 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_1(int jarg1, wch
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_2(int jarg1, wchar_t* jarg2, long long jarg3, long long jarg4) {
   void * jresult ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string arg_str2 ;
   XMLError *result = 0 ;
   
   arg1 = (int)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -35120,7 +34985,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_2(int jarg1, wch
   }
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3,arg4);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3,arg4);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -35134,18 +34999,14 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_2(int jarg1, wch
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_3(int jarg1, wchar_t* jarg2, long long jarg3) {
   void * jresult ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
-  std::string arg_str2 ;
   XMLError *result = 0 ;
   
   arg1 = (int)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -35153,7 +35014,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_3(int jarg1, wch
   }
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -35167,22 +35028,18 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_3(int jarg1, wch
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_XMLError__SWIG_4(int jarg1, wchar_t* jarg2) {
   void * jresult ;
   int arg1 ;
-  std::string *arg2 = 0 ;
-  std::string arg_str2 ;
+  std::string arg2 ;
   XMLError *result = 0 ;
   
   arg1 = (int)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return 0;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2);
+    result = (XMLError *)new XMLError(arg1,arg2);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -35896,12 +35753,11 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_0(void *
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
   unsigned int arg9 ;
-  std::string arg_str5 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
@@ -35915,10 +35771,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_0(void *
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg5);
-    if (!mbstr) return ;
-    
-    arg_str5.assign(mbstr);
-    arg5 = &arg_str5;
+    (&arg5)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -35933,7 +35786,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_0(void *
   {
     arg9 = (unsigned int)jarg9;  
   }
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6,arg7,arg8,arg9);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
 }
 
 
@@ -35942,11 +35795,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_1(void *
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
-  std::string arg_str5 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
@@ -35960,10 +35812,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_1(void *
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg5);
-    if (!mbstr) return ;
-    
-    arg_str5.assign(mbstr);
-    arg5 = &arg_str5;
+    (&arg5)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -35975,7 +35824,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_1(void *
   {
     arg8 = (unsigned int)jarg8;  
   }
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6,arg7,arg8);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
 }
 
 
@@ -35984,10 +35833,9 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_2(void *
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
-  std::string arg_str5 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
@@ -36001,10 +35849,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_2(void *
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg5);
-    if (!mbstr) return ;
-    
-    arg_str5.assign(mbstr);
-    arg5 = &arg_str5;
+    (&arg5)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36013,7 +35858,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_2(void *
   {
     arg7 = (unsigned int)jarg7;  
   }
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6,arg7);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6,arg7);
 }
 
 
@@ -36022,9 +35867,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_3(void *
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
-  std::string arg_str5 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
@@ -36038,16 +35882,13 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_3(void *
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg5);
-    if (!mbstr) return ;
-    
-    arg_str5.assign(mbstr);
-    arg5 = &arg_str5;
+    (&arg5)->assign(mbstr);
     delete[] mbstr;
   }
   {
     arg6 = (unsigned int)jarg6;  
   }
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6);
 }
 
 
@@ -36056,8 +35897,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_4(void *
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
-  std::string arg_str5 ;
+  std::string arg5 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
@@ -36071,13 +35911,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_4(void *
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg5);
-    if (!mbstr) return ;
-    
-    arg_str5.assign(mbstr);
-    arg5 = &arg_str5;
+    (&arg5)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5);
+  (arg1)->logError(arg2,arg3,arg4,arg5);
 }
 
 
@@ -36139,26 +35976,21 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logError__SWIG_8(void *
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_0(void * jarg1, wchar_t* jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6, wchar_t* jarg7, long long jarg8, long long jarg9, long long jarg10, long long jarg11) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
   unsigned int arg9 ;
   unsigned int arg10 ;
   unsigned int arg11 ;
-  std::string arg_str2 ;
-  std::string arg_str7 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return ;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36175,10 +36007,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_0(
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg7);
-    if (!mbstr) return ;
-    
-    arg_str7.assign(mbstr);
-    arg7 = &arg_str7;
+    (&arg7)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36193,31 +36022,26 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_0(
   {
     arg11 = (unsigned int)jarg11;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8,arg9,arg10,arg11);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_1(void * jarg1, wchar_t* jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6, wchar_t* jarg7, long long jarg8, long long jarg9, long long jarg10) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
   unsigned int arg9 ;
   unsigned int arg10 ;
-  std::string arg_str2 ;
-  std::string arg_str7 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return ;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36234,10 +36058,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_1(
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg7);
-    if (!mbstr) return ;
-    
-    arg_str7.assign(mbstr);
-    arg7 = &arg_str7;
+    (&arg7)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36249,30 +36070,25 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_1(
   {
     arg10 = (unsigned int)jarg10;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8,arg9,arg10);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_2(void * jarg1, wchar_t* jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6, wchar_t* jarg7, long long jarg8, long long jarg9) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
   unsigned int arg9 ;
-  std::string arg_str2 ;
-  std::string arg_str7 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return ;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36289,10 +36105,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_2(
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg7);
-    if (!mbstr) return ;
-    
-    arg_str7.assign(mbstr);
-    arg7 = &arg_str7;
+    (&arg7)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36301,29 +36114,24 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_2(
   {
     arg9 = (unsigned int)jarg9;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8,arg9);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_3(void * jarg1, wchar_t* jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6, wchar_t* jarg7, long long jarg8) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
-  std::string arg_str2 ;
-  std::string arg_str7 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return ;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36340,37 +36148,29 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_3(
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg7);
-    if (!mbstr) return ;
-    
-    arg_str7.assign(mbstr);
-    arg7 = &arg_str7;
+    (&arg7)->assign(mbstr);
     delete[] mbstr;
   }
   {
     arg8 = (unsigned int)jarg8;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_4(void * jarg1, wchar_t* jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6, wchar_t* jarg7) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
-  std::string arg_str2 ;
-  std::string arg_str7 ;
+  std::string arg7 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return ;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36387,32 +36187,25 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_4(
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg7);
-    if (!mbstr) return ;
-    
-    arg_str7.assign(mbstr);
-    arg7 = &arg_str7;
+    (&arg7)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_5(void * jarg1, wchar_t* jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string arg_str2 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return ;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36427,25 +36220,21 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_5(
   {
     arg6 = (unsigned int)jarg6;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_6(void * jarg1, wchar_t* jarg2, long long jarg3, long long jarg4, long long jarg5) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
-  std::string arg_str2 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return ;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36457,24 +36246,20 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_6(
   {
     arg5 = (unsigned int)jarg5;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_7(void * jarg1, wchar_t* jarg2, long long jarg3, long long jarg4) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string arg_str2 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return ;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36483,47 +36268,39 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_7(
   {
     arg4 = (unsigned int)jarg4;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4);
+  (arg1)->logPackageError(arg2,arg3,arg4);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_8(void * jarg1, wchar_t* jarg2, long long jarg3) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
-  std::string arg_str2 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return ;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
   {
     arg3 = (unsigned int)jarg3;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3);
+  (arg1)->logPackageError(arg2,arg3);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_SBMLErrorLog_logPackageError__SWIG_9(void * jarg1, wchar_t* jarg2) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
-  std::string arg_str2 ;
+  std::string arg2 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    if (!mbstr) return ;
-    
-    arg_str2.assign(mbstr);
-    arg2 = &arg_str2;
+    (&arg2)->assign(mbstr);
     delete[] mbstr;
   }
-  (arg1)->logPackageError((std::string const &)*arg2);
+  (arg1)->logPackageError(arg2);
 }
 
 
@@ -36594,15 +36371,13 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_0(long long jar
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
-  std::string *arg9 = 0 ;
+  std::string arg9 ;
   unsigned int arg10 ;
-  std::string arg_str4 ;
-  std::string arg_str9 ;
   SBMLError *result = 0 ;
   
   {
@@ -36616,10 +36391,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_0(long long jar
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36636,16 +36408,13 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_0(long long jar
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg9);
-    if (!mbstr) return 0;
-    
-    arg_str9.assign(mbstr);
-    arg9 = &arg_str9;
+    (&arg9)->assign(mbstr);
     delete[] mbstr;
   }
   {
     arg10 = (unsigned int)jarg10;  
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7,arg8,(std::string const &)*arg9,arg10);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
   jresult = (void *)result; 
   return jresult;
 }
@@ -36656,14 +36425,12 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_1(long long jar
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
-  std::string *arg9 = 0 ;
-  std::string arg_str4 ;
-  std::string arg_str9 ;
+  std::string arg9 ;
   SBMLError *result = 0 ;
   
   {
@@ -36677,10 +36444,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_1(long long jar
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36697,13 +36461,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_1(long long jar
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg9);
-    if (!mbstr) return 0;
-    
-    arg_str9.assign(mbstr);
-    arg9 = &arg_str9;
+    (&arg9)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7,arg8,(std::string const &)*arg9);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   jresult = (void *)result; 
   return jresult;
 }
@@ -36714,12 +36475,11 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_2(long long jar
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
-  std::string arg_str4 ;
   SBMLError *result = 0 ;
   
   {
@@ -36733,10 +36493,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_2(long long jar
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36751,7 +36508,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_2(long long jar
   {
     arg8 = (unsigned int)jarg8;  
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7,arg8);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   jresult = (void *)result; 
   return jresult;
 }
@@ -36762,11 +36519,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_3(long long jar
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
-  std::string arg_str4 ;
   SBMLError *result = 0 ;
   
   {
@@ -36780,10 +36536,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_3(long long jar
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36795,7 +36548,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_3(long long jar
   {
     arg7 = (unsigned int)jarg7;  
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   jresult = (void *)result; 
   return jresult;
 }
@@ -36806,10 +36559,9 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_4(long long jar
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string arg_str4 ;
   SBMLError *result = 0 ;
   
   {
@@ -36823,10 +36575,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_4(long long jar
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   {
@@ -36835,7 +36584,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_4(long long jar
   {
     arg6 = (unsigned int)jarg6;  
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6);
   jresult = (void *)result; 
   return jresult;
 }
@@ -36846,9 +36595,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_5(long long jar
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
-  std::string arg_str4 ;
   SBMLError *result = 0 ;
   
   {
@@ -36862,16 +36610,13 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_5(long long jar
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
   {
     arg5 = (unsigned int)jarg5;  
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5);
   jresult = (void *)result; 
   return jresult;
 }
@@ -36882,8 +36627,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_6(long long jar
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
-  std::string arg_str4 ;
+  std::string arg4 ;
   SBMLError *result = 0 ;
   
   {
@@ -36897,13 +36641,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_SBMLError__SWIG_6(long long jar
   }
   {
     char*  mbstr = convertUnicodeToUTF8(jarg4);
-    if (!mbstr) return 0;
-    
-    arg_str4.assign(mbstr);
-    arg4 = &arg_str4;
+    (&arg4)->assign(mbstr);
     delete[] mbstr;
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4);
   jresult = (void *)result; 
   return jresult;
 }
@@ -40948,6 +40689,120 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_SBMLExtensionRegistry_getASTPlugin(
 }
 
 
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_delete_Callback(void * jarg1) {
+  Callback *arg1 = (Callback *) 0 ;
+  
+  arg1 = (Callback *)jarg1; 
+  delete arg1;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_Callback_process(void * jarg1, void * jarg2) {
+  int jresult ;
+  Callback *arg1 = (Callback *) 0 ;
+  SBMLDocument *arg2 = (SBMLDocument *) 0 ;
+  int result;
+  
+  arg1 = (Callback *)jarg1; 
+  arg2 = (SBMLDocument *)jarg2; 
+  result = (int)(arg1)->process(arg2);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_Callback_processSwigExplicitCallback(void * jarg1, void * jarg2) {
+  int jresult ;
+  Callback *arg1 = (Callback *) 0 ;
+  SBMLDocument *arg2 = (SBMLDocument *) 0 ;
+  int result;
+  
+  arg1 = (Callback *)jarg1; 
+  arg2 = (SBMLDocument *)jarg2; 
+  result = (int)(arg1)->Callback::process(arg2);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_Callback() {
+  void * jresult ;
+  Callback *result = 0 ;
+  
+  result = (Callback *)new SwigDirector_Callback();
+  jresult = (void *)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_Callback_director_connect(void *objarg, SwigDirector_Callback::SWIG_Callback0_t callback0) {
+  Callback *obj = (Callback *)objarg;
+  SwigDirector_Callback *director = dynamic_cast<SwigDirector_Callback *>(obj);
+  if (director) {
+    director->swig_connect_director(callback0);
+  }
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_CallbackRegistry_invokeCallbacks(void * jarg1) {
+  int jresult ;
+  SBMLDocument *arg1 = (SBMLDocument *) 0 ;
+  int result;
+  
+  arg1 = (SBMLDocument *)jarg1; 
+  result = (int)CallbackRegistry::invokeCallbacks(arg1);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_CallbackRegistry_clearCallbacks() {
+  CallbackRegistry::clearCallbacks();
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_CallbackRegistry_addCallback(void * jarg1) {
+  Callback *arg1 = (Callback *) 0 ;
+  
+  arg1 = (Callback *)jarg1; 
+  CallbackRegistry::addCallback(arg1);
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_CallbackRegistry_getNumCallbacks() {
+  int jresult ;
+  int result;
+  
+  result = (int)CallbackRegistry::getNumCallbacks();
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_CallbackRegistry_removeCallback__SWIG_0(int jarg1) {
+  int arg1 ;
+  
+  arg1 = (int)jarg1; 
+  CallbackRegistry::removeCallback(arg1);
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_CallbackRegistry_removeCallback__SWIG_1(void * jarg1) {
+  Callback *arg1 = (Callback *) 0 ;
+  
+  arg1 = (Callback *)jarg1; 
+  CallbackRegistry::removeCallback(arg1);
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_delete_CallbackRegistry(void * jarg1) {
+  CallbackRegistry *arg1 = (CallbackRegistry *) 0 ;
+  
+  arg1 = (CallbackRegistry *)jarg1; 
+  delete arg1;
+}
+
+
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_ASTNode__SWIG_0(int jarg1) {
   void * jresult ;
   ASTNodeType_t arg1 ;
@@ -42281,17 +42136,21 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_ASTNode_getDefinitionURL(void * jar
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ASTNode_replaceArgument(void * jarg1, wchar_t* jarg2, void * jarg3) {
   ASTNode *arg1 = (ASTNode *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   ASTNode *arg3 = (ASTNode *) 0 ;
+  std::string arg_str2 ;
   
   arg1 = (ASTNode *)jarg1; 
   {
     char*  mbstr = convertUnicodeToUTF8(jarg2);
-    (&arg2)->assign(mbstr);
+    if (!mbstr) return ;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
     delete[] mbstr;
   }
   arg3 = (ASTNode *)jarg3; 
-  (arg1)->replaceArgument(arg2,arg3);
+  (arg1)->replaceArgument((std::string const &)*arg2,arg3);
 }
 
 
@@ -42562,7 +42421,33 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_ASTNode_getASTPlugin__SWIG_1(void *
 }
 
 
-SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_ASTNode_getASTPlugin__SWIG_2(void * jarg1, wchar_t* jarg2, unsigned int jarg3) {
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_ASTNode_getASTPlugin__SWIG_2(void * jarg1, wchar_t* jarg2, unsigned int jarg3, unsigned int jarg4) {
+  void * jresult ;
+  ASTNode *arg1 = (ASTNode *) 0 ;
+  std::string *arg2 = 0 ;
+  bool arg3 ;
+  bool arg4 ;
+  std::string arg_str2 ;
+  ASTBasePlugin *result = 0 ;
+  
+  arg1 = (ASTNode *)jarg1; 
+  {
+    char*  mbstr = convertUnicodeToUTF8(jarg2);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
+    delete[] mbstr;
+  }
+  arg3 = jarg3 ? true : false; 
+  arg4 = jarg4 ? true : false; 
+  result = (ASTBasePlugin *)(arg1)->getASTPlugin((std::string const &)*arg2,arg3,arg4);
+  jresult = (void *)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_ASTNode_getASTPlugin__SWIG_3(void * jarg1, wchar_t* jarg2, unsigned int jarg3) {
   void * jresult ;
   ASTNode *arg1 = (ASTNode *) 0 ;
   std::string *arg2 = 0 ;
@@ -42586,7 +42471,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_ASTNode_getASTPlugin__SWIG_2(void *
 }
 
 
-SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_ASTNode_getASTPlugin__SWIG_3(void * jarg1, wchar_t* jarg2) {
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_ASTNode_getASTPlugin__SWIG_4(void * jarg1, wchar_t* jarg2) {
   void * jresult ;
   ASTNode *arg1 = (ASTNode *) 0 ;
   std::string *arg2 = 0 ;
@@ -43304,6 +43189,168 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_L3ParserSettings_visitPackageInfixSyn
 }
 
 
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_DefinitionURLRegistry_getInstance() {
+  void * jresult ;
+  DefinitionURLRegistry *result = 0 ;
+  
+  result = (DefinitionURLRegistry *) &DefinitionURLRegistry::getInstance();
+  jresult = (void *)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_DefinitionURLRegistry_addDefinitionURL(wchar_t* jarg1, int jarg2) {
+  int jresult ;
+  std::string *arg1 = 0 ;
+  int arg2 ;
+  std::string arg_str1 ;
+  int result;
+  
+  {
+    char*  mbstr = convertUnicodeToUTF8(jarg1);
+    if (!mbstr) return 0;
+    
+    arg_str1.assign(mbstr);
+    arg1 = &arg_str1;
+    delete[] mbstr;
+  }
+  arg2 = (int)jarg2; 
+  result = (int)DefinitionURLRegistry::addDefinitionURL((std::string const &)*arg1,arg2);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_DefinitionURLRegistry_getNumDefinitionURLs() {
+  int jresult ;
+  int result;
+  
+  result = (int)DefinitionURLRegistry::getNumDefinitionURLs();
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_DefinitionURLRegistry_addSBMLDefinitions() {
+  DefinitionURLRegistry::addSBMLDefinitions();
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_delete_DefinitionURLRegistry(void * jarg1) {
+  DefinitionURLRegistry *arg1 = (DefinitionURLRegistry *) 0 ;
+  
+  arg1 = (DefinitionURLRegistry *)jarg1; 
+  delete arg1;
+}
+
+
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_DefinitionURLRegistry_getCoreDefinitionsAdded() {
+  unsigned int jresult ;
+  bool result;
+  
+  result = (bool)DefinitionURLRegistry::getCoreDefinitionsAdded();
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_DefinitionURLRegistry_getType(wchar_t* jarg1) {
+  int jresult ;
+  std::string *arg1 = 0 ;
+  std::string arg_str1 ;
+  int result;
+  
+  {
+    char*  mbstr = convertUnicodeToUTF8(jarg1);
+    if (!mbstr) return 0;
+    
+    arg_str1.assign(mbstr);
+    arg1 = &arg_str1;
+    delete[] mbstr;
+  }
+  result = (int)DefinitionURLRegistry::getType((std::string const &)*arg1);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT wchar_t* SWIGSTDCALL CSharp_libsbml_DefinitionURLRegistry_getDefinitionUrlByIndex(int jarg1) {
+  wchar_t* jresult ;
+  int arg1 ;
+  std::string result;
+  
+  arg1 = (int)jarg1; 
+  result = DefinitionURLRegistry::getDefinitionUrlByIndex(arg1);
+  {
+    jresult = convertUTF8ToUnicode( (&result)->c_str() );
+    wchar_t* unistr = convertUTF8ToUnicode( (&result)->c_str() );
+    jresult = (wchar_t*) SWIG_csharp_wstring_callback((const wchar_t*)unistr);
+    delete[] unistr;
+  }
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_DefinitionURLRegistry_clearDefinitions() {
+  DefinitionURLRegistry::clearDefinitions();
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_new_MathFilter() {
+  void * jresult ;
+  MathFilter *result = 0 ;
+  
+  result = (MathFilter *)new SwigDirector_MathFilter();
+  jresult = (void *)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_delete_MathFilter(void * jarg1) {
+  MathFilter *arg1 = (MathFilter *) 0 ;
+  
+  arg1 = (MathFilter *)jarg1; 
+  delete arg1;
+}
+
+
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_MathFilter_filter(void * jarg1, void * jarg2) {
+  unsigned int jresult ;
+  MathFilter *arg1 = (MathFilter *) 0 ;
+  SBase *arg2 = (SBase *) 0 ;
+  bool result;
+  
+  arg1 = (MathFilter *)jarg1; 
+  arg2 = (SBase *)jarg2; 
+  result = (bool)(arg1)->filter((SBase const *)arg2);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_MathFilter_filterSwigExplicitMathFilter(void * jarg1, void * jarg2) {
+  unsigned int jresult ;
+  MathFilter *arg1 = (MathFilter *) 0 ;
+  SBase *arg2 = (SBase *) 0 ;
+  bool result;
+  
+  arg1 = (MathFilter *)jarg1; 
+  arg2 = (SBase *)jarg2; 
+  result = (bool)(arg1)->MathFilter::filter((SBase const *)arg2);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_MathFilter_director_connect(void *objarg, SwigDirector_MathFilter::SWIG_Callback0_t callback0) {
+  MathFilter *obj = (MathFilter *)objarg;
+  SwigDirector_MathFilter *director = dynamic_cast<SwigDirector_MathFilter *>(obj);
+  if (director) {
+    director->swig_connect_director(callback0);
+  }
+}
+
+
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbml_ASTNodeValues_t_name_set(void * jarg1, wchar_t* jarg2) {
   ASTNodeValues_t *arg1 = (ASTNodeValues_t *) 0 ;
   std::string *arg2 = 0 ;
@@ -43615,7 +43662,31 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_ASTBasePlugin_defines__SWIG_0
 }
 
 
-SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_ASTBasePlugin_defines__SWIG_1(void * jarg1, wchar_t* jarg2) {
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_ASTBasePlugin_defines__SWIG_1(void * jarg1, wchar_t* jarg2, unsigned int jarg3) {
+  unsigned int jresult ;
+  ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
+  std::string *arg2 = 0 ;
+  bool arg3 ;
+  std::string arg_str2 ;
+  bool result;
+  
+  arg1 = (ASTBasePlugin *)jarg1; 
+  {
+    char*  mbstr = convertUnicodeToUTF8(jarg2);
+    if (!mbstr) return 0;
+    
+    arg_str2.assign(mbstr);
+    arg2 = &arg_str2;
+    delete[] mbstr;
+  }
+  arg3 = jarg3 ? true : false; 
+  result = (bool)((ASTBasePlugin const *)arg1)->defines((std::string const &)*arg2,arg3);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbml_ASTBasePlugin_defines__SWIG_2(void * jarg1, wchar_t* jarg2) {
   unsigned int jresult ;
   ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
   std::string *arg2 = 0 ;
@@ -43763,6 +43834,22 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_ASTBasePlugin_getUnitDefinitionFrom
 }
 
 
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbml_ASTBasePlugin_getASTNodeValue(void * jarg1, long long jarg2) {
+  void * jresult ;
+  ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
+  unsigned int arg2 ;
+  ASTNodeValues_t *result = 0 ;
+  
+  arg1 = (ASTBasePlugin *)jarg1; 
+  {
+    arg2 = (unsigned int)jarg2;  
+  }
+  result = (ASTNodeValues_t *)((ASTBasePlugin const *)arg1)->getASTNodeValue(arg2);
+  jresult = (void *)result; 
+  return jresult;
+}
+
+
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbml_ASTBasePlugin_allowedInFunctionDefinition(void * jarg1, int jarg2) {
   int jresult ;
   ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
@@ -45334,6 +45421,10 @@ SWIGEXPORT SBasePlugin * SWIGSTDCALL CSharp_libsbml_SBMLDocumentPlugin_SWIGUpcas
     return (SBasePlugin *)jarg1;
 }
 
+SWIGEXPORT ElementFilter * SWIGSTDCALL CSharp_libsbml_MathFilter_SWIGUpcast(MathFilter *jarg1) {
+    return (ElementFilter *)jarg1;
+}
+
 SWIGEXPORT SBMLNamespaces * SWIGSTDCALL CSharp_libsbml_L3v2extendedmathPkgNamespaces_SWIGUpcast(SBMLExtensionNamespaces< L3v2extendedmathExtension > *jarg1) {
     return (SBMLNamespaces *)jarg1;
 }
diff --git a/src/bindings/csharp/libsbml_wrap.cpp b/src/bindings/csharp/libsbml_wrap.cpp
index 743873c0..daff966c 100644
--- a/src/bindings/csharp/libsbml_wrap.cpp
+++ b/src/bindings/csharp/libsbml_wrap.cpp
@@ -509,7 +509,8 @@ SWIGINTERN ListWrapper< SBase > *SBasePlugin_getListOfAllElements__SWIG_0(SBaseP
 #include <sbml/math/FormulaParser.h>
 #include <sbml/math/L3Parser.h>
 #include <sbml/math/L3ParserSettings.h>
-
+#include <sbml/math/DefinitionURLRegistry.h>
+#include <sbml/util/MathFilter.h>
 
 
 
@@ -883,6 +884,70 @@ void SwigDirector_SBMLValidator::swig_init_callbacks() {
   swig_callbackclearFailures = 0;
 }
 
+SwigDirector_Callback::SwigDirector_Callback() : Callback(), Swig::Director() {
+  swig_init_callbacks();
+}
+
+SwigDirector_Callback::~SwigDirector_Callback() {
+  
+}
+
+
+int SwigDirector_Callback::process(SBMLDocument *doc) {
+  int c_result = SwigValueInit< int >() ;
+  int jresult = 0 ;
+  void * jdoc = 0 ;
+  
+  if (!swig_callbackprocess) {
+    return Callback::process(doc);
+  } else {
+    jdoc = (void *) doc; 
+    jresult = (int) swig_callbackprocess(jdoc);
+    c_result = (int)jresult; 
+  }
+  return c_result;
+}
+
+void SwigDirector_Callback::swig_connect_director(SWIG_Callback0_t callbackprocess) {
+  swig_callbackprocess = callbackprocess;
+}
+
+void SwigDirector_Callback::swig_init_callbacks() {
+  swig_callbackprocess = 0;
+}
+
+SwigDirector_MathFilter::SwigDirector_MathFilter() : MathFilter(), Swig::Director() {
+  swig_init_callbacks();
+}
+
+SwigDirector_MathFilter::~SwigDirector_MathFilter() {
+  
+}
+
+
+bool SwigDirector_MathFilter::filter(SBase const *element) {
+  bool c_result = SwigValueInit< bool >() ;
+  unsigned int jresult = 0 ;
+  void * jelement = 0 ;
+  
+  if (!swig_callbackfilter) {
+    return MathFilter::filter(element);
+  } else {
+    jelement = (void *) element; 
+    jresult = (unsigned int) swig_callbackfilter(jelement);
+    c_result = jresult ? true : false; 
+  }
+  return c_result;
+}
+
+void SwigDirector_MathFilter::swig_connect_director(SWIG_Callback0_t callbackfilter) {
+  swig_callbackfilter = callbackfilter;
+}
+
+void SwigDirector_MathFilter::swig_init_callbacks() {
+  swig_callbackfilter = 0;
+}
+
 
 #ifdef __cplusplus
 extern "C" {
@@ -2606,7 +2671,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_SBase_getAncestorOfType__SWIG_0(v
   void * jresult ;
   SBase *arg1 = (SBase *) 0 ;
   int arg2 ;
-  std::string arg3 ;
+  std::string *arg3 = 0 ;
   SBase *result = 0 ;
   
   arg1 = (SBase *)jarg1; 
@@ -2615,8 +2680,9 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_SBase_getAncestorOfType__SWIG_0(v
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg3)->assign(jarg3); 
-  result = (SBase *)(arg1)->getAncestorOfType(arg2,arg3);
+  std::string arg3_str(jarg3);
+  arg3 = &arg3_str; 
+  result = (SBase *)(arg1)->getAncestorOfType(arg2,(std::string const &)*arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -2949,7 +3015,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_SBase_appendAnnotation__SWIG_1(void
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_SBase_removeTopLevelAnnotationElement__SWIG_0(void * jarg1, char * jarg2, char * jarg3, unsigned int jarg4) {
   int jresult ;
   SBase *arg1 = (SBase *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
   bool arg4 ;
   int result;
@@ -2959,14 +3025,15 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_SBase_removeTopLevelAnnotationElemen
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
   if (!jarg3) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
   (&arg3)->assign(jarg3); 
   arg4 = jarg4 ? true : false; 
-  result = (int)(arg1)->removeTopLevelAnnotationElement(arg2,arg3,arg4);
+  result = (int)(arg1)->removeTopLevelAnnotationElement((std::string const &)*arg2,arg3,arg4);
   jresult = result; 
   return jresult;
 }
@@ -2975,7 +3042,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_SBase_removeTopLevelAnnotationElemen
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_SBase_removeTopLevelAnnotationElement__SWIG_1(void * jarg1, char * jarg2, char * jarg3) {
   int jresult ;
   SBase *arg1 = (SBase *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
   int result;
   
@@ -2984,13 +3051,14 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_SBase_removeTopLevelAnnotationElemen
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
   if (!jarg3) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
   (&arg3)->assign(jarg3); 
-  result = (int)(arg1)->removeTopLevelAnnotationElement(arg2,arg3);
+  result = (int)(arg1)->removeTopLevelAnnotationElement((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -2999,7 +3067,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_SBase_removeTopLevelAnnotationElemen
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_SBase_removeTopLevelAnnotationElement__SWIG_2(void * jarg1, char * jarg2) {
   int jresult ;
   SBase *arg1 = (SBase *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   int result;
   
   arg1 = (SBase *)jarg1; 
@@ -3007,8 +3075,9 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_SBase_removeTopLevelAnnotationElemen
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
-  result = (int)(arg1)->removeTopLevelAnnotationElement(arg2);
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
+  result = (int)(arg1)->removeTopLevelAnnotationElement((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -7991,7 +8060,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_SBMLDocument_setModel(void * jarg1,
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_SBMLDocument_createModel__SWIG_0(void * jarg1, char * jarg2) {
   void * jresult ;
   SBMLDocument *arg1 = (SBMLDocument *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   Model *result = 0 ;
   
   arg1 = (SBMLDocument *)jarg1; 
@@ -7999,9 +8068,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_SBMLDocument_createModel__SWIG_0(
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
-  result = (Model *)(arg1)->createModel((std::string const &)*arg2);
+  (&arg2)->assign(jarg2); 
+  result = (Model *)(arg1)->createModel(arg2);
   jresult = (void *)result; 
   return jresult;
 }
@@ -17705,7 +17773,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Reaction_addReactant__SWIG_1(void *
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   bool arg5 ;
   int result;
   
@@ -17716,10 +17784,9 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Reaction_addReactant__SWIG_1(void *
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   arg5 = jarg5 ? true : false; 
-  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,(std::string const &)*arg4,arg5);
+  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,arg4,arg5);
   jresult = result; 
   return jresult;
 }
@@ -17730,7 +17797,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Reaction_addReactant__SWIG_2(void *
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   int result;
   
   arg1 = (Reaction *)jarg1; 
@@ -17740,9 +17807,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Reaction_addReactant__SWIG_2(void *
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,arg4);
   jresult = result; 
   return jresult;
 }
@@ -17797,7 +17863,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Reaction_addProduct__SWIG_1(void * j
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   bool arg5 ;
   int result;
   
@@ -17808,10 +17874,9 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Reaction_addProduct__SWIG_1(void * j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   arg5 = jarg5 ? true : false; 
-  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,(std::string const &)*arg4,arg5);
+  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,arg4,arg5);
   jresult = result; 
   return jresult;
 }
@@ -17822,7 +17887,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Reaction_addProduct__SWIG_2(void * j
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   int result;
   
   arg1 = (Reaction *)jarg1; 
@@ -17832,9 +17897,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Reaction_addProduct__SWIG_2(void * j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,arg4);
   jresult = result; 
   return jresult;
 }
@@ -17888,7 +17952,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Reaction_addModifier__SWIG_1(void *
   int jresult ;
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   arg1 = (Reaction *)jarg1; 
@@ -17897,9 +17961,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Reaction_addModifier__SWIG_1(void *
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (int)(arg1)->addModifier((Species const *)arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (int)(arg1)->addModifier((Species const *)arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -23499,7 +23562,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLNamespaces__SWIG_3(long l
   unsigned int arg2 ;
   std::string *arg3 = 0 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   SBMLNamespaces *result = 0 ;
   
   {
@@ -23521,11 +23584,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLNamespaces__SWIG_3(long l
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg5_str(jarg5);
-  arg5 = &arg5_str; 
+  (&arg5)->assign(jarg5); 
   
   try {
-    result = (SBMLNamespaces *)new SBMLNamespaces(arg1,arg2,(std::string const &)*arg3,arg4,(std::string const &)*arg5);
+    result = (SBMLNamespaces *)new SBMLNamespaces(arg1,arg2,(std::string const &)*arg3,arg4,arg5);
   }
   catch (const SBMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),0);
@@ -24227,9 +24289,9 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_SBMLConstructorException_getSBMLE
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_0(char * jarg1, char * jarg2, int jarg3, char * jarg4) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   ConversionOptionType_t arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   ConversionOption *result = 0 ;
   
   if (!jarg1) {
@@ -24242,16 +24304,14 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_0(char
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   arg3 = (ConversionOptionType_t)jarg3; 
   if (!jarg4) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3,arg4);
   jresult = (void *)result; 
   return jresult;
 }
@@ -24260,7 +24320,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_0(char
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_1(char * jarg1, char * jarg2, int jarg3) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   ConversionOptionType_t arg3 ;
   ConversionOption *result = 0 ;
   
@@ -24274,10 +24334,9 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_1(char
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   arg3 = (ConversionOptionType_t)jarg3; 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(std::string const &)*arg2,arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -24286,7 +24345,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_1(char
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_2(char * jarg1, char * jarg2) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   ConversionOption *result = 0 ;
   
   if (!jarg1) {
@@ -24299,9 +24358,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_2(char
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(std::string const &)*arg2);
+  (&arg2)->assign(jarg2); 
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2);
   jresult = (void *)result; 
   return jresult;
 }
@@ -24328,7 +24386,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_4(char
   void * jresult ;
   std::string *arg1 = 0 ;
   char *arg2 = (char *) 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOption *result = 0 ;
   
   if (!jarg1) {
@@ -24342,9 +24400,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_4(char
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(char const *)arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(char const *)arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -24354,7 +24411,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_6(char
   void * jresult ;
   std::string *arg1 = 0 ;
   bool arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOption *result = 0 ;
   
   if (!jarg1) {
@@ -24368,9 +24425,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_6(char
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -24399,7 +24455,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_8(char
   void * jresult ;
   std::string *arg1 = 0 ;
   double arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOption *result = 0 ;
   
   if (!jarg1) {
@@ -24413,9 +24469,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_8(char
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -24444,7 +24499,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_10(cha
   void * jresult ;
   std::string *arg1 = 0 ;
   float arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOption *result = 0 ;
   
   if (!jarg1) {
@@ -24458,9 +24513,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_10(cha
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -24489,7 +24543,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_12(cha
   void * jresult ;
   std::string *arg1 = 0 ;
   int arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOption *result = 0 ;
   
   if (!jarg1) {
@@ -24503,9 +24557,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ConversionOption__SWIG_12(cha
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -24937,9 +24990,9 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWIG_1(void * jarg1, char * jarg2, char * jarg3, int jarg4, char * jarg5) {
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOptionType_t arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   if (!jarg2) {
@@ -24952,23 +25005,21 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
+  (&arg3)->assign(jarg3); 
   arg4 = (ConversionOptionType_t)jarg4; 
   if (!jarg5) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg5_str(jarg5);
-  arg5 = &arg5_str; 
-  (arg1)->addOption((std::string const &)*arg2,(std::string const &)*arg3,arg4,(std::string const &)*arg5);
+  (&arg5)->assign(jarg5); 
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4,arg5);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWIG_2(void * jarg1, char * jarg2, char * jarg3, int jarg4) {
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOptionType_t arg4 ;
   
   arg1 = (ConversionProperties *)jarg1; 
@@ -24982,17 +25033,16 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
+  (&arg3)->assign(jarg3); 
   arg4 = (ConversionOptionType_t)jarg4; 
-  (arg1)->addOption((std::string const &)*arg2,(std::string const &)*arg3,arg4);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWIG_3(void * jarg1, char * jarg2, char * jarg3) {
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   if (!jarg2) {
@@ -25005,9 +25055,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  (arg1)->addOption((std::string const &)*arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  (arg1)->addOption((std::string const &)*arg2,arg3);
 }
 
 
@@ -25030,7 +25079,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   char *arg3 = (char *) 0 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   if (!jarg2) {
@@ -25044,9 +25093,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  (arg1)->addOption((std::string const &)*arg2,(char const *)arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  (arg1)->addOption((std::string const &)*arg2,(char const *)arg3,arg4);
 }
 
 
@@ -25054,7 +25102,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   if (!jarg2) {
@@ -25068,9 +25116,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -25095,7 +25142,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   if (!jarg2) {
@@ -25109,9 +25156,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -25136,7 +25182,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   float arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   if (!jarg2) {
@@ -25150,9 +25196,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -25177,7 +25222,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   
   arg1 = (ConversionProperties *)jarg1; 
   if (!jarg2) {
@@ -25191,9 +25236,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ConversionProperties_addOption__SWI
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -27479,8 +27523,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_add__SWIG_0(void * jar
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
+  std::string arg4 ;
+  std::string arg5 ;
   int result;
   
   arg1 = (XMLAttributes *)jarg1; 
@@ -27500,15 +27544,13 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_add__SWIG_0(void * jar
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   if (!jarg5) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg5_str(jarg5);
-  arg5 = &arg5_str; 
-  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+  (&arg5)->assign(jarg5); 
+  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5);
   jresult = result; 
   return jresult;
 }
@@ -27519,7 +27561,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_add__SWIG_1(void * jar
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   int result;
   
   arg1 = (XMLAttributes *)jarg1; 
@@ -27539,9 +27581,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_add__SWIG_1(void * jar
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,arg4);
   jresult = result; 
   return jresult;
 }
@@ -27630,7 +27671,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_remove__SWIG_1(void *
   int jresult ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   arg1 = (XMLAttributes *)jarg1; 
@@ -27644,9 +27685,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_remove__SWIG_1(void *
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (int)(arg1)->remove((std::string const &)*arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (int)(arg1)->remove((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -27861,7 +27901,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_getValue__SWIG_0(vo
 SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_getValue__SWIG_1(void * jarg1, char * jarg2) {
   char * jresult ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string result;
   
   arg1 = (XMLAttributes *)jarg1; 
@@ -27869,8 +27909,9 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_getValue__SWIG_1(vo
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
-  result = ((XMLAttributes const *)arg1)->getValue(arg2);
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
+  result = ((XMLAttributes const *)arg1)->getValue((std::string const &)*arg2);
   jresult = SWIG_csharp_string_callback((&result)->c_str()); 
   return jresult;
 }
@@ -27879,8 +27920,8 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_getValue__SWIG_1(vo
 SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_getValue__SWIG_2(void * jarg1, char * jarg2, char * jarg3) {
   char * jresult ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
-  std::string arg3 ;
+  std::string *arg2 = 0 ;
+  std::string *arg3 = 0 ;
   std::string result;
   
   arg1 = (XMLAttributes *)jarg1; 
@@ -27888,13 +27929,15 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_getValue__SWIG_2(vo
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
   if (!jarg3) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg3)->assign(jarg3); 
-  result = ((XMLAttributes const *)arg1)->getValue(arg2,arg3);
+  std::string arg3_str(jarg3);
+  arg3 = &arg3_str; 
+  result = ((XMLAttributes const *)arg1)->getValue((std::string const &)*arg2,(std::string const &)*arg3);
   jresult = SWIG_csharp_string_callback((&result)->c_str()); 
   return jresult;
 }
@@ -27935,7 +27978,7 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_hasAttribute_
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_hasAttribute__SWIG_1(void * jarg1, char * jarg2, char * jarg3) {
   unsigned int jresult ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
   bool result;
   
@@ -27944,13 +27987,14 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_hasAttribute_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
   if (!jarg3) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
   (&arg3)->assign(jarg3); 
-  result = (bool)((XMLAttributes const *)arg1)->hasAttribute(arg2,arg3);
+  result = (bool)((XMLAttributes const *)arg1)->hasAttribute((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -27959,7 +28003,7 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_hasAttribute_
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_hasAttribute__SWIG_2(void * jarg1, char * jarg2) {
   unsigned int jresult ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   bool result;
   
   arg1 = (XMLAttributes *)jarg1; 
@@ -27967,8 +28011,9 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLAttributes_hasAttribute_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
-  result = (bool)((XMLAttributes const *)arg1)->hasAttribute(arg2);
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
+  result = (bool)((XMLAttributes const *)arg1)->hasAttribute((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -28086,7 +28131,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_add__SWIG_0(void * jar
   int jresult ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   arg1 = (XMLNamespaces *)jarg1; 
@@ -28100,9 +28145,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_add__SWIG_0(void * jar
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (int)(arg1)->add((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -28175,7 +28219,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_clear(void * jarg1) {
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_getIndex(void * jarg1, char * jarg2) {
   int jresult ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   int result;
   
   arg1 = (XMLNamespaces *)jarg1; 
@@ -28183,8 +28227,9 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_getIndex(void * jarg1,
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
-  result = (int)((XMLNamespaces const *)arg1)->getIndex(arg2);
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
+  result = (int)((XMLNamespaces const *)arg1)->getIndex((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -28193,7 +28238,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_getIndex(void * jarg1,
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_containsUri(void * jarg1, char * jarg2) {
   unsigned int jresult ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   bool result;
   
   arg1 = (XMLNamespaces *)jarg1; 
@@ -28201,8 +28246,9 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_containsUri(v
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
-  result = (bool)((XMLNamespaces const *)arg1)->containsUri(arg2);
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
+  result = (bool)((XMLNamespaces const *)arg1)->containsUri((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -28211,7 +28257,7 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_containsUri(v
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_getIndexByPrefix(void * jarg1, char * jarg2) {
   int jresult ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   int result;
   
   arg1 = (XMLNamespaces *)jarg1; 
@@ -28219,8 +28265,9 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_getIndexByPrefix(void
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
-  result = (int)((XMLNamespaces const *)arg1)->getIndexByPrefix(arg2);
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
+  result = (int)((XMLNamespaces const *)arg1)->getIndexByPrefix((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -28300,7 +28347,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_getURI__SWIG_0(void
 SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_getURI__SWIG_1(void * jarg1, char * jarg2) {
   char * jresult ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   std::string result;
   
   arg1 = (XMLNamespaces *)jarg1; 
@@ -28308,9 +28355,8 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLNamespaces_getURI__SWIG_1(void
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
-  result = ((XMLNamespaces const *)arg1)->getURI((std::string const &)*arg2);
+  (&arg2)->assign(jarg2); 
+  result = ((XMLNamespaces const *)arg1)->getURI(arg2);
   jresult = SWIG_csharp_string_callback((&result)->c_str()); 
   return jresult;
 }
@@ -28880,8 +28926,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_addAttr__SWIG_0(void * jarg
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
+  std::string arg4 ;
+  std::string arg5 ;
   int result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -28901,15 +28947,13 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_addAttr__SWIG_0(void * jarg
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   if (!jarg5) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg5_str(jarg5);
-  arg5 = &arg5_str; 
-  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+  (&arg5)->assign(jarg5); 
+  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5);
   jresult = result; 
   return jresult;
 }
@@ -28920,7 +28964,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_addAttr__SWIG_1(void * jarg
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   int result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -28940,9 +28984,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_addAttr__SWIG_1(void * jarg
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,arg4);
   jresult = result; 
   return jresult;
 }
@@ -29017,7 +29060,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_removeAttr__SWIG_1(void * j
   int jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -29031,9 +29074,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_removeAttr__SWIG_1(void * j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (int)(arg1)->removeAttr((std::string const &)*arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (int)(arg1)->removeAttr((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -29092,7 +29134,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_getAttrIndex__SWIG_0(void *
   int jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -29106,9 +29148,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_getAttrIndex__SWIG_0(void *
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (int)((XMLToken const *)arg1)->getAttrIndex((std::string const &)*arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (int)((XMLToken const *)arg1)->getAttrIndex((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -29236,7 +29277,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLToken_getAttrValue__SWIG_0(voi
 SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLToken_getAttrValue__SWIG_1(void * jarg1, char * jarg2, char * jarg3) {
   char * jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
   std::string result;
   
@@ -29245,13 +29286,14 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLToken_getAttrValue__SWIG_1(voi
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
   if (!jarg3) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
   (&arg3)->assign(jarg3); 
-  result = ((XMLToken const *)arg1)->getAttrValue(arg2,arg3);
+  result = ((XMLToken const *)arg1)->getAttrValue((std::string const &)*arg2,arg3);
   jresult = SWIG_csharp_string_callback((&result)->c_str()); 
   return jresult;
 }
@@ -29260,7 +29302,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLToken_getAttrValue__SWIG_1(voi
 SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLToken_getAttrValue__SWIG_2(void * jarg1, char * jarg2) {
   char * jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -29268,8 +29310,9 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLToken_getAttrValue__SWIG_2(voi
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
-  result = ((XMLToken const *)arg1)->getAttrValue(arg2);
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
+  result = ((XMLToken const *)arg1)->getAttrValue((std::string const &)*arg2);
   jresult = SWIG_csharp_string_callback((&result)->c_str()); 
   return jresult;
 }
@@ -29310,7 +29353,7 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_hasAttr__SWIG_0(vo
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_hasAttr__SWIG_1(void * jarg1, char * jarg2, char * jarg3) {
   unsigned int jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
   bool result;
   
@@ -29319,13 +29362,14 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_hasAttr__SWIG_1(vo
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
   if (!jarg3) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
   (&arg3)->assign(jarg3); 
-  result = (bool)((XMLToken const *)arg1)->hasAttr(arg2,arg3);
+  result = (bool)((XMLToken const *)arg1)->hasAttr((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -29334,7 +29378,7 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_hasAttr__SWIG_1(vo
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_hasAttr__SWIG_2(void * jarg1, char * jarg2) {
   unsigned int jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   bool result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -29342,8 +29386,9 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_hasAttr__SWIG_2(vo
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  (&arg2)->assign(jarg2); 
-  result = (bool)((XMLToken const *)arg1)->hasAttr(arg2);
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
+  result = (bool)((XMLToken const *)arg1)->hasAttr((std::string const &)*arg2);
   jresult = result; 
   return jresult;
 }
@@ -29413,7 +29458,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_addNamespace__SWIG_0(void *
   int jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -29427,9 +29472,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_XMLToken_addNamespace__SWIG_0(void *
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (int)(arg1)->addNamespace((std::string const &)*arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (int)(arg1)->addNamespace((std::string const &)*arg2,arg3);
   jresult = result; 
   return jresult;
 }
@@ -29599,7 +29643,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLToken_getNamespaceURI__SWIG_0(
 SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLToken_getNamespaceURI__SWIG_1(void * jarg1, char * jarg2) {
   char * jresult ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   std::string result;
   
   arg1 = (XMLToken *)jarg1; 
@@ -29607,9 +29651,8 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_XMLToken_getNamespaceURI__SWIG_1(
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
-  result = ((XMLToken const *)arg1)->getNamespaceURI((std::string const &)*arg2);
+  (&arg2)->assign(jarg2); 
+  result = ((XMLToken const *)arg1)->getNamespaceURI(arg2);
   jresult = SWIG_csharp_string_callback((&result)->c_str()); 
   return jresult;
 }
@@ -30907,10 +30950,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_delete_XMLTriple(void * jarg1) {
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOutputStream__SWIG_0(void * jarg1, char * jarg2, unsigned int jarg3, char * jarg4, char * jarg5) {
   void * jresult ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
+  std::string arg4 ;
+  std::string arg5 ;
   XMLOutputStream *result = 0 ;
   
   arg1 = (std::ostream *)jarg1;
@@ -30922,24 +30965,21 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOutputStream__SWIG_0(void
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   arg3 = jarg3 ? true : false; 
   if (!jarg4) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   if (!jarg5) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg5_str(jarg5);
-  arg5 = &arg5_str; 
+  (&arg5)->assign(jarg5); 
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2,arg3,arg4,arg5);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -30953,9 +30993,9 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOutputStream__SWIG_0(void
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOutputStream__SWIG_1(void * jarg1, char * jarg2, unsigned int jarg3, char * jarg4) {
   void * jresult ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   XMLOutputStream *result = 0 ;
   
   arg1 = (std::ostream *)jarg1;
@@ -30967,18 +31007,16 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOutputStream__SWIG_1(void
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   arg3 = jarg3 ? true : false; 
   if (!jarg4) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2,arg3,arg4);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -30992,7 +31030,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOutputStream__SWIG_1(void
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOutputStream__SWIG_2(void * jarg1, char * jarg2, unsigned int jarg3) {
   void * jresult ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
   XMLOutputStream *result = 0 ;
   
@@ -31005,12 +31043,11 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOutputStream__SWIG_2(void
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   arg3 = jarg3 ? true : false; 
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2,arg3);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2,arg3);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -31024,7 +31061,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOutputStream__SWIG_2(void
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOutputStream__SWIG_3(void * jarg1, char * jarg2) {
   void * jresult ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   XMLOutputStream *result = 0 ;
   
   arg1 = (std::ostream *)jarg1;
@@ -31036,11 +31073,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOutputStream__SWIG_3(void
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -31085,7 +31121,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_delete_XMLOutputStream(void * jarg1
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_XMLOutputStream_endElement__SWIG_0(void * jarg1, char * jarg2, char * jarg3) {
   XMLOutputStream *arg1 = (XMLOutputStream *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   
   arg1 = (XMLOutputStream *)jarg1; 
   if (!jarg2) {
@@ -31098,9 +31134,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_XMLOutputStream_endElement__SWIG_0(
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  (arg1)->endElement((std::string const &)*arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  (arg1)->endElement((std::string const &)*arg2,arg3);
 }
 
 
@@ -31162,7 +31197,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_XMLOutputStream_setAutoIndent(void
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_XMLOutputStream_startElement__SWIG_0(void * jarg1, char * jarg2, char * jarg3) {
   XMLOutputStream *arg1 = (XMLOutputStream *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   
   arg1 = (XMLOutputStream *)jarg1; 
   if (!jarg2) {
@@ -31175,9 +31210,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_XMLOutputStream_startElement__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  (arg1)->startElement((std::string const &)*arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  (arg1)->startElement((std::string const &)*arg2,arg3);
 }
 
 
@@ -31213,7 +31247,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_XMLOutputStream_startElement__SWIG_
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_XMLOutputStream_startEndElement__SWIG_0(void * jarg1, char * jarg2, char * jarg3) {
   XMLOutputStream *arg1 = (XMLOutputStream *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   
   arg1 = (XMLOutputStream *)jarg1; 
   if (!jarg2) {
@@ -31226,9 +31260,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_XMLOutputStream_startEndElement__SW
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  (arg1)->startEndElement((std::string const &)*arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  (arg1)->startEndElement((std::string const &)*arg2,arg3);
 }
 
 
@@ -31748,32 +31781,29 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_XMLOutputStream_setIndent(void * ja
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputStringStream__SWIG_0(char * jarg1, unsigned int jarg2, char * jarg3, char * jarg4) {
   void * jresult ;
-  std::string *arg1 = 0 ;
+  std::string arg1 ;
   bool arg2 ;
-  std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
+  std::string arg3 ;
+  std::string arg4 ;
   XMLOwningOutputStringStream *result = 0 ;
   
   if (!jarg1) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg1_str(jarg1);
-  arg1 = &arg1_str; 
+  (&arg1)->assign(jarg1); 
   arg2 = jarg2 ? true : false; 
   if (!jarg3) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
+  (&arg3)->assign(jarg3); 
   if (!jarg4) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1,arg2,arg3,arg4);
   jresult = (void *)result; 
   return jresult;
 }
@@ -31781,25 +31811,23 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputStringStream__
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputStringStream__SWIG_1(char * jarg1, unsigned int jarg2, char * jarg3) {
   void * jresult ;
-  std::string *arg1 = 0 ;
+  std::string arg1 ;
   bool arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   XMLOwningOutputStringStream *result = 0 ;
   
   if (!jarg1) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg1_str(jarg1);
-  arg1 = &arg1_str; 
+  (&arg1)->assign(jarg1); 
   arg2 = jarg2 ? true : false; 
   if (!jarg3) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg3_str(jarg3);
-  arg3 = &arg3_str; 
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  (&arg3)->assign(jarg3); 
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -31807,7 +31835,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputStringStream__
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputStringStream__SWIG_2(char * jarg1, unsigned int jarg2) {
   void * jresult ;
-  std::string *arg1 = 0 ;
+  std::string arg1 ;
   bool arg2 ;
   XMLOwningOutputStringStream *result = 0 ;
   
@@ -31815,10 +31843,9 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputStringStream__
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg1_str(jarg1);
-  arg1 = &arg1_str; 
+  (&arg1)->assign(jarg1); 
   arg2 = jarg2 ? true : false; 
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1,arg2);
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1,arg2);
   jresult = (void *)result; 
   return jresult;
 }
@@ -31826,16 +31853,15 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputStringStream__
 
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputStringStream__SWIG_3(char * jarg1) {
   void * jresult ;
-  std::string *arg1 = 0 ;
+  std::string arg1 ;
   XMLOwningOutputStringStream *result = 0 ;
   
   if (!jarg1) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg1_str(jarg1);
-  arg1 = &arg1_str; 
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1);
+  (&arg1)->assign(jarg1); 
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1);
   jresult = (void *)result; 
   return jresult;
 }
@@ -31862,10 +31888,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_delete_XMLOwningOutputStringStream(
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputFileStream__SWIG_0(char * jarg1, char * jarg2, unsigned int jarg3, char * jarg4, char * jarg5) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
+  std::string arg4 ;
+  std::string arg5 ;
   XMLOwningOutputFileStream *result = 0 ;
   
   if (!jarg1) {
@@ -31878,22 +31904,19 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputFileStream__SW
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   arg3 = jarg3 ? true : false; 
   if (!jarg4) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   if (!jarg5) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg5_str(jarg5);
-  arg5 = &arg5_str; 
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+  (&arg5)->assign(jarg5); 
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2,arg3,arg4,arg5);
   jresult = (void *)result; 
   return jresult;
 }
@@ -31902,9 +31925,9 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputFileStream__SW
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputFileStream__SWIG_1(char * jarg1, char * jarg2, unsigned int jarg3, char * jarg4) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   XMLOwningOutputFileStream *result = 0 ;
   
   if (!jarg1) {
@@ -31917,16 +31940,14 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputFileStream__SW
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   arg3 = jarg3 ? true : false; 
   if (!jarg4) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2,arg3,arg4);
   jresult = (void *)result; 
   return jresult;
 }
@@ -31935,7 +31956,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputFileStream__SW
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputFileStream__SWIG_2(char * jarg1, char * jarg2, unsigned int jarg3) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
   XMLOwningOutputFileStream *result = 0 ;
   
@@ -31949,10 +31970,9 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputFileStream__SW
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   arg3 = jarg3 ? true : false; 
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2,arg3);
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2,arg3);
   jresult = (void *)result; 
   return jresult;
 }
@@ -31961,7 +31981,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputFileStream__SW
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputFileStream__SWIG_3(char * jarg1, char * jarg2) {
   void * jresult ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   XMLOwningOutputFileStream *result = 0 ;
   
   if (!jarg1) {
@@ -31974,9 +31994,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLOwningOutputFileStream__SW
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2);
+  (&arg2)->assign(jarg2); 
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2);
   jresult = (void *)result; 
   return jresult;
 }
@@ -32252,7 +32271,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_XMLInputStream_setSBMLNamespaces(vo
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLInputStream_determineNumberChildren__SWIG_0(void * jarg1, char * jarg2) {
   unsigned int jresult ;
   XMLInputStream *arg1 = (XMLInputStream *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int result;
   
   arg1 = (XMLInputStream *)jarg1; 
@@ -32260,9 +32279,8 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLInputStream_determineNum
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
-  result = (unsigned int)(arg1)->determineNumberChildren((std::string const &)*arg2);
+  (&arg2)->assign(jarg2); 
+  result = (unsigned int)(arg1)->determineNumberChildren(arg2);
   jresult = result; 
   return jresult;
 }
@@ -32335,7 +32353,7 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_XMLInputStream_containsChil
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_0(int jarg1, char * jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6) {
   void * jresult ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
@@ -32347,8 +32365,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_0(int jarg1, c
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
@@ -32363,7 +32380,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_0(int jarg1, c
   }
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3,arg4,arg5,arg6);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -32377,7 +32394,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_0(int jarg1, c
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_1(int jarg1, char * jarg2, long long jarg3, long long jarg4, long long jarg5) {
   void * jresult ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
@@ -32388,8 +32405,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_1(int jarg1, c
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
@@ -32401,7 +32417,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_1(int jarg1, c
   }
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3,arg4,arg5);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -32415,7 +32431,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_1(int jarg1, c
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_2(int jarg1, char * jarg2, long long jarg3, long long jarg4) {
   void * jresult ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   XMLError *result = 0 ;
@@ -32425,8 +32441,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_2(int jarg1, c
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
@@ -32435,7 +32450,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_2(int jarg1, c
   }
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3,arg4);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3,arg4);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -32449,7 +32464,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_2(int jarg1, c
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_3(int jarg1, char * jarg2, long long jarg3) {
   void * jresult ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   XMLError *result = 0 ;
   
@@ -32458,14 +32473,13 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_3(int jarg1, c
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -32479,7 +32493,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_3(int jarg1, c
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_4(int jarg1, char * jarg2) {
   void * jresult ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   XMLError *result = 0 ;
   
   arg1 = (int)jarg1; 
@@ -32487,11 +32501,10 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_XMLError__SWIG_4(int jarg1, c
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2);
+    result = (XMLError *)new XMLError(arg1,arg2);
   }
   catch (const XMLConstructorException &e) {
     SWIG_CSharpSetPendingExceptionCustom(e.what(),1);
@@ -33170,7 +33183,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_0(void
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
@@ -33190,8 +33203,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_0(void
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg5_str(jarg5);
-  arg5 = &arg5_str; 
+  (&arg5)->assign(jarg5); 
   {
     arg6 = (unsigned int)jarg6;  
   }
@@ -33204,7 +33216,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_0(void
   {
     arg9 = (unsigned int)jarg9;  
   }
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6,arg7,arg8,arg9);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
 }
 
 
@@ -33213,7 +33225,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_1(void
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
@@ -33232,8 +33244,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_1(void
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg5_str(jarg5);
-  arg5 = &arg5_str; 
+  (&arg5)->assign(jarg5); 
   {
     arg6 = (unsigned int)jarg6;  
   }
@@ -33243,7 +33254,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_1(void
   {
     arg8 = (unsigned int)jarg8;  
   }
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6,arg7,arg8);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
 }
 
 
@@ -33252,7 +33263,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_2(void
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   
@@ -33270,15 +33281,14 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_2(void
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg5_str(jarg5);
-  arg5 = &arg5_str; 
+  (&arg5)->assign(jarg5); 
   {
     arg6 = (unsigned int)jarg6;  
   }
   {
     arg7 = (unsigned int)jarg7;  
   }
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6,arg7);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6,arg7);
 }
 
 
@@ -33287,7 +33297,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_3(void
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
@@ -33304,12 +33314,11 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_3(void
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg5_str(jarg5);
-  arg5 = &arg5_str; 
+  (&arg5)->assign(jarg5); 
   {
     arg6 = (unsigned int)jarg6;  
   }
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6);
 }
 
 
@@ -33318,7 +33327,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_4(void
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   {
@@ -33334,9 +33343,8 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_4(void
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg5_str(jarg5);
-  arg5 = &arg5_str; 
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5);
+  (&arg5)->assign(jarg5); 
+  (arg1)->logError(arg2,arg3,arg4,arg5);
 }
 
 
@@ -33398,12 +33406,12 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logError__SWIG_8(void
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_0(void * jarg1, char * jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6, char * jarg7, long long jarg8, long long jarg9, long long jarg10, long long jarg11) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
   unsigned int arg9 ;
   unsigned int arg10 ;
@@ -33414,8 +33422,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
@@ -33432,8 +33439,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg7_str(jarg7);
-  arg7 = &arg7_str; 
+  (&arg7)->assign(jarg7); 
   {
     arg8 = (unsigned int)jarg8;  
   }
@@ -33446,18 +33452,18 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
   {
     arg11 = (unsigned int)jarg11;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8,arg9,arg10,arg11);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_1(void * jarg1, char * jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6, char * jarg7, long long jarg8, long long jarg9, long long jarg10) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
   unsigned int arg9 ;
   unsigned int arg10 ;
@@ -33467,8 +33473,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
@@ -33485,8 +33490,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg7_str(jarg7);
-  arg7 = &arg7_str; 
+  (&arg7)->assign(jarg7); 
   {
     arg8 = (unsigned int)jarg8;  
   }
@@ -33496,18 +33500,18 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
   {
     arg10 = (unsigned int)jarg10;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8,arg9,arg10);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_2(void * jarg1, char * jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6, char * jarg7, long long jarg8, long long jarg9) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
   unsigned int arg9 ;
   
@@ -33516,8 +33520,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
@@ -33534,26 +33537,25 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg7_str(jarg7);
-  arg7 = &arg7_str; 
+  (&arg7)->assign(jarg7); 
   {
     arg8 = (unsigned int)jarg8;  
   }
   {
     arg9 = (unsigned int)jarg9;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8,arg9);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_3(void * jarg1, char * jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6, char * jarg7, long long jarg8) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
@@ -33561,8 +33563,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
@@ -33579,31 +33580,29 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg7_str(jarg7);
-  arg7 = &arg7_str; 
+  (&arg7)->assign(jarg7); 
   {
     arg8 = (unsigned int)jarg8;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_4(void * jarg1, char * jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6, char * jarg7) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   if (!jarg2) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
@@ -33620,15 +33619,14 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg7_str(jarg7);
-  arg7 = &arg7_str; 
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7);
+  (&arg7)->assign(jarg7); 
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_5(void * jarg1, char * jarg2, long long jarg3, long long jarg4, long long jarg5, long long jarg6) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
@@ -33639,8 +33637,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
@@ -33653,13 +33650,13 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
   {
     arg6 = (unsigned int)jarg6;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_6(void * jarg1, char * jarg2, long long jarg3, long long jarg4, long long jarg5) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
@@ -33669,8 +33666,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
@@ -33680,13 +33676,13 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
   {
     arg5 = (unsigned int)jarg5;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_7(void * jarg1, char * jarg2, long long jarg3, long long jarg4) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   
@@ -33695,21 +33691,20 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
   {
     arg4 = (unsigned int)jarg4;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4);
+  (arg1)->logPackageError(arg2,arg3,arg4);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_8(void * jarg1, char * jarg2, long long jarg3) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
@@ -33717,27 +33712,25 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
+  (&arg2)->assign(jarg2); 
   {
     arg3 = (unsigned int)jarg3;  
   }
-  (arg1)->logPackageError((std::string const &)*arg2,arg3);
+  (arg1)->logPackageError(arg2,arg3);
 }
 
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_SBMLErrorLog_logPackageError__SWIG_9(void * jarg1, char * jarg2) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   
   arg1 = (SBMLErrorLog *)jarg1; 
   if (!jarg2) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  std::string arg2_str(jarg2);
-  arg2 = &arg2_str; 
-  (arg1)->logPackageError((std::string const &)*arg2);
+  (&arg2)->assign(jarg2); 
+  (arg1)->logPackageError(arg2);
 }
 
 
@@ -33808,12 +33801,12 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_0(long long j
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
-  std::string *arg9 = 0 ;
+  std::string arg9 ;
   unsigned int arg10 ;
   SBMLError *result = 0 ;
   
@@ -33830,8 +33823,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_0(long long j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   {
     arg5 = (unsigned int)jarg5;  
   }
@@ -33848,12 +33840,11 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_0(long long j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg9_str(jarg9);
-  arg9 = &arg9_str; 
+  (&arg9)->assign(jarg9); 
   {
     arg10 = (unsigned int)jarg10;  
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7,arg8,(std::string const &)*arg9,arg10);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
   jresult = (void *)result; 
   return jresult;
 }
@@ -33864,12 +33855,12 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_1(long long j
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
-  std::string *arg9 = 0 ;
+  std::string arg9 ;
   SBMLError *result = 0 ;
   
   {
@@ -33885,8 +33876,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_1(long long j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   {
     arg5 = (unsigned int)jarg5;  
   }
@@ -33903,9 +33893,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_1(long long j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg9_str(jarg9);
-  arg9 = &arg9_str; 
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7,arg8,(std::string const &)*arg9);
+  (&arg9)->assign(jarg9); 
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   jresult = (void *)result; 
   return jresult;
 }
@@ -33916,7 +33905,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_2(long long j
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
@@ -33936,8 +33925,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_2(long long j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   {
     arg5 = (unsigned int)jarg5;  
   }
@@ -33950,7 +33938,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_2(long long j
   {
     arg8 = (unsigned int)jarg8;  
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7,arg8);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   jresult = (void *)result; 
   return jresult;
 }
@@ -33961,7 +33949,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_3(long long j
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
@@ -33980,8 +33968,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_3(long long j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   {
     arg5 = (unsigned int)jarg5;  
   }
@@ -33991,7 +33978,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_3(long long j
   {
     arg7 = (unsigned int)jarg7;  
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   jresult = (void *)result; 
   return jresult;
 }
@@ -34002,7 +33989,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_4(long long j
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   SBMLError *result = 0 ;
@@ -34020,15 +34007,14 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_4(long long j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   {
     arg5 = (unsigned int)jarg5;  
   }
   {
     arg6 = (unsigned int)jarg6;  
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6);
   jresult = (void *)result; 
   return jresult;
 }
@@ -34039,7 +34025,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_5(long long j
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   SBMLError *result = 0 ;
   
@@ -34056,12 +34042,11 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_5(long long j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
+  (&arg4)->assign(jarg4); 
   {
     arg5 = (unsigned int)jarg5;  
   }
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5);
   jresult = (void *)result; 
   return jresult;
 }
@@ -34072,7 +34057,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_6(long long j
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   SBMLError *result = 0 ;
   
   {
@@ -34088,9 +34073,8 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_SBMLError__SWIG_6(long long j
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return 0;
   }
-  std::string arg4_str(jarg4);
-  arg4 = &arg4_str; 
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4);
+  (&arg4)->assign(jarg4); 
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4);
   jresult = (void *)result; 
   return jresult;
 }
@@ -37803,6 +37787,120 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_SBMLExtensionRegistry_getASTPlugi
 }
 
 
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_delete_Callback(void * jarg1) {
+  Callback *arg1 = (Callback *) 0 ;
+  
+  arg1 = (Callback *)jarg1; 
+  delete arg1;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Callback_process(void * jarg1, void * jarg2) {
+  int jresult ;
+  Callback *arg1 = (Callback *) 0 ;
+  SBMLDocument *arg2 = (SBMLDocument *) 0 ;
+  int result;
+  
+  arg1 = (Callback *)jarg1; 
+  arg2 = (SBMLDocument *)jarg2; 
+  result = (int)(arg1)->process(arg2);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_Callback_processSwigExplicitCallback(void * jarg1, void * jarg2) {
+  int jresult ;
+  Callback *arg1 = (Callback *) 0 ;
+  SBMLDocument *arg2 = (SBMLDocument *) 0 ;
+  int result;
+  
+  arg1 = (Callback *)jarg1; 
+  arg2 = (SBMLDocument *)jarg2; 
+  result = (int)(arg1)->Callback::process(arg2);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_Callback() {
+  void * jresult ;
+  Callback *result = 0 ;
+  
+  result = (Callback *)new SwigDirector_Callback();
+  jresult = (void *)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_Callback_director_connect(void *objarg, SwigDirector_Callback::SWIG_Callback0_t callback0) {
+  Callback *obj = (Callback *)objarg;
+  SwigDirector_Callback *director = dynamic_cast<SwigDirector_Callback *>(obj);
+  if (director) {
+    director->swig_connect_director(callback0);
+  }
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_CallbackRegistry_invokeCallbacks(void * jarg1) {
+  int jresult ;
+  SBMLDocument *arg1 = (SBMLDocument *) 0 ;
+  int result;
+  
+  arg1 = (SBMLDocument *)jarg1; 
+  result = (int)CallbackRegistry::invokeCallbacks(arg1);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_CallbackRegistry_clearCallbacks() {
+  CallbackRegistry::clearCallbacks();
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_CallbackRegistry_addCallback(void * jarg1) {
+  Callback *arg1 = (Callback *) 0 ;
+  
+  arg1 = (Callback *)jarg1; 
+  CallbackRegistry::addCallback(arg1);
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_CallbackRegistry_getNumCallbacks() {
+  int jresult ;
+  int result;
+  
+  result = (int)CallbackRegistry::getNumCallbacks();
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_CallbackRegistry_removeCallback__SWIG_0(int jarg1) {
+  int arg1 ;
+  
+  arg1 = (int)jarg1; 
+  CallbackRegistry::removeCallback(arg1);
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_CallbackRegistry_removeCallback__SWIG_1(void * jarg1) {
+  Callback *arg1 = (Callback *) 0 ;
+  
+  arg1 = (Callback *)jarg1; 
+  CallbackRegistry::removeCallback(arg1);
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_delete_CallbackRegistry(void * jarg1) {
+  CallbackRegistry *arg1 = (CallbackRegistry *) 0 ;
+  
+  arg1 = (CallbackRegistry *)jarg1; 
+  delete arg1;
+}
+
+
 SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_ASTNode__SWIG_0(int jarg1) {
   void * jresult ;
   ASTNodeType_t arg1 ;
@@ -39067,7 +39165,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_ASTNode_getDefinitionURL(void * j
 
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ASTNode_replaceArgument(void * jarg1, char * jarg2, void * jarg3) {
   ASTNode *arg1 = (ASTNode *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   ASTNode *arg3 = (ASTNode *) 0 ;
   
   arg1 = (ASTNode *)jarg1; 
@@ -39075,9 +39173,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ASTNode_replaceArgument(void * jarg
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
     return ;
   }
-  (&arg2)->assign(jarg2); 
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
   arg3 = (ASTNode *)jarg3; 
-  (arg1)->replaceArgument(arg2,arg3);
+  (arg1)->replaceArgument((std::string const &)*arg2,arg3);
 }
 
 
@@ -39340,7 +39439,30 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_ASTNode_getASTPlugin__SWIG_1(void
 }
 
 
-SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_ASTNode_getASTPlugin__SWIG_2(void * jarg1, char * jarg2, unsigned int jarg3) {
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_ASTNode_getASTPlugin__SWIG_2(void * jarg1, char * jarg2, unsigned int jarg3, unsigned int jarg4) {
+  void * jresult ;
+  ASTNode *arg1 = (ASTNode *) 0 ;
+  std::string *arg2 = 0 ;
+  bool arg3 ;
+  bool arg4 ;
+  ASTBasePlugin *result = 0 ;
+  
+  arg1 = (ASTNode *)jarg1; 
+  if (!jarg2) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
+    return 0;
+  }
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
+  arg3 = jarg3 ? true : false; 
+  arg4 = jarg4 ? true : false; 
+  result = (ASTBasePlugin *)(arg1)->getASTPlugin((std::string const &)*arg2,arg3,arg4);
+  jresult = (void *)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_ASTNode_getASTPlugin__SWIG_3(void * jarg1, char * jarg2, unsigned int jarg3) {
   void * jresult ;
   ASTNode *arg1 = (ASTNode *) 0 ;
   std::string *arg2 = 0 ;
@@ -39361,7 +39483,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_ASTNode_getASTPlugin__SWIG_2(void
 }
 
 
-SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_ASTNode_getASTPlugin__SWIG_3(void * jarg1, char * jarg2) {
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_ASTNode_getASTPlugin__SWIG_4(void * jarg1, char * jarg2) {
   void * jresult ;
   ASTNode *arg1 = (ASTNode *) 0 ;
   std::string *arg2 = 0 ;
@@ -39989,6 +40111,157 @@ SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_L3ParserSettings_visitPackageInfixS
 }
 
 
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_DefinitionURLRegistry_getInstance() {
+  void * jresult ;
+  DefinitionURLRegistry *result = 0 ;
+  
+  result = (DefinitionURLRegistry *) &DefinitionURLRegistry::getInstance();
+  jresult = (void *)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_DefinitionURLRegistry_addDefinitionURL(char * jarg1, int jarg2) {
+  int jresult ;
+  std::string *arg1 = 0 ;
+  int arg2 ;
+  int result;
+  
+  if (!jarg1) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
+    return 0;
+  }
+  std::string arg1_str(jarg1);
+  arg1 = &arg1_str; 
+  arg2 = (int)jarg2; 
+  result = (int)DefinitionURLRegistry::addDefinitionURL((std::string const &)*arg1,arg2);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_DefinitionURLRegistry_getNumDefinitionURLs() {
+  int jresult ;
+  int result;
+  
+  result = (int)DefinitionURLRegistry::getNumDefinitionURLs();
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_DefinitionURLRegistry_addSBMLDefinitions() {
+  DefinitionURLRegistry::addSBMLDefinitions();
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_delete_DefinitionURLRegistry(void * jarg1) {
+  DefinitionURLRegistry *arg1 = (DefinitionURLRegistry *) 0 ;
+  
+  arg1 = (DefinitionURLRegistry *)jarg1; 
+  delete arg1;
+}
+
+
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_DefinitionURLRegistry_getCoreDefinitionsAdded() {
+  unsigned int jresult ;
+  bool result;
+  
+  result = (bool)DefinitionURLRegistry::getCoreDefinitionsAdded();
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_DefinitionURLRegistry_getType(char * jarg1) {
+  int jresult ;
+  std::string *arg1 = 0 ;
+  int result;
+  
+  if (!jarg1) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
+    return 0;
+  }
+  std::string arg1_str(jarg1);
+  arg1 = &arg1_str; 
+  result = (int)DefinitionURLRegistry::getType((std::string const &)*arg1);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_libsbmlcs_DefinitionURLRegistry_getDefinitionUrlByIndex(int jarg1) {
+  char * jresult ;
+  int arg1 ;
+  std::string result;
+  
+  arg1 = (int)jarg1; 
+  result = DefinitionURLRegistry::getDefinitionUrlByIndex(arg1);
+  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_DefinitionURLRegistry_clearDefinitions() {
+  DefinitionURLRegistry::clearDefinitions();
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_new_MathFilter() {
+  void * jresult ;
+  MathFilter *result = 0 ;
+  
+  result = (MathFilter *)new SwigDirector_MathFilter();
+  jresult = (void *)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_delete_MathFilter(void * jarg1) {
+  MathFilter *arg1 = (MathFilter *) 0 ;
+  
+  arg1 = (MathFilter *)jarg1; 
+  delete arg1;
+}
+
+
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_MathFilter_filter(void * jarg1, void * jarg2) {
+  unsigned int jresult ;
+  MathFilter *arg1 = (MathFilter *) 0 ;
+  SBase *arg2 = (SBase *) 0 ;
+  bool result;
+  
+  arg1 = (MathFilter *)jarg1; 
+  arg2 = (SBase *)jarg2; 
+  result = (bool)(arg1)->filter((SBase const *)arg2);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_MathFilter_filterSwigExplicitMathFilter(void * jarg1, void * jarg2) {
+  unsigned int jresult ;
+  MathFilter *arg1 = (MathFilter *) 0 ;
+  SBase *arg2 = (SBase *) 0 ;
+  bool result;
+  
+  arg1 = (MathFilter *)jarg1; 
+  arg2 = (SBase *)jarg2; 
+  result = (bool)(arg1)->MathFilter::filter((SBase const *)arg2);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_MathFilter_director_connect(void *objarg, SwigDirector_MathFilter::SWIG_Callback0_t callback0) {
+  MathFilter *obj = (MathFilter *)objarg;
+  SwigDirector_MathFilter *director = dynamic_cast<SwigDirector_MathFilter *>(obj);
+  if (director) {
+    director->swig_connect_director(callback0);
+  }
+}
+
+
 SWIGEXPORT void SWIGSTDCALL CSharp_libsbmlcs_ASTNodeValues_t_name_set(void * jarg1, char * jarg2) {
   ASTNodeValues_t *arg1 = (ASTNodeValues_t *) 0 ;
   std::string *arg2 = 0 ;
@@ -40263,7 +40536,28 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_ASTBasePlugin_defines__SWIG
 }
 
 
-SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_ASTBasePlugin_defines__SWIG_1(void * jarg1, char * jarg2) {
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_ASTBasePlugin_defines__SWIG_1(void * jarg1, char * jarg2, unsigned int jarg3) {
+  unsigned int jresult ;
+  ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
+  std::string *arg2 = 0 ;
+  bool arg3 ;
+  bool result;
+  
+  arg1 = (ASTBasePlugin *)jarg1; 
+  if (!jarg2) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
+    return 0;
+  }
+  std::string arg2_str(jarg2);
+  arg2 = &arg2_str; 
+  arg3 = jarg3 ? true : false; 
+  result = (bool)((ASTBasePlugin const *)arg1)->defines((std::string const &)*arg2,arg3);
+  jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT unsigned int SWIGSTDCALL CSharp_libsbmlcs_ASTBasePlugin_defines__SWIG_2(void * jarg1, char * jarg2) {
   unsigned int jresult ;
   ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
   std::string *arg2 = 0 ;
@@ -40405,6 +40699,22 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_ASTBasePlugin_getUnitDefinitionFr
 }
 
 
+SWIGEXPORT void * SWIGSTDCALL CSharp_libsbmlcs_ASTBasePlugin_getASTNodeValue(void * jarg1, long long jarg2) {
+  void * jresult ;
+  ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
+  unsigned int arg2 ;
+  ASTNodeValues_t *result = 0 ;
+  
+  arg1 = (ASTBasePlugin *)jarg1; 
+  {
+    arg2 = (unsigned int)jarg2;  
+  }
+  result = (ASTNodeValues_t *)((ASTBasePlugin const *)arg1)->getASTNodeValue(arg2);
+  jresult = (void *)result; 
+  return jresult;
+}
+
+
 SWIGEXPORT int SWIGSTDCALL CSharp_libsbmlcs_ASTBasePlugin_allowedInFunctionDefinition(void * jarg1, int jarg2) {
   int jresult ;
   ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
@@ -41862,6 +42172,10 @@ SWIGEXPORT SBasePlugin * SWIGSTDCALL CSharp_libsbmlcs_SBMLDocumentPlugin_SWIGUpc
     return (SBasePlugin *)jarg1;
 }
 
+SWIGEXPORT ElementFilter * SWIGSTDCALL CSharp_libsbmlcs_MathFilter_SWIGUpcast(MathFilter *jarg1) {
+    return (ElementFilter *)jarg1;
+}
+
 SWIGEXPORT SBMLNamespaces * SWIGSTDCALL CSharp_libsbmlcs_L3v2extendedmathPkgNamespaces_SWIGUpcast(SBMLExtensionNamespaces< L3v2extendedmathExtension > *jarg1) {
     return (SBMLNamespaces *)jarg1;
 }
diff --git a/src/bindings/csharp/libsbml_wrap.h b/src/bindings/csharp/libsbml_wrap.h
index 052218f7..6d03c124 100644
--- a/src/bindings/csharp/libsbml_wrap.h
+++ b/src/bindings/csharp/libsbml_wrap.h
@@ -117,5 +117,35 @@ private:
     void swig_init_callbacks();
 };
 
+class SwigDirector_Callback : public Callback, public Swig::Director {
+
+public:
+    SwigDirector_Callback();
+    virtual ~SwigDirector_Callback();
+    virtual int process(SBMLDocument *doc);
+
+    typedef int (SWIGSTDCALL* SWIG_Callback0_t)(void *);
+    void swig_connect_director(SWIG_Callback0_t callbackprocess);
+
+private:
+    SWIG_Callback0_t swig_callbackprocess;
+    void swig_init_callbacks();
+};
+
+class SwigDirector_MathFilter : public MathFilter, public Swig::Director {
+
+public:
+    SwigDirector_MathFilter();
+    virtual ~SwigDirector_MathFilter();
+    virtual bool filter(SBase const *element);
+
+    typedef unsigned int (SWIGSTDCALL* SWIG_Callback0_t)(void *);
+    void swig_connect_director(SWIG_Callback0_t callbackfilter);
+
+private:
+    SWIG_Callback0_t swig_callbackfilter;
+    void swig_init_callbacks();
+};
+
 
 #endif
diff --git a/src/bindings/csharp/local-downcast-extension-arrays.i b/src/bindings/csharp/local-downcast-extension-arrays.i
index 43dff40d..71ecad04 100644
--- a/src/bindings/csharp/local-downcast-extension-arrays.i
+++ b/src/bindings/csharp/local-downcast-extension-arrays.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-downcast-extension-distrib.i b/src/bindings/csharp/local-downcast-extension-distrib.i
index 1a0bc60e..54bf3c19 100644
--- a/src/bindings/csharp/local-downcast-extension-distrib.i
+++ b/src/bindings/csharp/local-downcast-extension-distrib.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-downcast-extension-l3v2extendedmath.i b/src/bindings/csharp/local-downcast-extension-l3v2extendedmath.i
index 64e9f652..2cc943b7 100644
--- a/src/bindings/csharp/local-downcast-extension-l3v2extendedmath.i
+++ b/src/bindings/csharp/local-downcast-extension-l3v2extendedmath.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-downcast-extension-spatial.i b/src/bindings/csharp/local-downcast-extension-spatial.i
index b7dc3794..a341b030 100644
--- a/src/bindings/csharp/local-downcast-extension-spatial.i
+++ b/src/bindings/csharp/local-downcast-extension-spatial.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-downcast-namespaces-arrays.i b/src/bindings/csharp/local-downcast-namespaces-arrays.i
index 5401449e..030ff77d 100644
--- a/src/bindings/csharp/local-downcast-namespaces-arrays.i
+++ b/src/bindings/csharp/local-downcast-namespaces-arrays.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-downcast-namespaces-distrib.i b/src/bindings/csharp/local-downcast-namespaces-distrib.i
index 81fd7df4..bf562402 100644
--- a/src/bindings/csharp/local-downcast-namespaces-distrib.i
+++ b/src/bindings/csharp/local-downcast-namespaces-distrib.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
@@ -39,10 +43,6 @@
   {
     return new DistribPkgNamespaces(cPtr, owner);
   }
-  else if (ns.hasURI(DistribExtension.getXmlnsL3V2V1()))
-  {
-    return new DistribPkgNamespaces(cPtr, owner);
-  }
 %}
 #endif /* USE_DISTRIB */
 
diff --git a/src/bindings/csharp/local-downcast-namespaces-l3v2extendedmath.i b/src/bindings/csharp/local-downcast-namespaces-l3v2extendedmath.i
index ee271b09..0a28bbd2 100644
--- a/src/bindings/csharp/local-downcast-namespaces-l3v2extendedmath.i
+++ b/src/bindings/csharp/local-downcast-namespaces-l3v2extendedmath.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-downcast-namespaces-spatial.i b/src/bindings/csharp/local-downcast-namespaces-spatial.i
index df910ecd..119fe653 100644
--- a/src/bindings/csharp/local-downcast-namespaces-spatial.i
+++ b/src/bindings/csharp/local-downcast-namespaces-spatial.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-packages-arrays.i b/src/bindings/csharp/local-packages-arrays.i
index 90780822..19fc8ec9 100644
--- a/src/bindings/csharp/local-packages-arrays.i
+++ b/src/bindings/csharp/local-packages-arrays.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-packages-distrib.i b/src/bindings/csharp/local-packages-distrib.i
index cf9d4029..fe369039 100644
--- a/src/bindings/csharp/local-packages-distrib.i
+++ b/src/bindings/csharp/local-packages-distrib.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
@@ -44,9 +48,6 @@
 
     switch ( sb.getTypeCode() )
     {
-      case (int) libsbml.SBML_FUNCTION_DEFINITION:
-        return new DistribFunctionDefinitionPlugin(cPtr, owner);
-
       case (int) libsbml.SBML_DOCUMENT:
         return new DistribSBMLDocumentPlugin(cPtr, owner);
 
@@ -64,119 +65,25 @@
     {
       case (int) libsbml.SBML_LIST_OF:
         string name = sb.getElementName();
-        if (name == "listOfDistribInputs")
+        if (name == "listOfUncertParameters")
         {
-          return new ListOfDistribInputs(cPtr, owner);
+          return new ListOfUncertParameters(cPtr, owner);
         }
-        else if (name == "listOfExternalParameters")
+        else if (name == "listOfUncertainties")
         {
-          return new ListOfDistribExternalParameters(cPtr, owner);
-        }
-        else if (name == "listOfCategories")
-        {
-          return new ListOfDistribCategories(cPtr, owner);
+          return new ListOfUncertainties(cPtr, owner);
         }
 
         return new ListOf(cPtr, owner);
 
-      case (int) libsbml.SBML_DISTRIB_DRAWFROMDISTRIBUTION:
-        return new DistribDrawFromDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_DISTRIBINPUT:
-        return new DistribInput(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_UNCERTVALUE:
-        return new DistribUncertValue(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_UNCERTBOUND:
-        return new DistribUncertBound(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_EXTERNALDISTRIBUTION:
-        return new DistribExternalDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_EXTERNALPARAMETER:
-        return new DistribExternalParameter(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_NORMALDISTRIBUTION:
-        return new DistribNormalDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_UNIFORMDISTRIBUTION:
-        return new DistribUniformDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_CATEGORICALDISTRIBUTION:
-        return new DistribCategoricalDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_CATEGORY:
-        return new DistribCategory(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_BERNOULLIDISTRIBUTION:
-        return new DistribBernoulliDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_BETADISTRIBUTION:
-        return new DistribBetaDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_BINOMIALDISTRIBUTION:
-        return new DistribBinomialDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_CAUCHYDISTRIBUTION:
-        return new DistribCauchyDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_CHISQUAREDISTRIBUTION:
-        return new DistribChiSquareDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_EXPONENTIALDISTRIBUTION:
-        return new DistribExponentialDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_FDISTRIBUTION:
-        return new DistribFDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_GAMMADISTRIBUTION:
-        return new DistribGammaDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_GEOMETRICLDISTRIBUTION:
-        return new DistribGeometricDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_HYPERGEOMETRICDISTRIBUTION:
-        return new DistribHypergeometricDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_INVERSEGAMMADISTRIBUTION:
-        return new DistribInverseGammaDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_LAPLACEDISTRIBUTION:
-        return new DistribLaPlaceDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_LOGNORMALDISTRIBUTION:
-        return new DistribLogNormalDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_LOGISTICDISTRIBUTION:
-        return new DistribLogisticDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_NEGATIVEBINOMIALDISTRIBUTION:
-        return new DistribNegativeBinomialDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_PARETODISTRIBUTION:
-        return new DistribParetoDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_POISSONDISTRIBUTION:
-        return new DistribPoissonDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_RAYLEIGHDISTRIBUTION:
-        return new DistribRayleighDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_STUDENTTDISTRIBUTION:
-        return new DistribStudentTDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_WEIBULLDISTRIBUTION:
-        return new DistribWeibullDistribution(cPtr, owner);
+      case (int) libsbml.SBML_DISTRIB_UNCERTPARAMETER:
+        return new UncertParameter(cPtr, owner);
 
       case (int) libsbml.SBML_DISTRIB_UNCERTAINTY:
-        return new DistribUncertainty(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_UNCERTSTATISTICS:
-        return new DistribUncertStatistics(cPtr, owner);
+        return new Uncertainty(cPtr, owner);
 
       case (int) libsbml.SBML_DISTRIB_UNCERTSTATISTICSPAN:
-        return new DistribUncertStatisticSpan(cPtr, owner);
+        return new UncertSpan(cPtr, owner);
 
       default:
         return new SBase(cPtr, owner);
@@ -186,117 +93,31 @@
 %}
 
 COVARIANT_RTYPE_CLONE(DistribExtension)
-COVARIANT_RTYPE_CLONE(DistribDrawFromDistribution)
-COVARIANT_RTYPE_CLONE(DistribInput)
-COVARIANT_RTYPE_CLONE(DistribUncertValue)
-COVARIANT_RTYPE_CLONE(DistribUncertBound)
-COVARIANT_RTYPE_CLONE(DistribExternalDistribution)
-COVARIANT_RTYPE_CLONE(DistribExternalParameter)
-COVARIANT_RTYPE_CLONE(DistribNormalDistribution)
-COVARIANT_RTYPE_CLONE(DistribUniformDistribution)
-COVARIANT_RTYPE_CLONE(DistribCategoricalDistribution)
-COVARIANT_RTYPE_CLONE(DistribCategory)
-COVARIANT_RTYPE_CLONE(DistribBernoulliDistribution)
-COVARIANT_RTYPE_CLONE(DistribBetaDistribution)
-COVARIANT_RTYPE_CLONE(DistribBinomialDistribution)
-COVARIANT_RTYPE_CLONE(DistribCauchyDistribution)
-COVARIANT_RTYPE_CLONE(DistribChiSquareDistribution)
-COVARIANT_RTYPE_CLONE(DistribExponentialDistribution)
-COVARIANT_RTYPE_CLONE(DistribFDistribution)
-COVARIANT_RTYPE_CLONE(DistribGammaDistribution)
-COVARIANT_RTYPE_CLONE(DistribGeometricDistribution)
-COVARIANT_RTYPE_CLONE(DistribHypergeometricDistribution)
-COVARIANT_RTYPE_CLONE(DistribInverseGammaDistribution)
-COVARIANT_RTYPE_CLONE(DistribLaPlaceDistribution)
-COVARIANT_RTYPE_CLONE(DistribLogNormalDistribution)
-COVARIANT_RTYPE_CLONE(DistribLogisticDistribution)
-COVARIANT_RTYPE_CLONE(DistribNegativeBinomialDistribution)
-COVARIANT_RTYPE_CLONE(DistribParetoDistribution)
-COVARIANT_RTYPE_CLONE(DistribPoissonDistribution)
-COVARIANT_RTYPE_CLONE(DistribRayleighDistribution)
-COVARIANT_RTYPE_CLONE(DistribStudentTDistribution)
-COVARIANT_RTYPE_CLONE(DistribWeibullDistribution)
-COVARIANT_RTYPE_CLONE(DistribUncertainty)
-COVARIANT_RTYPE_CLONE(DistribUncertStatistics)
-COVARIANT_RTYPE_CLONE(DistribUncertStatisticSpan)
-COVARIANT_RTYPE_CLONE(ListOfDistribInputs)
-COVARIANT_RTYPE_CLONE(ListOfDistribExternalParameters)
-COVARIANT_RTYPE_CLONE(ListOfDistribCategories)
-
-COVARIANT_RTYPE_LISTOF_GET_REMOVE(DistribInput)
-COVARIANT_RTYPE_LISTOF_GET_REMOVE(DistribExternalParameter)
-COVARIANT_RTYPE_LISTOF_GET_REMOVE(DistribCategory)
+COVARIANT_RTYPE_CLONE(UncertParameter)
+COVARIANT_RTYPE_CLONE(Uncertainty)
+COVARIANT_RTYPE_CLONE(UncertSpan)
 
-SBMLCONSTRUCTOR_EXCEPTION(DistribPkgNamespaces)
-SBMLCONSTRUCTOR_EXCEPTION(DistribDrawFromDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribInput)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertValue)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertBound)
-SBMLCONSTRUCTOR_EXCEPTION(DistribExternalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribExternalParameter)
-SBMLCONSTRUCTOR_EXCEPTION(DistribNormalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUniformDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribCategoricalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribCategory)
-SBMLCONSTRUCTOR_EXCEPTION(DistribBernoulliDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribBetaDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribBinomialDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribCauchyDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribChiSquareDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribExponentialDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribFDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribGammaDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribGeometricDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribHypergeometricDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribInverseGammaDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribLaPlaceDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribLogNormalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribLogisticDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribNegativeBinomialDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribParetoDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribPoissonDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribRayleighDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribStudentTDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribWeibullDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertainty)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertStatistics)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertStatisticSpan)
-SBMLCONSTRUCTOR_EXCEPTION(ListOfDistribInputs)
-SBMLCONSTRUCTOR_EXCEPTION(ListOfDistribExternalParameters)
-SBMLCONSTRUCTOR_EXCEPTION(ListOfDistribCategories)
+COVARIANT_RTYPE_CLONE(ListOfUncertParameters)
+COVARIANT_RTYPE_CLONE(ListOfUncertainties)
 
+COVARIANT_RTYPE_LISTOF_GET_REMOVE(UncertParameter)
+COVARIANT_RTYPE_LISTOF_GET_REMOVE(Uncertainty)
 
-//
-// Convert DistribContinuousUnivariateDistribution objects into the most
-//  specific object possible.
-//
-%typemap("csout") DistribContinuousUnivariateDistribution*
-{
-  return (DistribContinuousUnivariateDistribution)
-    libsbml.DowncastSBase($imcall, $owner);
-}
+SBMLCONSTRUCTOR_EXCEPTION(DistribPkgNamespaces)
+SBMLCONSTRUCTOR_EXCEPTION(UncertParameter)
+SBMLCONSTRUCTOR_EXCEPTION(Uncertainty)
+SBMLCONSTRUCTOR_EXCEPTION(UncertSpan)
 
-//
-// Convert DistribDiscreteUnivariateDistribution objects into the most specific
-//  object possible.
-//
-%typemap("csout") DistribDiscreteUnivariateDistribution*
-{
-  return (DistribDiscreteUnivariateDistribution) libsbml.DowncastSBase($imcall,
-    $owner);
-}
+SBMLCONSTRUCTOR_EXCEPTION(ListOfUncertParameters)
+SBMLCONSTRUCTOR_EXCEPTION(ListOfUncertainties)
 
 //
-// Convert DistribCategoricalUnivariateDistribution objects into the most
-//  specific object possible.
+// Convert UncertParameter objects into the most specific object possible.
 //
-%typemap("csout") DistribCategoricalUnivariateDistribution*
+%typemap("csout") UncertParameter*
 {
-  return (DistribCategoricalUnivariateDistribution)
-    libsbml.DowncastSBase($imcall, $owner);
+  return (UncertParameter) libsbml.DowncastSBase($imcall, $owner);
 }
 
-
-
 #endif // USE_DISTRIB
 
diff --git a/src/bindings/csharp/local-packages-dyn.i b/src/bindings/csharp/local-packages-dyn.i
index 6a2d9fab..9d7cdadb 100644
--- a/src/bindings/csharp/local-packages-dyn.i
+++ b/src/bindings/csharp/local-packages-dyn.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-packages-fbc.i b/src/bindings/csharp/local-packages-fbc.i
index 99f5da8d..d3ae001f 100644
--- a/src/bindings/csharp/local-packages-fbc.i
+++ b/src/bindings/csharp/local-packages-fbc.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-packages-l3v2extendedmath.i b/src/bindings/csharp/local-packages-l3v2extendedmath.i
index 67067db4..21b86d8c 100644
--- a/src/bindings/csharp/local-packages-l3v2extendedmath.i
+++ b/src/bindings/csharp/local-packages-l3v2extendedmath.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-packages-multi.i b/src/bindings/csharp/local-packages-multi.i
index 177923a0..9d53c7cf 100644
--- a/src/bindings/csharp/local-packages-multi.i
+++ b/src/bindings/csharp/local-packages-multi.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-packages-req.i b/src/bindings/csharp/local-packages-req.i
index c48b9f50..09d07b27 100644
--- a/src/bindings/csharp/local-packages-req.i
+++ b/src/bindings/csharp/local-packages-req.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local-packages-spatial.i b/src/bindings/csharp/local-packages-spatial.i
index 2300fe05..a1f19657 100644
--- a/src/bindings/csharp/local-packages-spatial.i
+++ b/src/bindings/csharp/local-packages-spatial.i
@@ -1,35 +1,41 @@
 /**
- * @file:   local-packages-spatial.i
- * @brief:  Implementation of the spatial class
- * @author: SBMLTeam
+ * @file local-packages-spatial.i
+ * @brief Casting to most specific packages object for csharp
+ * @author SBMLTeam
  *
  * <!--------------------------------------------------------------------------
- * This file is part of libSBML.  Please visit http://sbml.org for more
+ * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
- *     1. California Institute of Technology, Pasadena, CA, USA
- *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
- *     3. University of Heidelberg, Heidelberg, Germany
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
+ * 3. University of Heidelberg, Heidelberg, Germany
  *
  * Copyright (C) 2009-2013 jointly by the following organizations:
- *     1. California Institute of Technology, Pasadena, CA, USA
- *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
  *
  * Copyright (C) 2006-2008 by the California Institute of Technology,
- *     Pasadena, CA, USA 
+ * Pasadena, CA, USA
  *
  * Copyright (C) 2002-2005 jointly by the following organizations:
- *     1. California Institute of Technology, Pasadena, CA, USA
- *     2. Japan Science and Technology Agency, Japan
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. Japan Science and Technology Agency, Japan
  *
  * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation.  A copy of the license agreement is provided
- * in the file named "LICENSE.txt" included with this software distribution
- * and also available online as http://sbml.org/software/libsbml/license.html
+ * under the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation. A copy of the license agreement is provided in the
+ * file named "LICENSE.txt" included with this software distribution and also
+ * available online as http://sbml.org/software/libsbml/license.html
  * ------------------------------------------------------------------------ -->
  */
+
+
 #ifdef USE_SPATIAL
 
 /**
@@ -74,7 +80,7 @@ void SampledField::getUncompressed(int *outputSamples);
       return new SpatialModelPlugin(cPtr, owner);
     }
 
-    switch( sb.getTypeCode() )
+    switch ( sb.getTypeCode() )
     {
       case (int) libsbml.SBML_MODEL:
         return new SpatialModelPlugin(cPtr, owner);
@@ -101,7 +107,7 @@ void SampledField::getUncompressed(int *outputSamples);
     if (cPtr.Equals(IntPtr.Zero)) return null;
 
     SBase sb = new SBase(cPtr, false);
-    switch( sb.getTypeCode() )
+    switch ( sb.getTypeCode() )
     {
       case (int) libsbml.SBML_LIST_OF:
         string name = sb.getElementName();
@@ -386,7 +392,7 @@ SBMLCONSTRUCTOR_EXCEPTION(ListOfOrdinalMappings)
 //
 %typemap("csout") GeometryDefinition*
 {
-	return (GeometryDefinition) libsbml.DowncastSBase($imcall, $owner);
+  return (GeometryDefinition) libsbml.DowncastSBase($imcall, $owner);
 }
 
 //
@@ -394,7 +400,7 @@ SBMLCONSTRUCTOR_EXCEPTION(ListOfOrdinalMappings)
 //
 %typemap("csout") CSGNode*
 {
-	return (CSGNode) libsbml.DowncastSBase($imcall, $owner);
+  return (CSGNode) libsbml.DowncastSBase($imcall, $owner);
 }
 
 //
@@ -402,9 +408,9 @@ SBMLCONSTRUCTOR_EXCEPTION(ListOfOrdinalMappings)
 //
 %typemap("csout") CSGTransformation*
 {
-	return (CSGTransformation) libsbml.DowncastSBase($imcall, $owner);
+  return (CSGTransformation) libsbml.DowncastSBase($imcall, $owner);
 }
 
 
-#endif /* USE_SPATIAL */
+#endif // USE_SPATIAL
 
diff --git a/src/bindings/csharp/local.cpp b/src/bindings/csharp/local.cpp
index 03b0e2a8..55b99ed0 100644
--- a/src/bindings/csharp/local.cpp
+++ b/src/bindings/csharp/local.cpp
@@ -8,6 +8,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/csharp/local.i b/src/bindings/csharp/local.i
index 7eb108b0..50b31bec 100644
--- a/src/bindings/csharp/local.i
+++ b/src/bindings/csharp/local.i
@@ -10,6 +10,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/AutoTestRunner.java b/src/bindings/java/AutoTestRunner.java
index 3c5d78c7..f566a5c8 100644
--- a/src/bindings/java/AutoTestRunner.java
+++ b/src/bindings/java/AutoTestRunner.java
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/ASTBasePlugin.java b/src/bindings/java/java-files/org/sbml/libsbml/ASTBasePlugin.java
index fc841b61..6d65729b 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/ASTBasePlugin.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/ASTBasePlugin.java
@@ -91,8 +91,12 @@ public class ASTBasePlugin {
     return libsbmlJNI.ASTBasePlugin_defines__SWIG_0(swigCPtr, this, type);
   }
 
+  public boolean defines(String name, boolean strCmpIsCaseSensitive) {
+    return libsbmlJNI.ASTBasePlugin_defines__SWIG_1(swigCPtr, this, name, strCmpIsCaseSensitive);
+  }
+
   public boolean defines(String name) {
-    return libsbmlJNI.ASTBasePlugin_defines__SWIG_1(swigCPtr, this, name);
+    return libsbmlJNI.ASTBasePlugin_defines__SWIG_2(swigCPtr, this, name);
   }
 
   public boolean isFunction(int type) {
@@ -128,6 +132,11 @@ public class ASTBasePlugin {
     return (cPtr == 0) ? null : new UnitDefinition(cPtr, false);
   }
 
+  public ASTNodeValues_t getASTNodeValue(long n) {
+    long cPtr = libsbmlJNI.ASTBasePlugin_getASTNodeValue(swigCPtr, this, n);
+    return (cPtr == 0) ? null : new ASTNodeValues_t(cPtr, false);
+  }
+
   
 /** * @internal */ public
  int allowedInFunctionDefinition(int type) {
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/ASTNode.java b/src/bindings/java/java-files/org/sbml/libsbml/ASTNode.java
index 7f9ce1e3..76bf69e1 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/ASTNode.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/ASTNode.java
@@ -2347,15 +2347,21 @@ used to define a number with value <code>10</code> and unit of measurement
 }
 
   
+/** */ public
+ ASTBasePlugin getASTPlugin(String name, boolean isCsymbol, boolean strCmpIsCaseSensitive) {
+  return libsbml.DowncastASTBasePlugin(libsbmlJNI.ASTNode_getASTPlugin__SWIG_2(swigCPtr, this, name, isCsymbol, strCmpIsCaseSensitive), false);
+}
+
+  
 /** */ public
  ASTBasePlugin getASTPlugin(String name, boolean isCsymbol) {
-  return libsbml.DowncastASTBasePlugin(libsbmlJNI.ASTNode_getASTPlugin__SWIG_2(swigCPtr, this, name, isCsymbol), false);
+  return libsbml.DowncastASTBasePlugin(libsbmlJNI.ASTNode_getASTPlugin__SWIG_3(swigCPtr, this, name, isCsymbol), false);
 }
 
   
 /** */ public
  ASTBasePlugin getASTPlugin(String name) {
-  return libsbml.DowncastASTBasePlugin(libsbmlJNI.ASTNode_getASTPlugin__SWIG_3(swigCPtr, this, name), false);
+  return libsbml.DowncastASTBasePlugin(libsbmlJNI.ASTNode_getASTPlugin__SWIG_4(swigCPtr, this, name), false);
 }
 
   
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/Callback.java b/src/bindings/java/java-files/org/sbml/libsbml/Callback.java
new file mode 100644
index 00000000..b6c8b8c5
--- /dev/null
+++ b/src/bindings/java/java-files/org/sbml/libsbml/Callback.java
@@ -0,0 +1,87 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 3.0.12
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+package org.sbml.libsbml;
+
+public class Callback {
+   private long swigCPtr;
+   protected boolean swigCMemOwn;
+
+   protected Callback(long cPtr, boolean cMemoryOwn)
+   {
+     swigCMemOwn = cMemoryOwn;
+     swigCPtr    = cPtr;
+   }
+
+   protected static long getCPtr(Callback obj)
+   {
+     return (obj == null) ? 0 : obj.swigCPtr;
+   }
+
+   protected static long getCPtrAndDisown (Callback obj)
+   {
+     long ptr = 0;
+
+     if (obj != null)
+     {
+       ptr             = obj.swigCPtr;
+       obj.swigCMemOwn = false;
+     }
+
+     return ptr;
+   }
+
+  protected void finalize() {
+    delete();
+  }
+
+  public synchronized void delete() {
+    if (swigCPtr != 0) {
+      if (swigCMemOwn) {
+        swigCMemOwn = false;
+        libsbmlJNI.delete_Callback(swigCPtr);
+      }
+      swigCPtr = 0;
+    }
+  }
+
+  protected void swigDirectorDisconnect() {
+    swigCMemOwn = false;
+    delete();
+  }
+
+  public void swigReleaseOwnership() {
+    swigCMemOwn = false;
+    libsbmlJNI.Callback_change_ownership(this, swigCPtr, false);
+  }
+
+  public void swigTakeOwnership() {
+    swigCMemOwn = true;
+    libsbmlJNI.Callback_change_ownership(this, swigCPtr, true);
+  }
+
+  
+/**
+	 * The processing function to be implemented by the callback
+	 <p>
+	 * In order to stop processing return a value other than 
+	 * LIBSBML_OPERATION_SUCCESS. 
+	 <p>
+	 * @return LIBSBML_OPERATION_SUCCESS to continue the operations
+	 *         any other value to stop
+	 */ public
+ int process(SBMLDocument doc) {
+    return (getClass() == Callback.class) ? libsbmlJNI.Callback_process(swigCPtr, this, SBMLDocument.getCPtr(doc), doc) : libsbmlJNI.Callback_processSwigExplicitCallback(swigCPtr, this, SBMLDocument.getCPtr(doc), doc);
+  }
+
+  public Callback() {
+    this(libsbmlJNI.new_Callback(), true);
+    libsbmlJNI.Callback_director_connect(this, swigCPtr, swigCMemOwn, true);
+  }
+
+}
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/CallbackRegistry.java b/src/bindings/java/java-files/org/sbml/libsbml/CallbackRegistry.java
new file mode 100644
index 00000000..11acd321
--- /dev/null
+++ b/src/bindings/java/java-files/org/sbml/libsbml/CallbackRegistry.java
@@ -0,0 +1,113 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 3.0.12
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+package org.sbml.libsbml;
+
+public class CallbackRegistry {
+   private long swigCPtr;
+   protected boolean swigCMemOwn;
+
+   protected CallbackRegistry(long cPtr, boolean cMemoryOwn)
+   {
+     swigCMemOwn = cMemoryOwn;
+     swigCPtr    = cPtr;
+   }
+
+   protected static long getCPtr(CallbackRegistry obj)
+   {
+     return (obj == null) ? 0 : obj.swigCPtr;
+   }
+
+   protected static long getCPtrAndDisown (CallbackRegistry obj)
+   {
+     long ptr = 0;
+
+     if (obj != null)
+     {
+       ptr             = obj.swigCPtr;
+       obj.swigCMemOwn = false;
+     }
+
+     return ptr;
+   }
+
+  protected void finalize() {
+    delete();
+  }
+
+  public synchronized void delete() {
+    if (swigCPtr != 0) {
+      if (swigCMemOwn) {
+        swigCMemOwn = false;
+        libsbmlJNI.delete_CallbackRegistry(swigCPtr);
+      }
+      swigCPtr = 0;
+    }
+  }
+
+  
+/**
+	 * Invokes all registered callbacks on the given document. If the callbacks indicate
+	 * that processing should be stopped they return a value other than operation success.
+	 <p>
+	 * @return LIBSBML_OPERATION_SUCCESS to indicate that processing should be continued, 
+	 *         any other value to stop processing
+	 */ public
+ static int invokeCallbacks(SBMLDocument doc) {
+    return libsbmlJNI.CallbackRegistry_invokeCallbacks(SBMLDocument.getCPtr(doc), doc);
+  }
+
+  
+/**
+   * Clears all registered processing callbacks
+   */ public
+ static void clearCallbacks() {
+    libsbmlJNI.CallbackRegistry_clearCallbacks();
+  }
+
+  
+/**
+   * Registers a new processing callback that will be called with a newly instantiated
+   * ModelDefinition object. This allows for all post processing on it that needs to
+   * happen before integrating it with the target document.
+   <p>
+   * @param cb the callback.
+   */ public
+ static void addCallback(Callback cb) {
+    libsbmlJNI.CallbackRegistry_addCallback(Callback.getCPtr(cb), cb);
+  }
+
+  
+/**
+	 * @return the number of registered callbacks.
+	 */ public
+ static int getNumCallbacks() {
+    return libsbmlJNI.CallbackRegistry_getNumCallbacks();
+  }
+
+  
+/**
+   * Removes the callback with given index.
+   <p>
+   * @param index the index of the callback to be removed from the list.
+   */ public
+ static void removeCallback(int index) {
+    libsbmlJNI.CallbackRegistry_removeCallback__SWIG_0(index);
+  }
+
+  
+/**
+	 * Removes the specified callback from the list of registered callbacks
+	 <p>
+	 * @param cb the callback to be removed.
+	 */ public
+ static void removeCallback(Callback cb) {
+    libsbmlJNI.CallbackRegistry_removeCallback__SWIG_1(Callback.getCPtr(cb), cb);
+  }
+
+}
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/ConversionProperties.java b/src/bindings/java/java-files/org/sbml/libsbml/ConversionProperties.java
index 8a7c28b7..6da1e861 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/ConversionProperties.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/ConversionProperties.java
@@ -112,7 +112,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  <p>
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/DefinitionURLRegistry.java b/src/bindings/java/java-files/org/sbml/libsbml/DefinitionURLRegistry.java
new file mode 100644
index 00000000..ba4bbf30
--- /dev/null
+++ b/src/bindings/java/java-files/org/sbml/libsbml/DefinitionURLRegistry.java
@@ -0,0 +1,155 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 3.0.12
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+package org.sbml.libsbml;
+
+/** 
+ *  Registry of all libSBML SBML DefinitionURLs.
+ <p>
+ * <p style='color: #777; font-style: italic'>
+This class of objects is defined by libSBML only and has no direct
+equivalent in terms of SBML components.  It is a class used in
+the implementation of extra functionality provided by libSBML.
+</p>
+
+ <p>
+ * LibSBML provides facilities for transforming and converting SBML
+ * documents in various ways.  These transformations can involve
+ * essentially anything that can be written algorithmically; examples
+ * include converting the units of measurement in a model, or converting
+ * from one Level+Version combination of SBML to another.  DefinitionURLs are
+ * implemented as objects derived from the class DefinitionURL.
+ <p>
+ * The DefinitionURL registry, implemented as a singleton object of class
+ * {@link DefinitionURLRegistry}, maintains a list of known DefinitionURLs and provides
+ * methods for discovering them.  Callers can use the method
+ * {@link DefinitionURLRegistry#getNumDefinitionURLs()} to find out how many
+ * DefinitionURLs are registered, then use
+ * {@link DefinitionURLRegistry#getDefinitionURLByIndex(int)} to
+ * iterate over each one; alternatively, callers can use
+ * {@link DefinitionURLRegistry#getDefinitionURLFor(ConversionProperties)}
+ * to search for a DefinitionURL having specific properties.
+ */
+
+public class DefinitionURLRegistry {
+   private long swigCPtr;
+   protected boolean swigCMemOwn;
+
+   protected DefinitionURLRegistry(long cPtr, boolean cMemoryOwn)
+   {
+     swigCMemOwn = cMemoryOwn;
+     swigCPtr    = cPtr;
+   }
+
+   protected static long getCPtr(DefinitionURLRegistry obj)
+   {
+     return (obj == null) ? 0 : obj.swigCPtr;
+   }
+
+   protected static long getCPtrAndDisown (DefinitionURLRegistry obj)
+   {
+     long ptr = 0;
+
+     if (obj != null)
+     {
+       ptr             = obj.swigCPtr;
+       obj.swigCMemOwn = false;
+     }
+
+     return ptr;
+   }
+
+  protected void finalize() {
+    delete();
+  }
+
+  public synchronized void delete() {
+    if (swigCPtr != 0) {
+      if (swigCMemOwn) {
+        swigCMemOwn = false;
+        libsbmlJNI.delete_DefinitionURLRegistry(swigCPtr);
+      }
+      swigCPtr = 0;
+    }
+  }
+
+  
+/**
+   * Returns the singleton instance for the DefinitionURL registry.
+   <p>
+   * Prior to using the registry, callers have to obtain a copy of the
+   * registry.  This static method provides the means for doing that.
+   <p>
+   * @return the singleton for the DefinitionURL registry.
+   */ public
+ static DefinitionURLRegistry getInstance() {
+    return new DefinitionURLRegistry(libsbmlJNI.DefinitionURLRegistry_getInstance(), false);
+  }
+
+  
+/**
+   * Adds the given DefinitionURL to the registry of SBML DefinitionURLs.
+   <p>
+   * @param DefinitionURL the DefinitionURL to add to the registry.
+   <p>
+   * <p>
+ * @return integer value indicating success/failure of the
+ * function.   The possible values
+ * returned by this function are:
+   * <ul>
+   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
+   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
+   * </ul>
+   */ public
+ static int addDefinitionURL(String url, int type) {
+    return libsbmlJNI.DefinitionURLRegistry_addDefinitionURL(url, type);
+  }
+
+  
+/**
+   * Returns the number of DefinitionURLs known by the registry.
+   <p>
+   * @return the number of registered DefinitionURLs.
+   <p>
+   * @see #getDefinitionURLByIndex(int)
+   */ public
+ static int getNumDefinitionURLs() {
+    return libsbmlJNI.DefinitionURLRegistry_getNumDefinitionURLs();
+  }
+
+  
+/** */ public
+ static void addSBMLDefinitions() {
+    libsbmlJNI.DefinitionURLRegistry_addSBMLDefinitions();
+  }
+
+  
+/** */ public
+ static boolean getCoreDefinitionsAdded() {
+    return libsbmlJNI.DefinitionURLRegistry_getCoreDefinitionsAdded();
+  }
+
+  
+/** */ public
+ static int getType(String url) {
+    return libsbmlJNI.DefinitionURLRegistry_getType(url);
+  }
+
+  
+/** */ public
+ static String getDefinitionUrlByIndex(int index) {
+    return libsbmlJNI.DefinitionURLRegistry_getDefinitionUrlByIndex(index);
+  }
+
+  
+/** */ public
+ static void clearDefinitions() {
+    libsbmlJNI.DefinitionURLRegistry_clearDefinitions();
+  }
+
+}
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/MathFilter.java b/src/bindings/java/java-files/org/sbml/libsbml/MathFilter.java
new file mode 100644
index 00000000..41638769
--- /dev/null
+++ b/src/bindings/java/java-files/org/sbml/libsbml/MathFilter.java
@@ -0,0 +1,97 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 3.0.12
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+package org.sbml.libsbml;
+
+/** 
+ *  
+ * @internal
+ */
+
+public class MathFilter extends ElementFilter {
+   private long swigCPtr;
+
+   protected MathFilter(long cPtr, boolean cMemoryOwn)
+   {
+     super(libsbmlJNI.MathFilter_SWIGUpcast(cPtr), cMemoryOwn);
+     swigCPtr = cPtr;
+   }
+
+   protected static long getCPtr(MathFilter obj)
+   {
+     return (obj == null) ? 0 : obj.swigCPtr;
+   }
+
+   protected static long getCPtrAndDisown (MathFilter obj)
+   {
+     long ptr = 0;
+
+     if (obj != null)
+     {
+       ptr             = obj.swigCPtr;
+       obj.swigCMemOwn = false;
+     }
+
+     return ptr;
+   }
+
+  protected void finalize() {
+    delete();
+  }
+
+  public synchronized void delete() {
+    if (swigCPtr != 0) {
+      if (swigCMemOwn) {
+        swigCMemOwn = false;
+        libsbmlJNI.delete_MathFilter(swigCPtr);
+      }
+      swigCPtr = 0;
+    }
+    super.delete();
+  }
+
+  protected void swigDirectorDisconnect() {
+    swigCMemOwn = false;
+    delete();
+  }
+
+  public void swigReleaseOwnership() {
+    swigCMemOwn = false;
+    libsbmlJNI.MathFilter_change_ownership(this, swigCPtr, false);
+  }
+
+  public void swigTakeOwnership() {
+    swigCMemOwn = true;
+    libsbmlJNI.MathFilter_change_ownership(this, swigCPtr, true);
+  }
+
+  public MathFilter() {
+    this(libsbmlJNI.new_MathFilter(), true);
+    libsbmlJNI.MathFilter_director_connect(this, swigCPtr, swigCMemOwn, true);
+  }
+
+  
+/**
+   * Predicate to test elements.
+   <p>
+   * This is the central predicate of the {@link ElementFilter} class.  In subclasses
+   * of {@link ElementFilter}, callers should implement this method such that it
+   * returns <code>true</code> for <code>element</code> arguments that are 'desirable' and
+   * <code>false</code> for those that are 'undesirable' in whatever filtering context the
+   * {@link ElementFilter} subclass is designed to be used.
+   <p>
+   * @param element the element to be tested.
+   <p>
+   * @return <code>true</code> if the <code>element</code> is desirable or should be kept,
+   * <code>false</code> otherwise.
+   */ public
+ boolean filter(SBase element) {
+    return (getClass() == MathFilter.class) ? libsbmlJNI.MathFilter_filter(swigCPtr, this, SBase.getCPtr(element), element) : libsbmlJNI.MathFilter_filterSwigExplicitMathFilter(swigCPtr, this, SBase.getCPtr(element), element);
+  }
+
+}
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/Model.java b/src/bindings/java/java-files/org/sbml/libsbml/Model.java
index bbd75d0d..ddde4ebf 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/Model.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/Model.java
@@ -17,7 +17,7 @@ package org.sbml.libsbml;
  * within the model, the list must not be empty; that is, it must have
  * length one or more.  The following are the components and lists
  * permitted in different Levels and Versions of SBML in
- * version 5.17.2
+ * version 5.18.0
  * of libSBML:
  * <ul>
  * <li> In SBML Level 1, the components are: {@link UnitDefinition}, {@link Compartment},
@@ -126,7 +126,7 @@ sp.setId(&#34;BestSpeciesEver&#34;);
  * <h2>Consistency and adherence to SBML specifications</h2>
  <p>
  * To make it easier for applications to do whatever they need,
- * libSBML version 5.17.2
+ * libSBML version 5.18.0
  * is relatively lax when it comes to enforcing correctness and
  * completeness of models <em>during</em> model construction and editing.
  * Essentially, libSBML <em>will</em> <em>not</em> in most cases check automatically
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/Rule.java b/src/bindings/java/java-files/org/sbml/libsbml/Rule.java
index 6d0b81d1..1ccdc8c0 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/Rule.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/Rule.java
@@ -817,7 +817,7 @@ public class Rule extends SBase {
    <p>
    * The returned value can be any of a number of different strings,
    * depending on the SBML Level in use and the kind of {@link Rule} object this
-   * is.  The rules as of libSBML version 5.17.2
+   * is.  The rules as of libSBML version 5.18.0
    * are the following:
    * <ul>
    * <li> (Level&nbsp;2 and&nbsp;3) RateRule: returns <code>'rateRule'</code>
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLConverter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLConverter.java
index 2fcfbea6..620866e6 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLConverter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLConverter.java
@@ -106,7 +106,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLDocument.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLDocument.java
index 45b7f3db..9737530a 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLDocument.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLDocument.java
@@ -247,7 +247,7 @@ public class SBMLDocument extends SBase {
    <p>
    * <p>
  * This 'default Level' corresponds to the most recent SBML specification
- * Level available at the time libSBML version 5.17.2 was released.  The default Level is used by
+ * Level available at the time libSBML version 5.18.0 was released.  The default Level is used by
  * {@link SBMLDocument} if no Level is explicitly specified at the time of the
  * construction of an {@link SBMLDocument} instance.
    <p>
@@ -268,7 +268,7 @@ public class SBMLDocument extends SBase {
    * <p>
  * This 'default Version' corresponds to the most recent Version within the
  * most recent Level of SBML available at the time libSBML version
- * 5.17.2 was released.  The default Version is
+ * 5.18.0 was released.  The default Version is
  * used by {@link SBMLDocument} if no Version is explicitly specified at the time of
  * the construction of an {@link SBMLDocument} instance. 
    <p>
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLError.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLError.java
index 7e21b90f..54961761 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLError.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLError.java
@@ -10460,7 +10460,7 @@ defined in SBML.
  * name='SBMLErrorSeverity_t'>Severity codes associated with {@link SBMLError}
  * objects</h3>
  <p>
- * In libSBML version 5.17.2
+ * In libSBML version 5.18.0
  * there are no additional severity codes beyond those defined by {@link XMLError}.
  * They are implemented as static integer constants defined in the interface
  * class <code><a href='libsbmlConstants.html'>libsbmlConstants</a></code>,
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLFunctionDefinitionConverter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLFunctionDefinitionConverter.java
index 0bf6dc6c..41bca59b 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLFunctionDefinitionConverter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLFunctionDefinitionConverter.java
@@ -133,7 +133,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLIdConverter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLIdConverter.java
index e0c61862..70d4b33f 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLIdConverter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLIdConverter.java
@@ -133,7 +133,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLInferUnitsConverter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLInferUnitsConverter.java
index efc1db7e..800a7a3d 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLInferUnitsConverter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLInferUnitsConverter.java
@@ -110,7 +110,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLInitialAssignmentConverter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLInitialAssignmentConverter.java
index 538b4366..3a5d13bc 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLInitialAssignmentConverter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLInitialAssignmentConverter.java
@@ -141,7 +141,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLLevel1Version1Converter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLLevel1Version1Converter.java
index 11762406..9c409dbd 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLLevel1Version1Converter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLLevel1Version1Converter.java
@@ -137,7 +137,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLLevelVersionConverter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLLevelVersionConverter.java
index cba56404..3f416510 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLLevelVersionConverter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLLevelVersionConverter.java
@@ -139,7 +139,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLLocalParameterConverter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLLocalParameterConverter.java
index eeb4223e..77025f7f 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLLocalParameterConverter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLLocalParameterConverter.java
@@ -117,7 +117,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLReactionConverter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLReactionConverter.java
index f634274c..51bf1caf 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLReactionConverter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLReactionConverter.java
@@ -112,7 +112,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLRuleConverter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLRuleConverter.java
index b593cd50..0f054d3c 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLRuleConverter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLRuleConverter.java
@@ -140,7 +140,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLStripPackageConverter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLStripPackageConverter.java
index 33bda5c9..2af8bcc8 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLStripPackageConverter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLStripPackageConverter.java
@@ -129,7 +129,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/SBMLUnitsConverter.java b/src/bindings/java/java-files/org/sbml/libsbml/SBMLUnitsConverter.java
index cdeb59fb..6b6e8d6f 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/SBMLUnitsConverter.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/SBMLUnitsConverter.java
@@ -126,7 +126,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/libsbmlConstants.java b/src/bindings/java/java-files/org/sbml/libsbml/libsbmlConstants.java
index 8edb0db8..c88361e6 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/libsbmlConstants.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/libsbmlConstants.java
@@ -9,9 +9,9 @@
 package org.sbml.libsbml;
 
 public interface libsbmlConstants {
-  public final static String LIBSBML_DOTTED_VERSION = "5.17.2";
-  public final static int LIBSBML_VERSION = 51702;
-  public final static String LIBSBML_VERSION_STRING = "51702";
+  public final static String LIBSBML_DOTTED_VERSION = "5.18.0";
+  public final static int LIBSBML_VERSION = 51800;
+  public final static String LIBSBML_VERSION_STRING = "51800";
   // OperationReturnValues_t 
   public final static int LIBSBML_OPERATION_SUCCESS = 0;
   public final static int LIBSBML_INDEX_EXCEEDS_SIZE = -1;
@@ -351,6 +351,7 @@ public interface libsbmlConstants {
   public final static int InvalidFunctionDefReturnType = 20305;
   public final static int OneMathElementPerFunc = 20306;
   public final static int AllowedAttributesOnFunc = 20307;
+  public final static int OnlyCiInsideBVar = 99304;
   public final static int InvalidUnitDefId = 20401;
   public final static int InvalidSubstanceRedefinition = 20402;
   public final static int InvalidLengthRedefinition = 20403;
@@ -643,6 +644,7 @@ public interface libsbmlConstants {
   public final static int MultiplierNotValidAttribute = 99924;
   public final static int OffsetNotValidAttribute = 99925;
   public final static int L3SpatialDimensionsUnset = 99926;
+  public final static int OperationInterrupted = 99950;
   public final static int UnknownCoreAttribute = 99994;
   public final static int UnknownPackageAttribute = 99995;
   public final static int PackageConversionNotSupported = 99996;
diff --git a/src/bindings/java/java-files/org/sbml/libsbml/libsbmlJNI.java b/src/bindings/java/java-files/org/sbml/libsbml/libsbmlJNI.java
index 8d3c4495..c03da062 100644
--- a/src/bindings/java/java-files/org/sbml/libsbml/libsbmlJNI.java
+++ b/src/bindings/java/java-files/org/sbml/libsbml/libsbmlJNI.java
@@ -2457,6 +2457,19 @@ public class libsbmlJNI {
   public final static native long SBMLExtensionRegistry_getASTPlugins(long jarg1, SBMLExtensionRegistry jarg1_);
   public final static native long SBMLExtensionRegistry_getNumASTPlugins(long jarg1, SBMLExtensionRegistry jarg1_);
   public final static native long SBMLExtensionRegistry_getASTPlugin(long jarg1, SBMLExtensionRegistry jarg1_, long jarg2);
+  public final static native void delete_Callback(long jarg1);
+  public final static native int Callback_process(long jarg1, Callback jarg1_, long jarg2, SBMLDocument jarg2_);
+  public final static native int Callback_processSwigExplicitCallback(long jarg1, Callback jarg1_, long jarg2, SBMLDocument jarg2_);
+  public final static native long new_Callback();
+  public final static native void Callback_director_connect(Callback obj, long cptr, boolean mem_own, boolean weak_global);
+  public final static native void Callback_change_ownership(Callback obj, long cptr, boolean take_or_release);
+  public final static native int CallbackRegistry_invokeCallbacks(long jarg1, SBMLDocument jarg1_);
+  public final static native void CallbackRegistry_clearCallbacks();
+  public final static native void CallbackRegistry_addCallback(long jarg1, Callback jarg1_);
+  public final static native int CallbackRegistry_getNumCallbacks();
+  public final static native void CallbackRegistry_removeCallback__SWIG_0(int jarg1);
+  public final static native void CallbackRegistry_removeCallback__SWIG_1(long jarg1, Callback jarg1_);
+  public final static native void delete_CallbackRegistry(long jarg1);
   public final static native long new_ASTNode__SWIG_0(int jarg1);
   public final static native long new_ASTNode__SWIG_1();
   public final static native long new_ASTNode__SWIG_2(long jarg1, ASTNode jarg1_);
@@ -2574,8 +2587,9 @@ public class libsbmlJNI {
   public final static native void ASTNode_loadASTPlugin(long jarg1, ASTNode jarg1_, String jarg2);
   public final static native long ASTNode_getASTPlugin__SWIG_0(long jarg1, ASTNode jarg1_, long jarg2, SBMLNamespaces jarg2_);
   public final static native long ASTNode_getASTPlugin__SWIG_1(long jarg1, ASTNode jarg1_, int jarg2);
-  public final static native long ASTNode_getASTPlugin__SWIG_2(long jarg1, ASTNode jarg1_, String jarg2, boolean jarg3);
-  public final static native long ASTNode_getASTPlugin__SWIG_3(long jarg1, ASTNode jarg1_, String jarg2);
+  public final static native long ASTNode_getASTPlugin__SWIG_2(long jarg1, ASTNode jarg1_, String jarg2, boolean jarg3, boolean jarg4);
+  public final static native long ASTNode_getASTPlugin__SWIG_3(long jarg1, ASTNode jarg1_, String jarg2, boolean jarg3);
+  public final static native long ASTNode_getASTPlugin__SWIG_4(long jarg1, ASTNode jarg1_, String jarg2);
   public final static native long ASTNode_getPlugin__SWIG_0(long jarg1, ASTNode jarg1_, String jarg2);
   public final static native long ASTNode_getPlugin__SWIG_2(long jarg1, ASTNode jarg1_, long jarg2);
   public final static native long ASTNode_getNumPlugins(long jarg1, ASTNode jarg1_);
@@ -2622,6 +2636,21 @@ public class libsbmlJNI {
   public final static native void L3ParserSettings_setParsePackageMath(long jarg1, L3ParserSettings jarg1_, int jarg2, boolean jarg3);
   public final static native boolean L3ParserSettings_getParsePackageMath(long jarg1, L3ParserSettings jarg1_, int jarg2);
   public final static native void L3ParserSettings_visitPackageInfixSyntax(long jarg1, L3ParserSettings jarg1_, long jarg2, ASTNode jarg2_, long jarg3, ASTNode jarg3_, long jarg4);
+  public final static native long DefinitionURLRegistry_getInstance();
+  public final static native int DefinitionURLRegistry_addDefinitionURL(String jarg1, int jarg2);
+  public final static native int DefinitionURLRegistry_getNumDefinitionURLs();
+  public final static native void DefinitionURLRegistry_addSBMLDefinitions();
+  public final static native void delete_DefinitionURLRegistry(long jarg1);
+  public final static native boolean DefinitionURLRegistry_getCoreDefinitionsAdded();
+  public final static native int DefinitionURLRegistry_getType(String jarg1);
+  public final static native String DefinitionURLRegistry_getDefinitionUrlByIndex(int jarg1);
+  public final static native void DefinitionURLRegistry_clearDefinitions();
+  public final static native long new_MathFilter();
+  public final static native void delete_MathFilter(long jarg1);
+  public final static native boolean MathFilter_filter(long jarg1, MathFilter jarg1_, long jarg2, SBase jarg2_);
+  public final static native boolean MathFilter_filterSwigExplicitMathFilter(long jarg1, MathFilter jarg1_, long jarg2, SBase jarg2_);
+  public final static native void MathFilter_director_connect(MathFilter obj, long cptr, boolean mem_own, boolean weak_global);
+  public final static native void MathFilter_change_ownership(MathFilter obj, long cptr, boolean take_or_release);
   public final static native void ASTNodeValues_t_name_set(long jarg1, ASTNodeValues_t jarg1_, String jarg2);
   public final static native String ASTNodeValues_t_name_get(long jarg1, ASTNodeValues_t jarg1_);
   public final static native void ASTNodeValues_t_type_set(long jarg1, ASTNodeValues_t jarg1_, int jarg2);
@@ -2643,7 +2672,8 @@ public class libsbmlJNI {
   public final static native int ASTBasePlugin_getASTNodeTypeForCSymbolURL(long jarg1, ASTBasePlugin jarg1_, String jarg2);
   public final static native boolean ASTBasePlugin_hasCorrectNamespace(long jarg1, ASTBasePlugin jarg1_, long jarg2, SBMLNamespaces jarg2_);
   public final static native boolean ASTBasePlugin_defines__SWIG_0(long jarg1, ASTBasePlugin jarg1_, int jarg2);
-  public final static native boolean ASTBasePlugin_defines__SWIG_1(long jarg1, ASTBasePlugin jarg1_, String jarg2);
+  public final static native boolean ASTBasePlugin_defines__SWIG_1(long jarg1, ASTBasePlugin jarg1_, String jarg2, boolean jarg3);
+  public final static native boolean ASTBasePlugin_defines__SWIG_2(long jarg1, ASTBasePlugin jarg1_, String jarg2);
   public final static native boolean ASTBasePlugin_isFunction(long jarg1, ASTBasePlugin jarg1_, int jarg2);
   public final static native boolean ASTBasePlugin_isLogical(long jarg1, ASTBasePlugin jarg1_, int jarg2);
   public final static native boolean ASTBasePlugin_isMathMLNodeTag__SWIG_0(long jarg1, ASTBasePlugin jarg1_, String jarg2);
@@ -2652,6 +2682,7 @@ public class libsbmlJNI {
   public final static native double ASTBasePlugin_evaluateASTNode__SWIG_0(long jarg1, ASTBasePlugin jarg1_, long jarg2, ASTNode jarg2_, long jarg3, Model jarg3_);
   public final static native double ASTBasePlugin_evaluateASTNode__SWIG_1(long jarg1, ASTBasePlugin jarg1_, long jarg2, ASTNode jarg2_);
   public final static native long ASTBasePlugin_getUnitDefinitionFromPackage(long jarg1, ASTBasePlugin jarg1_, long jarg2, long jarg3, ASTNode jarg3_, boolean jarg4, int jarg5);
+  public final static native long ASTBasePlugin_getASTNodeValue(long jarg1, ASTBasePlugin jarg1_, long jarg2);
   public final static native int ASTBasePlugin_allowedInFunctionDefinition(long jarg1, ASTBasePlugin jarg1_, int jarg2);
   public final static native void delete_ASTBasePlugin(long jarg1);
   public final static native long ASTBasePlugin_cloneObject(long jarg1, ASTBasePlugin jarg1_);
@@ -2795,6 +2826,7 @@ public class libsbmlJNI {
   public final static native long SBMLError_SWIGUpcast(long jarg1);
   public final static native long ISBMLExtensionNamespaces_SWIGUpcast(long jarg1);
   public final static native long SBMLDocumentPlugin_SWIGUpcast(long jarg1);
+  public final static native long MathFilter_SWIGUpcast(long jarg1);
   public final static native long L3v2extendedmathPkgNamespaces_SWIGUpcast(long jarg1);
   public final static native long L3v2extendedmathExtension_SWIGUpcast(long jarg1);
   public final static native long L3v2extendedmathSBMLDocumentPlugin_SWIGUpcast(long jarg1);
@@ -2854,6 +2886,12 @@ public class libsbmlJNI {
   public static void SwigDirector_SBMLValidator_clearFailures(SBMLValidator jself) {
     jself.clearFailures();
   }
+  public static int SwigDirector_Callback_process(Callback jself, long doc) {
+    return jself.process((doc == 0) ? null : new SBMLDocument(doc, false));
+  }
+  public static boolean SwigDirector_MathFilter_filter(MathFilter jself, long element) {
+    return jself.filter((element == 0) ? null : new SBase(element, false));
+  }
 
   private final static native void swig_module_init();
   static {
diff --git a/src/bindings/java/javadoc.i b/src/bindings/java/javadoc.i
index 2cc04dfa..40d9b6d8 100644
--- a/src/bindings/java/javadoc.i
+++ b/src/bindings/java/javadoc.i
@@ -2347,7 +2347,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers SBase::getAncestorOfType(int type, const std::string pkgName = "core") "
+%javamethodmodifiers SBase::getAncestorOfType(int type, const std::string& pkgName = "core") "
 /**
    * Returns the first ancestor object that has the given SBML type code from the given package.
    <p>
@@ -3402,7 +3402,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers SBase::removeTopLevelAnnotationElement(const std::string elementName, const std::string elementURI = "", bool removeEmpty = true) "
+%javamethodmodifiers SBase::removeTopLevelAnnotationElement(const std::string& elementName, const std::string elementURI = "", bool removeEmpty = true) "
 /**
    * Removes the top-level element within the \'annotation\' subelement of this
    * SBML object with the given name and optional URI.
@@ -5559,12 +5559,12 @@ newModel.addSpecies(s1);
 ";
 
 
-%javamethodmodifiers SBase::logError(  unsigned int       id , const unsigned int level   = 2 , const unsigned int version = 3 , const std::string& details = "" ) "
+%javamethodmodifiers SBase::logError(  unsigned int       id , const unsigned int level   = 2 , const unsigned int version = 3 , const std::string details = "" ) "
 /** * @internal */ public
 ";
 
 
-%javamethodmodifiers SBase::logUnknownAttribute( const std::string& attribute, const unsigned int level, const unsigned int version, const std::string& element, const std::string& prefix="") "
+%javamethodmodifiers SBase::logUnknownAttribute( const std::string& attribute, const unsigned int level, const unsigned int version, const std::string& element, const std::string prefix="") "
 /** * @internal */ public
 ";
 
@@ -5619,7 +5619,7 @@ newModel.addSpecies(s1);
 ";
 
 
-%javamethodmodifiers SBase::checkDefaultNamespace(const XMLNamespaces* xmlns, const std::string& elementName, const std::string& prefix = "") "
+%javamethodmodifiers SBase::checkDefaultNamespace(const XMLNamespaces* xmlns, const std::string& elementName, const std::string prefix = "") "
 /** * @internal */ public
 ";
 
@@ -6340,7 +6340,7 @@ appears in the documentation.
  * within the model, the list must not be empty; that is, it must have
  * length one or more.  The following are the components and lists
  * permitted in different Levels and Versions of SBML in
- * version 5.17.2
+ * version 5.18.0
  * of libSBML:
  * <ul>
  * <li> In SBML Level 1, the components are: {@link UnitDefinition}, {@link Compartment},
@@ -6449,7 +6449,7 @@ sp.setId(&#34;BestSpeciesEver&#34;);
  * <h2>Consistency and adherence to SBML specifications</h2>
  <p>
  * To make it easier for applications to do whatever they need,
- * libSBML version 5.17.2
+ * libSBML version 5.18.0
  * is relatively lax when it comes to enforcing correctness and
  * completeness of models <em>during</em> model construction and editing.
  * Essentially, libSBML <em>will</em> <em>not</em> in most cases check automatically
@@ -11266,7 +11266,7 @@ sp.setId(&#34;BestSpeciesEver&#34;);
    <p>
    * <p>
  * This \'default Level\' corresponds to the most recent SBML specification
- * Level available at the time libSBML version 5.17.2 was released.  The default Level is used by
+ * Level available at the time libSBML version 5.18.0 was released.  The default Level is used by
  * {@link SBMLDocument} if no Level is explicitly specified at the time of the
  * construction of an {@link SBMLDocument} instance.
    <p>
@@ -11286,7 +11286,7 @@ sp.setId(&#34;BestSpeciesEver&#34;);
    * <p>
  * This \'default Version\' corresponds to the most recent Version within the
  * most recent Level of SBML available at the time libSBML version
- * 5.17.2 was released.  The default Version is
+ * 5.18.0 was released.  The default Version is
  * used by {@link SBMLDocument} if no Version is explicitly specified at the time of
  * the construction of an {@link SBMLDocument} instance. 
    <p>
@@ -11661,7 +11661,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers SBMLDocument::createModel(const std::string& sid = "") "
+%javamethodmodifiers SBMLDocument::createModel(const std::string sid = "") "
 /**
    * Creates a new {@link Model} inside this {@link SBMLDocument}, and returns a pointer to
    * it.
@@ -27765,7 +27765,7 @@ attributes.</caption>
    <p>
    * The returned value can be any of a number of different strings,
    * depending on the SBML Level in use and the kind of {@link Rule} object this
-   * is.  The rules as of libSBML version 5.17.2
+   * is.  The rules as of libSBML version 5.18.0
    * are the following:
    * <ul>
    * <li> (Level&nbsp;2 and&nbsp;3) RateRule: returns <code>\'rateRule\'</code>
@@ -31377,7 +31377,7 @@ attributes.</caption>
 ";
 
 
-%javamethodmodifiers Reaction::addReactant(const Species* species, double stoichiometry = 1.0, const std::string& id = "", bool constant = true) "
+%javamethodmodifiers Reaction::addReactant(const Species* species, double stoichiometry = 1.0, const std::string id = "", bool constant = true) "
 /**
    * Adds the given species as a reactant with the given stoichiometry
    <p>
@@ -31459,7 +31459,7 @@ attributes.</caption>
 ";
 
 
-%javamethodmodifiers Reaction::addProduct(const Species* species, double stoichiometry = 1.0, const std::string& id = "", bool constant = true) "
+%javamethodmodifiers Reaction::addProduct(const Species* species, double stoichiometry = 1.0, const std::string id = "", bool constant = true) "
 /**
    * Adds the given species as a product with the given stoichiometry
    <p>
@@ -31544,7 +31544,7 @@ attributes.</caption>
 ";
 
 
-%javamethodmodifiers Reaction::addModifier(const Species *species, const std::string &id = "") "
+%javamethodmodifiers Reaction::addModifier(const Species *species, const std::string id = "") "
 /**
    * Adds the given species as a modifier to this reaction
    <p>
@@ -40775,7 +40775,7 @@ defined in SBML.
 ";
 
 
-%javamethodmodifiers SBO::writeTerm(XMLOutputStream& stream, int sboTerm, const std::string& prefix = "") "
+%javamethodmodifiers SBO::writeTerm(XMLOutputStream& stream, int sboTerm, const std::string prefix = "") "
 /** * @internal */ public
 ";
 
@@ -42263,7 +42263,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers SBMLNamespaces::SBMLNamespaces(unsigned int level, unsigned int version, const std::string &pkgName, unsigned int pkgVersion, const std::string& pkgPrefix = "") "
+%javamethodmodifiers SBMLNamespaces::SBMLNamespaces(unsigned int level, unsigned int version, const std::string &pkgName, unsigned int pkgVersion, const std::string pkgPrefix = "") "
 /**
    * (For extensions) Creates a new {@link SBMLNamespaces} object corresponding to
    * the combination of (1) the given SBML <code>level</code> and <code>version</code>, and (2)
@@ -42852,7 +42852,7 @@ the implementation of extra functionality provided by libSBML.
 "
 
 
-%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, const std::string& value="", ConversionOptionType_t type=CNV_TYPE_STRING, const std::string& description="") "
+%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, const std::string value="", ConversionOptionType_t type=CNV_TYPE_STRING, const std::string description="") "
 /**
    * Creates a new {@link ConversionOption}.
    <p>
@@ -42888,7 +42888,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, const char* value, const std::string& description="") "
+%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, const char* value, const std::string description="") "
 /**
    * Creates a new {@link ConversionOption} specialized for string-type options.
    <p>
@@ -42914,7 +42914,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, bool value, const std::string& description="") "
+%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, bool value, const std::string description="") "
 /**
    * Creates a new {@link ConversionOption} specialized for Boolean-type options.
    <p>
@@ -42940,7 +42940,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, double value, const std::string& description="") "
+%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, double value, const std::string description="") "
 /**
    * Creates a new {@link ConversionOption} specialized for double-type options.
    <p>
@@ -42966,7 +42966,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, float value, const std::string& description="") "
+%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, float value, const std::string description="") "
 /**
    * Creates a new {@link ConversionOption} specialized for float-type options.
    <p>
@@ -42992,7 +42992,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, int value, const std::string& description="") "
+%javamethodmodifiers ConversionOption::ConversionOption(const std::string& key, int value, const std::string description="") "
 /**
    * Creates a new {@link ConversionOption} specialized for integer-type options.
    <p>
@@ -43303,7 +43303,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  <p>
@@ -43438,7 +43438,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers ConversionProperties::addOption(const std::string& key, const std::string& value="", ConversionOptionType_t type=CNV_TYPE_STRING, const std::string& description="") "
+%javamethodmodifiers ConversionProperties::addOption(const std::string& key, const std::string value="", ConversionOptionType_t type=CNV_TYPE_STRING, const std::string description="") "
 /**
    * Adds a new {@link ConversionOption} object with the given parameters.
    <p>
@@ -43466,7 +43466,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers ConversionProperties::addOption(const std::string& key, const char* value, const std::string& description="") "
+%javamethodmodifiers ConversionProperties::addOption(const std::string& key, const char* value, const std::string description="") "
 /**
    * Adds a new {@link ConversionOption} object with the given parameters.
    <p>
@@ -43492,7 +43492,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers ConversionProperties::addOption(const std::string& key, bool value, const std::string& description="") "
+%javamethodmodifiers ConversionProperties::addOption(const std::string& key, bool value, const std::string description="") "
 /**
    * Adds a new {@link ConversionOption} object with the given parameters.
    <p>
@@ -43518,7 +43518,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers ConversionProperties::addOption(const std::string& key, double value, const std::string& description="") "
+%javamethodmodifiers ConversionProperties::addOption(const std::string& key, double value, const std::string description="") "
 /**
    * Adds a new {@link ConversionOption} object with the given parameters.
    <p>
@@ -43544,7 +43544,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers ConversionProperties::addOption(const std::string& key, float value, const std::string& description="") "
+%javamethodmodifiers ConversionProperties::addOption(const std::string& key, float value, const std::string description="") "
 /**
    * Adds a new {@link ConversionOption} object with the given parameters.
    <p>
@@ -43570,7 +43570,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers ConversionProperties::addOption(const std::string& key, int value, const std::string& description="") "
+%javamethodmodifiers ConversionProperties::addOption(const std::string& key, int value, const std::string description="") "
 /**
    * Adds a new {@link ConversionOption} object with the given parameters.
    <p>
@@ -43836,7 +43836,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -44300,7 +44300,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -44531,7 +44531,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -44735,7 +44735,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -44974,7 +44974,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -45205,7 +45205,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -45525,7 +45525,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -45746,7 +45746,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -45950,7 +45950,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -46247,7 +46247,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -46468,7 +46468,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -46706,7 +46706,7 @@ if (config != None) {
  <p>
  * LibSBML provides a number of built-in converters; by convention, their
  * names end in <em>Converter</em>. The following are the built-in converters
- * provided by libSBML 5.17.2:
+ * provided by libSBML 5.18.0:
  <p>
  * @copydetails doc_list_of_libsbml_converters
  */
@@ -47324,7 +47324,7 @@ defined in SBML.
 ";
 
 
-%javamethodmodifiers XMLAttributes::add(  const std::string& name , const std::string& value , const std::string& namespaceURI = "" , const std::string& prefix = "") "
+%javamethodmodifiers XMLAttributes::add(  const std::string& name , const std::string& value , const std::string namespaceURI = "" , const std::string prefix = "") "
 /**
    * Adds an attribute to this list of attributes.
    <p>
@@ -47653,7 +47653,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%javamethodmodifiers XMLAttributes::remove(const std::string& name, const std::string& uri = "") "
+%javamethodmodifiers XMLAttributes::remove(const std::string& name, const std::string uri = "") "
 /**
    * Removes a named attribute from this list of attributes.
    <p>
@@ -47970,7 +47970,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%javamethodmodifiers XMLAttributes::getValue(const std::string name) const "
+%javamethodmodifiers XMLAttributes::getValue(const std::string& name) const "
 /**
    * Returns a named attribute\'s value.
    <p>
@@ -47998,7 +47998,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%javamethodmodifiers XMLAttributes::getValue(const std::string name, const std::string uri) const "
+%javamethodmodifiers XMLAttributes::getValue(const std::string& name, const std::string& uri) const "
 /**
    * Returns a named attribute\'s value.
    <p>
@@ -48063,7 +48063,7 @@ foo:myattribute=\'7\'
 ";
 
 
-%javamethodmodifiers XMLAttributes::hasAttribute(const std::string name, const std::string uri="") const "
+%javamethodmodifiers XMLAttributes::hasAttribute(const std::string& name, const std::string uri="") const "
 /**
    * Returns <code>true</code> if an attribute with a given name and namespace URI
    * exists.
@@ -49173,7 +49173,7 @@ defined in SBML.
 ";
 
 
-%javamethodmodifiers XMLNamespaces::add(const std::string& uri, const std::string& prefix = "") "
+%javamethodmodifiers XMLNamespaces::add(const std::string& uri, const std::string prefix = "") "
 /**
    * Appends an XML namespace prefix and URI pair to this list of namespace
    * declarations.
@@ -49281,7 +49281,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLNamespaces::getIndex(const std::string uri) const "
+%javamethodmodifiers XMLNamespaces::getIndex(const std::string& uri) const "
 /**
    * Look up the index of an XML namespace declaration by URI.
    <p>
@@ -49297,14 +49297,14 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLNamespaces::containsUri(const std::string uri) const "
+%javamethodmodifiers XMLNamespaces::containsUri(const std::string& uri) const "
 /**
    * Tests whether the given uri is contained in this set of namespaces. 
    */ public
 ";
 
 
-%javamethodmodifiers XMLNamespaces::getIndexByPrefix(const std::string prefix) const "
+%javamethodmodifiers XMLNamespaces::getIndexByPrefix(const std::string& prefix) const "
 /**
    * Look up the index of an XML namespace declaration by <code>prefix</code>.
    <p>
@@ -49400,7 +49400,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLNamespaces::getURI(const std::string& prefix = "") const "
+%javamethodmodifiers XMLNamespaces::getURI(const std::string prefix = "") const "
 /**
    * Look up the URI of an XML namespace declaration by its prefix.
    <p>
@@ -49751,7 +49751,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLToken::addAttr(  const std::string& name , const std::string& value , const std::string& namespaceURI = "" , const std::string& prefix = "") "
+%javamethodmodifiers XMLToken::addAttr(  const std::string& name , const std::string& value , const std::string namespaceURI = "" , const std::string prefix = "") "
 /**
    * Adds an attribute to the XML element represented by this token.
    <p>
@@ -49877,7 +49877,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLToken::removeAttr(const std::string& name, const std::string& uri = "") "
+%javamethodmodifiers XMLToken::removeAttr(const std::string& name, const std::string uri = "") "
 /**
    * Removes an attribute from the XML element represented by this token.
    <p>
@@ -49957,7 +49957,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLToken::getAttrIndex(const std::string& name, const std::string& uri="") const "
+%javamethodmodifiers XMLToken::getAttrIndex(const std::string& name, const std::string uri="") const "
 /**
    * Returns the index of the attribute with the given name and namespace
    * URI.
@@ -50121,7 +50121,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLToken::getAttrValue(const std::string name, const std::string uri="") const "
+%javamethodmodifiers XMLToken::getAttrValue(const std::string& name, const std::string uri="") const "
 /**
    * Returns the value of the attribute with a given name and XML namespace URI.
    <p>
@@ -50186,7 +50186,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLToken::hasAttr(const std::string name, const std::string uri="") const "
+%javamethodmodifiers XMLToken::hasAttr(const std::string& name, const std::string uri="") const "
 /**
    * Returns <code>true</code> if an attribute with a given name and namespace URI
    * exists.
@@ -50279,7 +50279,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLToken::addNamespace(const std::string& uri, const std::string& prefix = "") "
+%javamethodmodifiers XMLToken::addNamespace(const std::string& uri, const std::string prefix = "") "
 /**
    * Appends an XML namespace declaration to this token.
    <p>
@@ -50492,7 +50492,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLToken::getNamespaceURI(const std::string& prefix = "") const "
+%javamethodmodifiers XMLToken::getNamespaceURI(const std::string prefix = "") const "
 /**
    * Returns the URI of an XML namespace with a given prefix.
    <p>
@@ -51606,7 +51606,7 @@ public class test
 "
 
 
-%javamethodmodifiers XMLOutputStream::XMLOutputStream(std::ostream&       stream , const std::string&  encoding       = "UTF-8" , bool                writeXMLDecl   = true , const std::string&  programName    = "" , const std::string&  programVersion = "") "
+%javamethodmodifiers XMLOutputStream::XMLOutputStream(std::ostream&       stream , const std::string  encoding       = "UTF-8" , bool                writeXMLDecl   = true , const std::string  programName    = "" , const std::string  programVersion = "") "
 /**
    * Creates a new {@link XMLOutputStream} that wraps the given <code>stream</code>.
    <p>
@@ -51669,7 +51669,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLOutputStream::endElement(const std::string& name, const std::string& prefix = "") "
+%javamethodmodifiers XMLOutputStream::endElement(const std::string& name, const std::string prefix = "") "
 /**
    * Writes the given XML end element name to this {@link XMLOutputStream}.
    <p>
@@ -51716,7 +51716,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLOutputStream::startElement(const std::string& name, const std::string& prefix = "") "
+%javamethodmodifiers XMLOutputStream::startElement(const std::string& name, const std::string prefix = "") "
 /**
    * Writes the given XML start element name to this {@link XMLOutputStream}.
    <p>
@@ -51754,7 +51754,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLOutputStream::startEndElement(const std::string& name, const std::string& prefix = "") "
+%javamethodmodifiers XMLOutputStream::startEndElement(const std::string& name, const std::string prefix = "") "
 /**
    * Writes the given XML start and end element name to this {@link XMLOutputStream}.
    <p>
@@ -52254,7 +52254,7 @@ on yyyy-MM-dd HH:mm with libSBML version &lt;libsbml version&gt;. --&gt;
 ";
 
 
-%javamethodmodifiers XMLOutputStream::writeName(const std::string& name, const std::string& prefix = "") "
+%javamethodmodifiers XMLOutputStream::writeName(const std::string& name, const std::string prefix = "") "
 /** * @internal */ public
 ";
 
@@ -52309,7 +52309,7 @@ on yyyy-MM-dd HH:mm with libSBML version &lt;libsbml version&gt;. --&gt;
 ";
 
 
-%javamethodmodifiers XMLOutputStringStream::XMLOutputStringStream(  std::ostringstream& stream , const std::string&  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string&  programName  = "" , const std::string&  programVersion = "") "
+%javamethodmodifiers XMLOutputStringStream::XMLOutputStringStream(  std::ostringstream& stream , const std::string  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string  programName  = "" , const std::string  programVersion = "") "
 /** * @internal */ public
 ";
 
@@ -52319,17 +52319,17 @@ on yyyy-MM-dd HH:mm with libSBML version &lt;libsbml version&gt;. --&gt;
 ";
 
 
-%javamethodmodifiers XMLOwningOutputStringStream::XMLOwningOutputStringStream(  const std::string&  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string&  programName  = "" , const std::string&  programVersion = "") "
+%javamethodmodifiers XMLOwningOutputStringStream::XMLOwningOutputStringStream(  const std::string  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string  programName  = "" , const std::string  programVersion = "") "
 /** * @internal */ public
 ";
 
 
-%javamethodmodifiers XMLOutputFileStream::XMLOutputFileStream(  std::ofstream&      stream , const std::string&  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string&  programName  = "" , const std::string&  programVersion = "") "
+%javamethodmodifiers XMLOutputFileStream::XMLOutputFileStream(  std::ofstream&      stream , const std::string  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string  programName  = "" , const std::string  programVersion = "") "
 /** * @internal */ public
 ";
 
 
-%javamethodmodifiers XMLOwningOutputFileStream::XMLOwningOutputFileStream(const std::string&  filename , const std::string&  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string&  programName  = "" , const std::string&  programVersion = "") "
+%javamethodmodifiers XMLOwningOutputFileStream::XMLOwningOutputFileStream(const std::string&  filename , const std::string  encoding     = "UTF-8" , bool                writeXMLDecl = true , const std::string  programName  = "" , const std::string  programVersion = "") "
 /** * @internal */ public
 ";
 
@@ -52594,7 +52594,7 @@ appears in the documentation.
 ";
 
 
-%javamethodmodifiers XMLInputStream::determineNumberChildren(const std::string& elementName = "") "
+%javamethodmodifiers XMLInputStream::determineNumberChildren(const std::string elementName = "") "
 /**
    * Returns the number of child tokens of the given element in this stream.
    <p>
@@ -52948,7 +52948,7 @@ defined in SBML.
 "
 
 
-%javamethodmodifiers XMLError::XMLError( const int errorId           = 0 , const std::string& details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_FATAL , const unsigned int category = LIBSBML_CAT_INTERNAL ) "
+%javamethodmodifiers XMLError::XMLError( const int errorId           = 0 , const std::string details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_FATAL , const unsigned int category = LIBSBML_CAT_INTERNAL ) "
 /**
    * Creates a new {@link XMLError} to report that something occurred during XML
    * processing.
@@ -53992,12 +53992,12 @@ defined in SBML.
 ";
 
 
-%javamethodmodifiers SBMLErrorLog::logError( const unsigned int errorId  = 0 , const unsigned int level    = SBML_DEFAULT_LEVEL , const unsigned int version  = SBML_DEFAULT_VERSION , const std::string& details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_ERROR , const unsigned int category = LIBSBML_CAT_SBML ) "
+%javamethodmodifiers SBMLErrorLog::logError( const unsigned int errorId  = 0 , const unsigned int level    = SBML_DEFAULT_LEVEL , const unsigned int version  = SBML_DEFAULT_VERSION , const std::string details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_ERROR , const unsigned int category = LIBSBML_CAT_SBML ) "
 /** * @internal */ public
 ";
 
 
-%javamethodmodifiers SBMLErrorLog::logPackageError( const std::string& package    = "core" , const unsigned int errorId    = 0 , const unsigned int pkgVersion = 1 , const unsigned int level      = SBML_DEFAULT_LEVEL , const unsigned int version    = SBML_DEFAULT_VERSION , const std::string& details    = "" , const unsigned int line       = 0 , const unsigned int column     = 0 , const unsigned int severity   = LIBSBML_SEV_ERROR , const unsigned int category   = LIBSBML_CAT_SBML ) "
+%javamethodmodifiers SBMLErrorLog::logPackageError( const std::string package    = "core" , const unsigned int errorId    = 0 , const unsigned int pkgVersion = 1 , const unsigned int level      = SBML_DEFAULT_LEVEL , const unsigned int version    = SBML_DEFAULT_VERSION , const std::string details    = "" , const unsigned int line       = 0 , const unsigned int column     = 0 , const unsigned int severity   = LIBSBML_SEV_ERROR , const unsigned int category   = LIBSBML_CAT_SBML ) "
 /** * @internal */ public
 ";
 
@@ -64500,7 +64500,7 @@ defined in SBML.
  * name=\'SBMLErrorSeverity_t\'>Severity codes associated with {@link SBMLError}
  * objects</h3>
  <p>
- * In libSBML version 5.17.2
+ * In libSBML version 5.18.0
  * there are no additional severity codes beyond those defined by {@link XMLError}.
  * They are implemented as static integer constants defined in the interface
  * class <code><a href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>,
@@ -64509,7 +64509,7 @@ defined in SBML.
 "
 
 
-%javamethodmodifiers SBMLError::SBMLError( const unsigned int errorId  = 0 , const unsigned int level    = SBML_DEFAULT_LEVEL , const unsigned int version  = SBML_DEFAULT_VERSION , const std::string& details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_ERROR , const unsigned int category = LIBSBML_CAT_SBML , const std::string& package  = "core" , const unsigned int pkgVersion = 1 ) "
+%javamethodmodifiers SBMLError::SBMLError( const unsigned int errorId  = 0 , const unsigned int level    = SBML_DEFAULT_LEVEL , const unsigned int version  = SBML_DEFAULT_VERSION , const std::string details  = "" , const unsigned int line     = 0 , const unsigned int column   = 0 , const unsigned int severity = LIBSBML_SEV_ERROR , const unsigned int category = LIBSBML_CAT_SBML , const std::string package  = "core" , const unsigned int pkgVersion = 1 ) "
 /**
    * Creates a new {@link SBMLError} to report that something occurred during SBML
    * processing.
@@ -69851,6 +69851,89 @@ defined in SBML.
 ";
 
 
+%javamethodmodifiers Callback::process(SBMLDocument* doc) "
+/**
+	 * The processing function to be implemented by the callback
+	 <p>
+	 * In order to stop processing return a value other than 
+	 * LIBSBML_OPERATION_SUCCESS. 
+	 <p>
+	 * @return LIBSBML_OPERATION_SUCCESS to continue the operations
+	 *         any other value to stop
+	 */ public
+";
+
+
+%javamethodmodifiers CallbackRegistry::invokeCallbacks(SBMLDocument* doc) "
+/**
+	 * Invokes all registered callbacks on the given document. If the callbacks indicate
+	 * that processing should be stopped they return a value other than operation success.
+	 <p>
+	 * @return LIBSBML_OPERATION_SUCCESS to indicate that processing should be continued, 
+	 *         any other value to stop processing
+	 */ public
+";
+
+
+%javamethodmodifiers CallbackRegistry::clearCallbacks "
+/**
+   * Clears all registered processing callbacks
+   */ public
+";
+
+
+%javamethodmodifiers CallbackRegistry::addCallback(Callback *cb) "
+/**
+   * Registers a new processing callback that will be called with a newly instantiated
+   * ModelDefinition object. This allows for all post processing on it that needs to
+   * happen before integrating it with the target document.
+   <p>
+   * @param cb the callback.
+   */ public
+";
+
+
+%javamethodmodifiers CallbackRegistry::getNumCallbacks "
+/**
+	 * @return the number of registered callbacks.
+	 */ public
+";
+
+
+%javamethodmodifiers CallbackRegistry::removeCallback(int index) "
+/**
+   * Removes the callback with given index.
+   <p>
+   * @param index the index of the callback to be removed from the list.
+   */ public
+";
+
+
+%javamethodmodifiers CallbackRegistry::removeCallback(Callback *cb) "
+/**
+	 * Removes the specified callback from the list of registered callbacks
+	 <p>
+	 * @param cb the callback to be removed.
+	 */ public
+";
+
+
+%javamethodmodifiers CallbackRegistry::getInstance "
+/**
+	 * the static instance of the class
+	 * @internal
+	 */ public
+";
+
+
+%javamethodmodifiers CallbackRegistry::CallbackRegistry "
+/**
+   * protected constructor, use the static methods for access.
+   * @internal
+   */ public
+";
+
+
 %typemap(javaimports) OStream "
 /** 
  * Wrapper class for the C++ standard streams <code>cout</code>,
@@ -71932,7 +72015,7 @@ used to define a number with value <code>10</code> and unit of measurement
 ";
 
 
-%javamethodmodifiers ASTNode::replaceArgument(const std::string bvar, ASTNode * arg) "
+%javamethodmodifiers ASTNode::replaceArgument(const std::string& bvar, ASTNode * arg) "
 /**
    * Replaces occurences of a given name within this {@link ASTNode} with the
    * name/value/formula represented by <code>arg</code>.
@@ -72177,7 +72260,7 @@ used to define a number with value <code>10</code> and unit of measurement
 ";
 
 
-%javamethodmodifiers ASTNode::getASTPlugin(const std::string& name, bool isCsymbol = false) "
+%javamethodmodifiers ASTNode::getASTPlugin(const std::string& name, bool isCsymbol = false, bool strCmpIsCaseSensitive = false) "
 /** */ public
 ";
 
@@ -72192,7 +72275,7 @@ used to define a number with value <code>10</code> and unit of measurement
 ";
 
 
-%javamethodmodifiers ASTNode::getASTPlugin(const std::string& name, bool isCsymbol = false) const "
+%javamethodmodifiers ASTNode::getASTPlugin(const std::string& name, bool isCsymbol = false, bool strCmpIsCaseSensitive = false) const "
 /** */ public
 ";
 
@@ -72222,7 +72305,7 @@ used to define a number with value <code>10</code> and unit of measurement
 ";
 
 
-%javamethodmodifiers ASTNode::containsVariable(const std::string id) const "
+%javamethodmodifiers ASTNode::containsVariable(const std::string& id) const "
 /** * @internal */ public
 ";
 
@@ -75610,6 +75693,121 @@ appears in the documentation.
 ";
 
 
+%typemap(javaimports) DefinitionURLRegistry "
+/** 
+ *  Registry of all libSBML SBML DefinitionURLs.
+ <p>
+ * <p style='color: #777; font-style: italic'>
+This class of objects is defined by libSBML only and has no direct
+equivalent in terms of SBML components.  It is a class used in
+the implementation of extra functionality provided by libSBML.
+</p>
+
+ <p>
+ * LibSBML provides facilities for transforming and converting SBML
+ * documents in various ways.  These transformations can involve
+ * essentially anything that can be written algorithmically; examples
+ * include converting the units of measurement in a model, or converting
+ * from one Level+Version combination of SBML to another.  DefinitionURLs are
+ * implemented as objects derived from the class DefinitionURL.
+ <p>
+ * The DefinitionURL registry, implemented as a singleton object of class
+ * {@link DefinitionURLRegistry}, maintains a list of known DefinitionURLs and provides
+ * methods for discovering them.  Callers can use the method
+ * {@link DefinitionURLRegistry#getNumDefinitionURLs()} to find out how many
+ * DefinitionURLs are registered, then use
+ * {@link DefinitionURLRegistry#getDefinitionURLByIndex(int)} to
+ * iterate over each one; alternatively, callers can use
+ * {@link DefinitionURLRegistry#getDefinitionURLFor(ConversionProperties)}
+ * to search for a DefinitionURL having specific properties.
+ */
+"
+
+
+%javamethodmodifiers DefinitionURLRegistry::getInstance "
+/**
+   * Returns the singleton instance for the DefinitionURL registry.
+   <p>
+   * Prior to using the registry, callers have to obtain a copy of the
+   * registry.  This static method provides the means for doing that.
+   <p>
+   * @return the singleton for the DefinitionURL registry.
+   */ public
+";
+
+
+%javamethodmodifiers DefinitionURLRegistry::addDefinitionURL(const std::string& url, int type) "
+/**
+   * Adds the given DefinitionURL to the registry of SBML DefinitionURLs.
+   <p>
+   * @param DefinitionURL the DefinitionURL to add to the registry.
+   <p>
+   * <p>
+ * @return integer value indicating success/failure of the
+ * function.   The possible values
+ * returned by this function are:
+   * <ul>
+   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
+   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
+   * </ul>
+   */ public
+";
+
+
+%javamethodmodifiers DefinitionURLRegistry::getNumDefinitionURLs "
+/**
+   * Returns the number of DefinitionURLs known by the registry.
+   <p>
+   * @return the number of registered DefinitionURLs.
+   <p>
+   * @see #getDefinitionURLByIndex(int)
+   */ public
+";
+
+
+%javamethodmodifiers DefinitionURLRegistry::addSBMLDefinitions "
+/** */ public
+";
+
+
+%javamethodmodifiers DefinitionURLRegistry::getCoreDefinitionsAdded "
+/** */ public
+";
+
+
+%javamethodmodifiers DefinitionURLRegistry::getType(const std::string& url) "
+/** */ public
+";
+
+
+%javamethodmodifiers DefinitionURLRegistry::getDefinitionUrlByIndex(int index) "
+/** */ public
+";
+
+
+%javamethodmodifiers DefinitionURLRegistry::clearDefinitions "
+/** */ public
+";
+
+
+%javamethodmodifiers DefinitionURLRegistry::DefinitionURLRegistry "
+/** * @internal */ public
+";
+
+
+%javamethodmodifiers DefinitionURLRegistry::setCoreDefinitionsAdded "
+/** * @internal */ public
+";
+
+
+%typemap(javaimports) MathFilter "
+/** 
+ *  
+ * @internal
+ */
+"
+
+
 %typemap(javaimports) ASTBasePlugin "
 /** 
  *  Base class for extensions that plug into AST classes.
@@ -75786,7 +75984,7 @@ defined in SBML.
 ";
 
 
-%javamethodmodifiers ASTBasePlugin::getPackageFunctionFor(const std::string& name) const "
+%javamethodmodifiers ASTBasePlugin::getPackageFunctionFor(const std::string& name, bool strCmpIsCaseSensitive = false) const "
 /** * @internal */ public
 ";
 
diff --git a/src/bindings/java/libsbml.i b/src/bindings/java/libsbml.i
index 79c39ace..947be85f 100644
--- a/src/bindings/java/libsbml.i
+++ b/src/bindings/java/libsbml.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/libsbml_wrap.cpp b/src/bindings/java/libsbml_wrap.cpp
index c2326ce4..fff6a2aa 100644
--- a/src/bindings/java/libsbml_wrap.cpp
+++ b/src/bindings/java/libsbml_wrap.cpp
@@ -661,7 +661,7 @@ namespace Swig {
 namespace Swig {
   namespace {
     jclass jclass_libsbmlJNI = NULL;
-    jmethodID director_method_ids[18];
+    jmethodID director_method_ids[20];
   }
 }
 
@@ -722,7 +722,8 @@ SWIGINTERN ListWrapper< SBase > *SBasePlugin_getListOfAllElements__SWIG_0(SBaseP
 #include <sbml/math/FormulaParser.h>
 #include <sbml/math/L3Parser.h>
 #include <sbml/math/L3ParserSettings.h>
-
+#include <sbml/math/DefinitionURLRegistry.h>
+#include <sbml/util/MathFilter.h>
 
 
 
@@ -1470,6 +1471,152 @@ void SwigDirector_SBMLValidator::swig_connect_director(JNIEnv *jenv, jobject jse
 }
 
 
+SwigDirector_Callback::SwigDirector_Callback(JNIEnv *jenv) : Callback(), Swig::Director(jenv) {
+}
+
+SwigDirector_Callback::~SwigDirector_Callback() {
+  swig_disconnect_director_self("swigDirectorDisconnect");
+}
+
+
+int SwigDirector_Callback::process(SBMLDocument *doc) {
+  int c_result = SwigValueInit< int >() ;
+  jint jresult = 0 ;
+  JNIEnvWrapper swigjnienv(this) ;
+  JNIEnv * jenv = swigjnienv.getJNIEnv() ;
+  jobject swigjobj = (jobject) NULL ;
+  jlong jdoc = 0 ;
+  
+  if (!swig_override[0]) {
+    return Callback::process(doc);
+  }
+  swigjobj = swig_get_self(jenv);
+  if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
+    *((SBMLDocument **)&jdoc) = (SBMLDocument *) doc; 
+    jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_libsbmlJNI, Swig::director_method_ids[18], swigjobj, jdoc);
+    jthrowable swigerror = jenv->ExceptionOccurred();
+    if (swigerror) {
+      jenv->ExceptionClear();
+      throw Swig::DirectorException(jenv, swigerror);
+    }
+    
+    c_result = (int)jresult; 
+  } else {
+    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object in Callback::process ");
+  }
+  if (swigjobj) jenv->DeleteLocalRef(swigjobj);
+  return c_result;
+}
+
+void SwigDirector_Callback::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) {
+  static struct {
+    const char *mname;
+    const char *mdesc;
+    jmethodID base_methid;
+  } methods[] = {
+    {
+      "process", "(Lorg/sbml/libsbml/SBMLDocument;)I", NULL 
+    }
+  };
+  
+  static jclass baseclass = 0 ;
+  
+  if (swig_set_self(jenv, jself, swig_mem_own, weak_global)) {
+    if (!baseclass) {
+      baseclass = jenv->FindClass("org/sbml/libsbml/Callback");
+      if (!baseclass) return;
+      baseclass = (jclass) jenv->NewGlobalRef(baseclass);
+    }
+    bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true);
+    for (int i = 0; i < 1; ++i) {
+      if (!methods[i].base_methid) {
+        methods[i].base_methid = jenv->GetMethodID(baseclass, methods[i].mname, methods[i].mdesc);
+        if (!methods[i].base_methid) return;
+      }
+      swig_override[i] = false;
+      if (derived) {
+        jmethodID methid = jenv->GetMethodID(jcls, methods[i].mname, methods[i].mdesc);
+        swig_override[i] = (methid != methods[i].base_methid);
+        jenv->ExceptionClear();
+      }
+    }
+  }
+}
+
+
+SwigDirector_MathFilter::SwigDirector_MathFilter(JNIEnv *jenv) : MathFilter(), Swig::Director(jenv) {
+}
+
+SwigDirector_MathFilter::~SwigDirector_MathFilter() {
+  swig_disconnect_director_self("swigDirectorDisconnect");
+}
+
+
+bool SwigDirector_MathFilter::filter(SBase const *element) {
+  bool c_result = SwigValueInit< bool >() ;
+  jboolean jresult = 0 ;
+  JNIEnvWrapper swigjnienv(this) ;
+  JNIEnv * jenv = swigjnienv.getJNIEnv() ;
+  jobject swigjobj = (jobject) NULL ;
+  jlong jelement = 0 ;
+  
+  if (!swig_override[0]) {
+    return MathFilter::filter(element);
+  }
+  swigjobj = swig_get_self(jenv);
+  if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
+    *((SBase **)&jelement) = (SBase *) element; 
+    jresult = (jboolean) jenv->CallStaticBooleanMethod(Swig::jclass_libsbmlJNI, Swig::director_method_ids[19], swigjobj, jelement);
+    jthrowable swigerror = jenv->ExceptionOccurred();
+    if (swigerror) {
+      jenv->ExceptionClear();
+      throw Swig::DirectorException(jenv, swigerror);
+    }
+    
+    c_result = jresult ? true : false; 
+  } else {
+    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object in MathFilter::filter ");
+  }
+  if (swigjobj) jenv->DeleteLocalRef(swigjobj);
+  return c_result;
+}
+
+void SwigDirector_MathFilter::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) {
+  static struct {
+    const char *mname;
+    const char *mdesc;
+    jmethodID base_methid;
+  } methods[] = {
+    {
+      "filter", "(Lorg/sbml/libsbml/SBase;)Z", NULL 
+    }
+  };
+  
+  static jclass baseclass = 0 ;
+  
+  if (swig_set_self(jenv, jself, swig_mem_own, weak_global)) {
+    if (!baseclass) {
+      baseclass = jenv->FindClass("org/sbml/libsbml/MathFilter");
+      if (!baseclass) return;
+      baseclass = (jclass) jenv->NewGlobalRef(baseclass);
+    }
+    bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true);
+    for (int i = 0; i < 1; ++i) {
+      if (!methods[i].base_methid) {
+        methods[i].base_methid = jenv->GetMethodID(baseclass, methods[i].mname, methods[i].mdesc);
+        if (!methods[i].base_methid) return;
+      }
+      swig_override[i] = false;
+      if (derived) {
+        jmethodID methid = jenv->GetMethodID(jcls, methods[i].mname, methods[i].mdesc);
+        swig_override[i] = (methid != methods[i].base_methid);
+        jenv->ExceptionClear();
+      }
+    }
+  }
+}
+
+
 
 #ifdef __cplusplus
 extern "C" {
@@ -3955,7 +4102,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1getAncestorOfTy
   jlong jresult = 0 ;
   SBase *arg1 = (SBase *) 0 ;
   int arg2 ;
-  std::string arg3 ;
+  std::string *arg3 = 0 ;
   SBase *result = 0 ;
   
   (void)jenv;
@@ -3966,12 +4113,13 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1getAncestorOfTy
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  (&arg3)->assign(arg3_pstr);
+  std::string arg3_str(arg3_pstr);
+  arg3 = &arg3_str;
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (SBase *)(arg1)->getAncestorOfType(arg2,arg3);
+  result = (SBase *)(arg1)->getAncestorOfType(arg2,(std::string const &)*arg3);
   *(SBase **)&jresult = result; 
   return jresult;
 }
@@ -4393,7 +4541,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1appendAnnotation
 SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1removeTopLevelAnnotationElement_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jboolean jarg4) {
   jint jresult = 0 ;
   SBase *arg1 = (SBase *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
   bool arg4 ;
   int result;
@@ -4405,10 +4553,11 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1removeTopLevelAn
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
@@ -4419,7 +4568,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1removeTopLevelAn
   (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
   arg4 = jarg4 ? true : false; 
-  result = (int)(arg1)->removeTopLevelAnnotationElement(arg2,arg3,arg4);
+  result = (int)(arg1)->removeTopLevelAnnotationElement((std::string const &)*arg2,arg3,arg4);
   jresult = (jint)result; 
   return jresult;
 }
@@ -4428,7 +4577,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1removeTopLevelAn
 SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1removeTopLevelAnnotationElement_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
   jint jresult = 0 ;
   SBase *arg1 = (SBase *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
   int result;
   
@@ -4439,10 +4588,11 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1removeTopLevelAn
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
@@ -4452,7 +4602,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1removeTopLevelAn
   if (!arg3_pstr) return 0;
   (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (int)(arg1)->removeTopLevelAnnotationElement(arg2,arg3);
+  result = (int)(arg1)->removeTopLevelAnnotationElement((std::string const &)*arg2,arg3);
   jresult = (jint)result; 
   return jresult;
 }
@@ -4461,7 +4611,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1removeTopLevelAn
 SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1removeTopLevelAnnotationElement_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jint jresult = 0 ;
   SBase *arg1 = (SBase *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   int result;
   
   (void)jenv;
@@ -4471,12 +4621,13 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBase_1removeTopLevelAn
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = (int)(arg1)->removeTopLevelAnnotationElement(arg2);
+  result = (int)(arg1)->removeTopLevelAnnotationElement((std::string const &)*arg2);
   jresult = (jint)result; 
   return jresult;
 }
@@ -10769,7 +10920,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLDocument_1setModel(
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLDocument_1createModel_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jlong jresult = 0 ;
   SBMLDocument *arg1 = (SBMLDocument *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   Model *result = 0 ;
   
   (void)jenv;
@@ -10779,13 +10930,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLDocument_1createMo
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = (Model *)(arg1)->createModel((std::string const &)*arg2);
+  result = (Model *)(arg1)->createModel(arg2);
   *(Model **)&jresult = result; 
   return jresult;
 }
@@ -23153,7 +23303,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Reaction_1addReactant_1
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   bool arg5 ;
   int result;
   
@@ -23167,14 +23317,13 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Reaction_1addReactant_1
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   arg5 = jarg5 ? true : false; 
-  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,(std::string const &)*arg4,arg5);
+  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,arg4,arg5);
   jresult = (jint)result; 
   return jresult;
 }
@@ -23185,7 +23334,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Reaction_1addReactant_1
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   int result;
   
   (void)jenv;
@@ -23198,13 +23347,12 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Reaction_1addReactant_1
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,(std::string const &)*arg4);
+  result = (int)(arg1)->addReactant((Species const *)arg2,arg3,arg4);
   jresult = (jint)result; 
   return jresult;
 }
@@ -23271,7 +23419,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Reaction_1addProduct_1_
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   bool arg5 ;
   int result;
   
@@ -23285,14 +23433,13 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Reaction_1addProduct_1_
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   arg5 = jarg5 ? true : false; 
-  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,(std::string const &)*arg4,arg5);
+  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,arg4,arg5);
   jresult = (jint)result; 
   return jresult;
 }
@@ -23303,7 +23450,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Reaction_1addProduct_1_
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   int result;
   
   (void)jenv;
@@ -23316,13 +23463,12 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Reaction_1addProduct_1_
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,(std::string const &)*arg4);
+  result = (int)(arg1)->addProduct((Species const *)arg2,arg3,arg4);
   jresult = (jint)result; 
   return jresult;
 }
@@ -23388,7 +23534,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Reaction_1addModifier_1
   jint jresult = 0 ;
   Reaction *arg1 = (Reaction *) 0 ;
   Species *arg2 = (Species *) 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   (void)jenv;
@@ -23400,13 +23546,12 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Reaction_1addModifier_1
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (int)(arg1)->addModifier((Species const *)arg2,(std::string const &)*arg3);
+  result = (int)(arg1)->addModifier((Species const *)arg2,arg3);
   jresult = (jint)result; 
   return jresult;
 }
@@ -30474,7 +30619,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLNamespaces_1_
   unsigned int arg2 ;
   std::string *arg3 = 0 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   SBMLNamespaces *result = 0 ;
   
   (void)jenv;
@@ -30494,15 +30639,14 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLNamespaces_1_
   if(!jarg5) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
   if (!arg5_pstr) return 0;
-  std::string arg5_str(arg5_pstr);
-  arg5 = &arg5_str;
+  (&arg5)->assign(arg5_pstr);
   jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
   
   try {
-    result = (SBMLNamespaces *)new SBMLNamespaces(arg1,arg2,(std::string const &)*arg3,arg4,(std::string const &)*arg5);
+    result = (SBMLNamespaces *)new SBMLNamespaces(arg1,arg2,(std::string const &)*arg3,arg4,arg5);
   }
   catch (const SBMLConstructorException &e) {
     jenv->ExceptionClear();
@@ -31374,9 +31518,9 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLConstructorExcep
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jint jarg3, jstring jarg4) {
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   ConversionOptionType_t arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   ConversionOption *result = 0 ;
   
   (void)jenv;
@@ -31393,23 +31537,21 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (ConversionOptionType_t)jarg3; 
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3,arg4);
   *(ConversionOption **)&jresult = result; 
   return jresult;
 }
@@ -31418,7 +31560,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jint jarg3) {
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   ConversionOptionType_t arg3 ;
   ConversionOption *result = 0 ;
   
@@ -31436,14 +31578,13 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (ConversionOptionType_t)jarg3; 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(std::string const &)*arg2,arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   *(ConversionOption **)&jresult = result; 
   return jresult;
 }
@@ -31452,7 +31593,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   ConversionOption *result = 0 ;
   
   (void)jenv;
@@ -31469,13 +31610,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(std::string const &)*arg2);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2);
   *(ConversionOption **)&jresult = result; 
   return jresult;
 }
@@ -31507,7 +31647,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
   char *arg2 = (char *) 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOption *result = 0 ;
   
   (void)jenv;
@@ -31529,13 +31669,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(char const *)arg2,(std::string const &)*arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,(char const *)arg2,arg3);
   *(ConversionOption **)&jresult = result; 
   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
   return jresult;
@@ -31546,7 +31685,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
   bool arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOption *result = 0 ;
   
   (void)jenv;
@@ -31564,13 +31703,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   *(ConversionOption **)&jresult = result; 
   return jresult;
 }
@@ -31604,7 +31742,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
   double arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOption *result = 0 ;
   
   (void)jenv;
@@ -31622,13 +31760,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   *(ConversionOption **)&jresult = result; 
   return jresult;
 }
@@ -31662,7 +31799,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
   float arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOption *result = 0 ;
   
   (void)jenv;
@@ -31680,13 +31817,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   *(ConversionOption **)&jresult = result; 
   return jresult;
 }
@@ -31720,7 +31856,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
   int arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOption *result = 0 ;
   
   (void)jenv;
@@ -31738,13 +31874,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ConversionOption_
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  result = (ConversionOption *)new ConversionOption((std::string const &)*arg1,arg2,arg3);
   *(ConversionOption **)&jresult = result; 
   return jresult;
 }
@@ -32294,9 +32429,9 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1addOption_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jint jarg4, jstring jarg5) {
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOptionType_t arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   
   (void)jenv;
   (void)jcls;
@@ -32314,30 +32449,28 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return ;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
   arg4 = (ConversionOptionType_t)jarg4; 
   if(!jarg5) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
   if (!arg5_pstr) return ;
-  std::string arg5_str(arg5_pstr);
-  arg5 = &arg5_str;
+  (&arg5)->assign(arg5_pstr);
   jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
-  (arg1)->addOption((std::string const &)*arg2,(std::string const &)*arg3,arg4,(std::string const &)*arg5);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4,arg5);
 }
 
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1addOption_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jint jarg4) {
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   ConversionOptionType_t arg4 ;
   
   (void)jenv;
@@ -32356,21 +32489,20 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return ;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
   arg4 = (ConversionOptionType_t)jarg4; 
-  (arg1)->addOption((std::string const &)*arg2,(std::string const &)*arg3,arg4);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1addOption_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   
   (void)jenv;
   (void)jcls;
@@ -32388,13 +32520,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return ;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  (arg1)->addOption((std::string const &)*arg2,(std::string const &)*arg3);
+  (arg1)->addOption((std::string const &)*arg2,arg3);
 }
 
 
@@ -32423,7 +32554,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   char *arg3 = (char *) 0 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   
   (void)jenv;
   (void)jcls;
@@ -32446,13 +32577,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return ;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  (arg1)->addOption((std::string const &)*arg2,(char const *)arg3,(std::string const &)*arg4);
+  (arg1)->addOption((std::string const &)*arg2,(char const *)arg3,arg4);
   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
 }
 
@@ -32461,7 +32591,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   
   (void)jenv;
   (void)jcls;
@@ -32480,13 +32610,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return ;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -32517,7 +32646,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   double arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   
   (void)jenv;
   (void)jcls;
@@ -32536,13 +32665,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return ;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -32573,7 +32701,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   float arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   
   (void)jenv;
   (void)jcls;
@@ -32592,13 +32720,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return ;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -32629,7 +32756,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   ConversionProperties *arg1 = (ConversionProperties *) 0 ;
   std::string *arg2 = 0 ;
   int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   
   (void)jenv;
   (void)jcls;
@@ -32648,13 +32775,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ConversionProperties_1a
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return ;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  (arg1)->addOption((std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  (arg1)->addOption((std::string const &)*arg2,arg3,arg4);
 }
 
 
@@ -35560,8 +35686,8 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1add_1_1S
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
+  std::string arg4 ;
+  std::string arg5 ;
   int result;
   
   (void)jenv;
@@ -35589,22 +35715,20 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1add_1_1S
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   if(!jarg5) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
   if (!arg5_pstr) return 0;
-  std::string arg5_str(arg5_pstr);
-  arg5 = &arg5_str;
+  (&arg5)->assign(arg5_pstr);
   jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
-  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5);
   jresult = (jint)result; 
   return jresult;
 }
@@ -35615,7 +35739,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1add_1_1S
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   int result;
   
   (void)jenv;
@@ -35643,13 +35767,12 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1add_1_1S
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
+  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3,arg4);
   jresult = (jint)result; 
   return jresult;
 }
@@ -35760,7 +35883,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1remove_1
   jint jresult = 0 ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   (void)jenv;
@@ -35779,13 +35902,12 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1remove_1
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (int)(arg1)->remove((std::string const &)*arg2,(std::string const &)*arg3);
+  result = (int)(arg1)->remove((std::string const &)*arg2,arg3);
   jresult = (jint)result; 
   return jresult;
 }
@@ -36053,7 +36175,7 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1getVa
 SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1getValue_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jstring jresult = 0 ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string result;
   
   (void)jenv;
@@ -36063,12 +36185,13 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1getVa
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = ((XMLAttributes const *)arg1)->getValue(arg2);
+  result = ((XMLAttributes const *)arg1)->getValue((std::string const &)*arg2);
   jresult = jenv->NewStringUTF((&result)->c_str()); 
   return jresult;
 }
@@ -36077,8 +36200,8 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1getVa
 SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1getValue_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
   jstring jresult = 0 ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
-  std::string arg3 ;
+  std::string *arg2 = 0 ;
+  std::string *arg3 = 0 ;
   std::string result;
   
   (void)jenv;
@@ -36088,20 +36211,22 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1getVa
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  (&arg3)->assign(arg3_pstr);
+  std::string arg3_str(arg3_pstr);
+  arg3 = &arg3_str;
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = ((XMLAttributes const *)arg1)->getValue(arg2,arg3);
+  result = ((XMLAttributes const *)arg1)->getValue((std::string const &)*arg2,(std::string const &)*arg3);
   jresult = jenv->NewStringUTF((&result)->c_str()); 
   return jresult;
 }
@@ -36149,7 +36274,7 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1hasA
 SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1hasAttribute_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
   jboolean jresult = 0 ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
   bool result;
   
@@ -36160,10 +36285,11 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1hasA
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
@@ -36173,7 +36299,7 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1hasA
   if (!arg3_pstr) return 0;
   (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (bool)((XMLAttributes const *)arg1)->hasAttribute(arg2,arg3);
+  result = (bool)((XMLAttributes const *)arg1)->hasAttribute((std::string const &)*arg2,arg3);
   jresult = (jboolean)result; 
   return jresult;
 }
@@ -36182,7 +36308,7 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1hasA
 SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1hasAttribute_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jboolean jresult = 0 ;
   XMLAttributes *arg1 = (XMLAttributes *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   bool result;
   
   (void)jenv;
@@ -36192,12 +36318,13 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLAttributes_1hasA
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = (bool)((XMLAttributes const *)arg1)->hasAttribute(arg2);
+  result = (bool)((XMLAttributes const *)arg1)->hasAttribute((std::string const &)*arg2);
   jresult = (jboolean)result; 
   return jresult;
 }
@@ -36344,7 +36471,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1add_1_1S
   jint jresult = 0 ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   (void)jenv;
@@ -36363,13 +36490,12 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1add_1_1S
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (int)(arg1)->add((std::string const &)*arg2,(std::string const &)*arg3);
+  result = (int)(arg1)->add((std::string const &)*arg2,arg3);
   jresult = (jint)result; 
   return jresult;
 }
@@ -36460,7 +36586,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1clear(JN
 SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1getIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jint jresult = 0 ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   int result;
   
   (void)jenv;
@@ -36470,12 +36596,13 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1getIndex
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = (int)((XMLNamespaces const *)arg1)->getIndex(arg2);
+  result = (int)((XMLNamespaces const *)arg1)->getIndex((std::string const &)*arg2);
   jresult = (jint)result; 
   return jresult;
 }
@@ -36484,7 +36611,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1getIndex
 SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1containsUri(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jboolean jresult = 0 ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   bool result;
   
   (void)jenv;
@@ -36494,12 +36621,13 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1cont
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = (bool)((XMLNamespaces const *)arg1)->containsUri(arg2);
+  result = (bool)((XMLNamespaces const *)arg1)->containsUri((std::string const &)*arg2);
   jresult = (jboolean)result; 
   return jresult;
 }
@@ -36508,7 +36636,7 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1cont
 SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1getIndexByPrefix(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jint jresult = 0 ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   int result;
   
   (void)jenv;
@@ -36518,12 +36646,13 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1getIndex
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = (int)((XMLNamespaces const *)arg1)->getIndexByPrefix(arg2);
+  result = (int)((XMLNamespaces const *)arg1)->getIndexByPrefix((std::string const &)*arg2);
   jresult = (jint)result; 
   return jresult;
 }
@@ -36621,7 +36750,7 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1getUR
 SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1getURI_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jstring jresult = 0 ;
   XMLNamespaces *arg1 = (XMLNamespaces *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   std::string result;
   
   (void)jenv;
@@ -36631,13 +36760,12 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLNamespaces_1getUR
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = ((XMLNamespaces const *)arg1)->getURI((std::string const &)*arg2);
+  result = ((XMLNamespaces const *)arg1)->getURI(arg2);
   jresult = jenv->NewStringUTF((&result)->c_str()); 
   return jresult;
 }
@@ -37334,8 +37462,8 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1addAttr_1_1SW
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
+  std::string arg4 ;
+  std::string arg5 ;
   int result;
   
   (void)jenv;
@@ -37363,22 +37491,20 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1addAttr_1_1SW
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   if(!jarg5) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
   if (!arg5_pstr) return 0;
-  std::string arg5_str(arg5_pstr);
-  arg5 = &arg5_str;
+  (&arg5)->assign(arg5_pstr);
   jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
-  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5);
   jresult = (jint)result; 
   return jresult;
 }
@@ -37389,7 +37515,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1addAttr_1_1SW
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
   std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   int result;
   
   (void)jenv;
@@ -37417,13 +37543,12 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1addAttr_1_1SW
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
+  result = (int)(arg1)->addAttr((std::string const &)*arg2,(std::string const &)*arg3,arg4);
   jresult = (jint)result; 
   return jresult;
 }
@@ -37517,7 +37642,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1removeAttr_1_
   jint jresult = 0 ;
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   (void)jenv;
@@ -37536,13 +37661,12 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1removeAttr_1_
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (int)(arg1)->removeAttr((std::string const &)*arg2,(std::string const &)*arg3);
+  result = (int)(arg1)->removeAttr((std::string const &)*arg2,arg3);
   jresult = (jint)result; 
   return jresult;
 }
@@ -37614,7 +37738,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getAttrIndex_
   jint jresult = 0 ;
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   (void)jenv;
@@ -37633,13 +37757,12 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getAttrIndex_
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (int)((XMLToken const *)arg1)->getAttrIndex((std::string const &)*arg2,(std::string const &)*arg3);
+  result = (int)((XMLToken const *)arg1)->getAttrIndex((std::string const &)*arg2,arg3);
   jresult = (jint)result; 
   return jresult;
 }
@@ -37795,7 +37918,7 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getAttrVal
 SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getAttrValue_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
   jstring jresult = 0 ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
   std::string result;
   
@@ -37806,10 +37929,11 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getAttrVal
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
@@ -37819,7 +37943,7 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getAttrVal
   if (!arg3_pstr) return 0;
   (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = ((XMLToken const *)arg1)->getAttrValue(arg2,arg3);
+  result = ((XMLToken const *)arg1)->getAttrValue((std::string const &)*arg2,arg3);
   jresult = jenv->NewStringUTF((&result)->c_str()); 
   return jresult;
 }
@@ -37828,7 +37952,7 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getAttrVal
 SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getAttrValue_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jstring jresult = 0 ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string result;
   
   (void)jenv;
@@ -37838,12 +37962,13 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getAttrVal
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = ((XMLToken const *)arg1)->getAttrValue(arg2);
+  result = ((XMLToken const *)arg1)->getAttrValue((std::string const &)*arg2);
   jresult = jenv->NewStringUTF((&result)->c_str()); 
   return jresult;
 }
@@ -37891,7 +38016,7 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1hasAttr_1
 SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1hasAttr_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
   jboolean jresult = 0 ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   std::string arg3 ;
   bool result;
   
@@ -37902,10 +38027,11 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1hasAttr_1
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
@@ -37915,7 +38041,7 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1hasAttr_1
   if (!arg3_pstr) return 0;
   (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (bool)((XMLToken const *)arg1)->hasAttr(arg2,arg3);
+  result = (bool)((XMLToken const *)arg1)->hasAttr((std::string const &)*arg2,arg3);
   jresult = (jboolean)result; 
   return jresult;
 }
@@ -37924,7 +38050,7 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1hasAttr_1
 SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1hasAttr_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jboolean jresult = 0 ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   bool result;
   
   (void)jenv;
@@ -37934,12 +38060,13 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1hasAttr_1
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = (bool)((XMLToken const *)arg1)->hasAttr(arg2);
+  result = (bool)((XMLToken const *)arg1)->hasAttr((std::string const &)*arg2);
   jresult = (jboolean)result; 
   return jresult;
 }
@@ -38023,7 +38150,7 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1addNamespace_
   jint jresult = 0 ;
   XMLToken *arg1 = (XMLToken *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   int result;
   
   (void)jenv;
@@ -38042,13 +38169,12 @@ SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1addNamespace_
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (int)(arg1)->addNamespace((std::string const &)*arg2,(std::string const &)*arg3);
+  result = (int)(arg1)->addNamespace((std::string const &)*arg2,arg3);
   jresult = (jint)result; 
   return jresult;
 }
@@ -38263,7 +38389,7 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getNamespa
 SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getNamespaceURI_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jstring jresult = 0 ;
   XMLToken *arg1 = (XMLToken *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   std::string result;
   
   (void)jenv;
@@ -38273,13 +38399,12 @@ SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLToken_1getNamespa
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = ((XMLToken const *)arg1)->getNamespaceURI((std::string const &)*arg2);
+  result = ((XMLToken const *)arg1)->getNamespaceURI(arg2);
   jresult = jenv->NewStringUTF((&result)->c_str()); 
   return jresult;
 }
@@ -39887,10 +40012,10 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_delete_1XMLTriple(JNIEn
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOutputStream_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jboolean jarg3, jstring jarg4, jstring jarg5) {
   jlong jresult = 0 ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
+  std::string arg4 ;
+  std::string arg5 ;
   XMLOutputStream *result = 0 ;
   
   (void)jenv;
@@ -39904,34 +40029,31 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOutputStream_1
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = jarg3 ? true : false; 
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   if(!jarg5) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
   if (!arg5_pstr) return 0;
-  std::string arg5_str(arg5_pstr);
-  arg5 = &arg5_str;
+  (&arg5)->assign(arg5_pstr);
   jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2,arg3,arg4,arg5);
   }
   catch (const XMLConstructorException &e) {
     jenv->ExceptionClear();
@@ -39949,9 +40071,9 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOutputStream_1
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOutputStream_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jboolean jarg3, jstring jarg4) {
   jlong jresult = 0 ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   XMLOutputStream *result = 0 ;
   
   (void)jenv;
@@ -39965,25 +40087,23 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOutputStream_1
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = jarg3 ? true : false; 
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2,arg3,arg4);
   }
   catch (const XMLConstructorException &e) {
     jenv->ExceptionClear();
@@ -40001,7 +40121,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOutputStream_1
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOutputStream_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jboolean jarg3) {
   jlong jresult = 0 ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
   XMLOutputStream *result = 0 ;
   
@@ -40016,16 +40136,15 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOutputStream_1
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = jarg3 ? true : false; 
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2,arg3);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2,arg3);
   }
   catch (const XMLConstructorException &e) {
     jenv->ExceptionClear();
@@ -40043,7 +40162,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOutputStream_1
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOutputStream_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jlong jresult = 0 ;
   std::ostream *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   XMLOutputStream *result = 0 ;
   
   (void)jenv;
@@ -40057,15 +40176,14 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOutputStream_1
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   
   try {
-    result = (XMLOutputStream *)new XMLOutputStream(*arg1,(std::string const &)*arg2);
+    result = (XMLOutputStream *)new XMLOutputStream(*arg1,arg2);
   }
   catch (const XMLConstructorException &e) {
     jenv->ExceptionClear();
@@ -40123,7 +40241,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_delete_1XMLOutputStream
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLOutputStream_1endElement_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
   XMLOutputStream *arg1 = (XMLOutputStream *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   
   (void)jenv;
   (void)jcls;
@@ -40141,13 +40259,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLOutputStream_1endEle
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return ;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  (arg1)->endElement((std::string const &)*arg2,(std::string const &)*arg3);
+  (arg1)->endElement((std::string const &)*arg2,arg3);
 }
 
 
@@ -40226,7 +40343,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLOutputStream_1setAut
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLOutputStream_1startElement_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
   XMLOutputStream *arg1 = (XMLOutputStream *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   
   (void)jenv;
   (void)jcls;
@@ -40244,13 +40361,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLOutputStream_1startE
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return ;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  (arg1)->startElement((std::string const &)*arg2,(std::string const &)*arg3);
+  (arg1)->startElement((std::string const &)*arg2,arg3);
 }
 
 
@@ -40296,7 +40412,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLOutputStream_1startE
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLOutputStream_1startEndElement_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
   XMLOutputStream *arg1 = (XMLOutputStream *) 0 ;
   std::string *arg2 = 0 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   
   (void)jenv;
   (void)jcls;
@@ -40314,13 +40430,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLOutputStream_1startE
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return ;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  (arg1)->startEndElement((std::string const &)*arg2,(std::string const &)*arg3);
+  (arg1)->startEndElement((std::string const &)*arg2,arg3);
 }
 
 
@@ -41004,10 +41119,10 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLOutputStream_1setInd
 
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputStringStream_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jboolean jarg2, jstring jarg3, jstring jarg4) {
   jlong jresult = 0 ;
-  std::string *arg1 = 0 ;
+  std::string arg1 ;
   bool arg2 ;
-  std::string *arg3 = 0 ;
-  std::string *arg4 = 0 ;
+  std::string arg3 ;
+  std::string arg4 ;
   XMLOwningOutputStringStream *result = 0 ;
   
   (void)jenv;
@@ -41015,32 +41130,29 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputSt
   if(!jarg1) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); 
   if (!arg1_pstr) return 0;
-  std::string arg1_str(arg1_pstr);
-  arg1 = &arg1_str;
+  (&arg1)->assign(arg1_pstr);
   jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); 
   arg2 = jarg2 ? true : false; 
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4);
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1,arg2,arg3,arg4);
   *(XMLOwningOutputStringStream **)&jresult = result; 
   return jresult;
 }
@@ -41048,9 +41160,9 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputSt
 
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputStringStream_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1, jboolean jarg2, jstring jarg3) {
   jlong jresult = 0 ;
-  std::string *arg1 = 0 ;
+  std::string arg1 ;
   bool arg2 ;
-  std::string *arg3 = 0 ;
+  std::string arg3 ;
   XMLOwningOutputStringStream *result = 0 ;
   
   (void)jenv;
@@ -41058,23 +41170,21 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputSt
   if(!jarg1) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); 
   if (!arg1_pstr) return 0;
-  std::string arg1_str(arg1_pstr);
-  arg1 = &arg1_str;
+  (&arg1)->assign(arg1_pstr);
   jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); 
   arg2 = jarg2 ? true : false; 
   if(!jarg3) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
   if (!arg3_pstr) return 0;
-  std::string arg3_str(arg3_pstr);
-  arg3 = &arg3_str;
+  (&arg3)->assign(arg3_pstr);
   jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1,arg2,(std::string const &)*arg3);
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1,arg2,arg3);
   *(XMLOwningOutputStringStream **)&jresult = result; 
   return jresult;
 }
@@ -41082,7 +41192,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputSt
 
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputStringStream_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jstring jarg1, jboolean jarg2) {
   jlong jresult = 0 ;
-  std::string *arg1 = 0 ;
+  std::string arg1 ;
   bool arg2 ;
   XMLOwningOutputStringStream *result = 0 ;
   
@@ -41091,14 +41201,13 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputSt
   if(!jarg1) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); 
   if (!arg1_pstr) return 0;
-  std::string arg1_str(arg1_pstr);
-  arg1 = &arg1_str;
+  (&arg1)->assign(arg1_pstr);
   jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); 
   arg2 = jarg2 ? true : false; 
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1,arg2);
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1,arg2);
   *(XMLOwningOutputStringStream **)&jresult = result; 
   return jresult;
 }
@@ -41106,7 +41215,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputSt
 
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputStringStream_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jstring jarg1) {
   jlong jresult = 0 ;
-  std::string *arg1 = 0 ;
+  std::string arg1 ;
   XMLOwningOutputStringStream *result = 0 ;
   
   (void)jenv;
@@ -41114,13 +41223,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputSt
   if(!jarg1) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); 
   if (!arg1_pstr) return 0;
-  std::string arg1_str(arg1_pstr);
-  arg1 = &arg1_str;
+  (&arg1)->assign(arg1_pstr);
   jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); 
-  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream((std::string const &)*arg1);
+  result = (XMLOwningOutputStringStream *)new XMLOwningOutputStringStream(arg1);
   *(XMLOwningOutputStringStream **)&jresult = result; 
   return jresult;
 }
@@ -41151,10 +41259,10 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_delete_1XMLOwningOutput
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputFileStream_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jboolean jarg3, jstring jarg4, jstring jarg5) {
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
-  std::string *arg5 = 0 ;
+  std::string arg4 ;
+  std::string arg5 ;
   char const *arg_pstr1 ;
   std::string arg_str1 ;
   XMLOwningOutputFileStream *result = 0 ;
@@ -41188,32 +41296,29 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputFi
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = jarg3 ? true : false; 
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   if(!jarg5) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
   if (!arg5_pstr) return 0;
-  std::string arg5_str(arg5_pstr);
-  arg5 = &arg5_str;
+  (&arg5)->assign(arg5_pstr);
   jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4,(std::string const &)*arg5);
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2,arg3,arg4,arg5);
   *(XMLOwningOutputFileStream **)&jresult = result; 
   return jresult;
 }
@@ -41222,9 +41327,9 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputFi
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputFileStream_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jboolean jarg3, jstring jarg4) {
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   char const *arg_pstr1 ;
   std::string arg_str1 ;
   XMLOwningOutputFileStream *result = 0 ;
@@ -41258,23 +41363,21 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputFi
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = jarg3 ? true : false; 
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2,arg3,(std::string const &)*arg4);
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2,arg3,arg4);
   *(XMLOwningOutputFileStream **)&jresult = result; 
   return jresult;
 }
@@ -41283,7 +41386,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputFi
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputFileStream_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jboolean jarg3) {
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   bool arg3 ;
   char const *arg_pstr1 ;
   std::string arg_str1 ;
@@ -41318,14 +41421,13 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputFi
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = jarg3 ? true : false; 
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2,arg3);
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2,arg3);
   *(XMLOwningOutputFileStream **)&jresult = result; 
   return jresult;
 }
@@ -41334,7 +41436,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputFi
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputFileStream_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
   jlong jresult = 0 ;
   std::string *arg1 = 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   char const *arg_pstr1 ;
   std::string arg_str1 ;
   XMLOwningOutputFileStream *result = 0 ;
@@ -41368,13 +41470,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLOwningOutputFi
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,(std::string const &)*arg2);
+  result = (XMLOwningOutputFileStream *)new XMLOwningOutputFileStream((std::string const &)*arg1,arg2);
   *(XMLOwningOutputFileStream **)&jresult = result; 
   return jresult;
 }
@@ -41756,7 +41857,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLInputStream_1setSBML
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLInputStream_1determineNumberChildren_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jlong jresult = 0 ;
   XMLInputStream *arg1 = (XMLInputStream *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int result;
   
   (void)jenv;
@@ -41766,13 +41867,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLInputStream_1determ
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  result = (unsigned int)(arg1)->determineNumberChildren((std::string const &)*arg2);
+  result = (unsigned int)(arg1)->determineNumberChildren(arg2);
   jresult = (jlong)result; 
   return jresult;
 }
@@ -41866,7 +41966,7 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_XMLInputStream_1con
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jint jarg1, jstring jarg2, jlong jarg3, jlong jarg4, jlong jarg5, jlong jarg6) {
   jlong jresult = 0 ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
@@ -41879,11 +41979,10 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   arg4 = (unsigned int)jarg4; 
@@ -41891,7 +41990,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_
   arg6 = (unsigned int)jarg6; 
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3,arg4,arg5,arg6);
   }
   catch (const XMLConstructorException &e) {
     jenv->ExceptionClear();
@@ -41909,7 +42008,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jint jarg1, jstring jarg2, jlong jarg3, jlong jarg4, jlong jarg5) {
   jlong jresult = 0 ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
@@ -41921,18 +42020,17 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   arg4 = (unsigned int)jarg4; 
   arg5 = (unsigned int)jarg5; 
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3,arg4,arg5);
   }
   catch (const XMLConstructorException &e) {
     jenv->ExceptionClear();
@@ -41950,7 +42048,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jint jarg1, jstring jarg2, jlong jarg3, jlong jarg4) {
   jlong jresult = 0 ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   XMLError *result = 0 ;
@@ -41961,17 +42059,16 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   arg4 = (unsigned int)jarg4; 
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3,arg4);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3,arg4);
   }
   catch (const XMLConstructorException &e) {
     jenv->ExceptionClear();
@@ -41989,7 +42086,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jint jarg1, jstring jarg2, jlong jarg3) {
   jlong jresult = 0 ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   XMLError *result = 0 ;
   
@@ -41999,16 +42096,15 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2,arg3);
+    result = (XMLError *)new XMLError(arg1,arg2,arg3);
   }
   catch (const XMLConstructorException &e) {
     jenv->ExceptionClear();
@@ -42026,7 +42122,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_14(JNIEnv *jenv, jclass jcls, jint jarg1, jstring jarg2) {
   jlong jresult = 0 ;
   int arg1 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   XMLError *result = 0 ;
   
   (void)jenv;
@@ -42035,15 +42131,14 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1XMLError_1_1SWIG_
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return 0;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   
   try {
-    result = (XMLError *)new XMLError(arg1,(std::string const &)*arg2);
+    result = (XMLError *)new XMLError(arg1,arg2);
   }
   catch (const XMLConstructorException &e) {
     jenv->ExceptionClear();
@@ -42871,7 +42966,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logError_
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
@@ -42887,17 +42982,16 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logError_
   if(!jarg5) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
   if (!arg5_pstr) return ;
-  std::string arg5_str(arg5_pstr);
-  arg5 = &arg5_str;
+  (&arg5)->assign(arg5_pstr);
   jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
   arg6 = (unsigned int)jarg6; 
   arg7 = (unsigned int)jarg7; 
   arg8 = (unsigned int)jarg8; 
   arg9 = (unsigned int)jarg9; 
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6,arg7,arg8,arg9);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
 }
 
 
@@ -42906,7 +43000,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logError_
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
@@ -42921,16 +43015,15 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logError_
   if(!jarg5) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
   if (!arg5_pstr) return ;
-  std::string arg5_str(arg5_pstr);
-  arg5 = &arg5_str;
+  (&arg5)->assign(arg5_pstr);
   jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
   arg6 = (unsigned int)jarg6; 
   arg7 = (unsigned int)jarg7; 
   arg8 = (unsigned int)jarg8; 
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6,arg7,arg8);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
 }
 
 
@@ -42939,7 +43032,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logError_
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   
@@ -42953,15 +43046,14 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logError_
   if(!jarg5) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
   if (!arg5_pstr) return ;
-  std::string arg5_str(arg5_pstr);
-  arg5 = &arg5_str;
+  (&arg5)->assign(arg5_pstr);
   jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
   arg6 = (unsigned int)jarg6; 
   arg7 = (unsigned int)jarg7; 
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6,arg7);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6,arg7);
 }
 
 
@@ -42970,7 +43062,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logError_
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   unsigned int arg6 ;
   
   (void)jenv;
@@ -42983,14 +43075,13 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logError_
   if(!jarg5) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
   if (!arg5_pstr) return ;
-  std::string arg5_str(arg5_pstr);
-  arg5 = &arg5_str;
+  (&arg5)->assign(arg5_pstr);
   jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
   arg6 = (unsigned int)jarg6; 
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5,arg6);
+  (arg1)->logError(arg2,arg3,arg4,arg5,arg6);
 }
 
 
@@ -42999,7 +43090,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logError_
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
-  std::string *arg5 = 0 ;
+  std::string arg5 ;
   
   (void)jenv;
   (void)jcls;
@@ -43011,13 +43102,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logError_
   if(!jarg5) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
   if (!arg5_pstr) return ;
-  std::string arg5_str(arg5_pstr);
-  arg5 = &arg5_str;
+  (&arg5)->assign(arg5_pstr);
   jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
-  (arg1)->logError(arg2,arg3,arg4,(std::string const &)*arg5);
+  (arg1)->logError(arg2,arg3,arg4,arg5);
 }
 
 
@@ -43079,12 +43169,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logError_
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackageError_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jlong jarg4, jlong jarg5, jlong jarg6, jstring jarg7, jlong jarg8, jlong jarg9, jlong jarg10, jlong jarg11) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
   unsigned int arg9 ;
   unsigned int arg10 ;
@@ -43097,11 +43187,10 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return ;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   arg4 = (unsigned int)jarg4; 
@@ -43110,28 +43199,27 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg7) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg7_pstr = (const char *)jenv->GetStringUTFChars(jarg7, 0); 
   if (!arg7_pstr) return ;
-  std::string arg7_str(arg7_pstr);
-  arg7 = &arg7_str;
+  (&arg7)->assign(arg7_pstr);
   jenv->ReleaseStringUTFChars(jarg7, arg7_pstr); 
   arg8 = (unsigned int)jarg8; 
   arg9 = (unsigned int)jarg9; 
   arg10 = (unsigned int)jarg10; 
   arg11 = (unsigned int)jarg11; 
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8,arg9,arg10,arg11);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
 }
 
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackageError_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jlong jarg4, jlong jarg5, jlong jarg6, jstring jarg7, jlong jarg8, jlong jarg9, jlong jarg10) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
   unsigned int arg9 ;
   unsigned int arg10 ;
@@ -43143,11 +43231,10 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return ;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   arg4 = (unsigned int)jarg4; 
@@ -43156,27 +43243,26 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg7) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg7_pstr = (const char *)jenv->GetStringUTFChars(jarg7, 0); 
   if (!arg7_pstr) return ;
-  std::string arg7_str(arg7_pstr);
-  arg7 = &arg7_str;
+  (&arg7)->assign(arg7_pstr);
   jenv->ReleaseStringUTFChars(jarg7, arg7_pstr); 
   arg8 = (unsigned int)jarg8; 
   arg9 = (unsigned int)jarg9; 
   arg10 = (unsigned int)jarg10; 
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8,arg9,arg10);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
 }
 
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackageError_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jlong jarg4, jlong jarg5, jlong jarg6, jstring jarg7, jlong jarg8, jlong jarg9) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
   unsigned int arg9 ;
   
@@ -43187,11 +43273,10 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return ;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   arg4 = (unsigned int)jarg4; 
@@ -43200,26 +43285,25 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg7) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg7_pstr = (const char *)jenv->GetStringUTFChars(jarg7, 0); 
   if (!arg7_pstr) return ;
-  std::string arg7_str(arg7_pstr);
-  arg7 = &arg7_str;
+  (&arg7)->assign(arg7_pstr);
   jenv->ReleaseStringUTFChars(jarg7, arg7_pstr); 
   arg8 = (unsigned int)jarg8; 
   arg9 = (unsigned int)jarg9; 
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8,arg9);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
 }
 
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackageError_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jlong jarg4, jlong jarg5, jlong jarg6, jstring jarg7, jlong jarg8) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   unsigned int arg8 ;
   
   (void)jenv;
@@ -43229,11 +43313,10 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return ;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   arg4 = (unsigned int)jarg4; 
@@ -43242,25 +43325,24 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg7) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg7_pstr = (const char *)jenv->GetStringUTFChars(jarg7, 0); 
   if (!arg7_pstr) return ;
-  std::string arg7_str(arg7_pstr);
-  arg7 = &arg7_str;
+  (&arg7)->assign(arg7_pstr);
   jenv->ReleaseStringUTFChars(jarg7, arg7_pstr); 
   arg8 = (unsigned int)jarg8; 
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
 }
 
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackageError_1_1SWIG_14(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jlong jarg4, jlong jarg5, jlong jarg6, jstring jarg7) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
-  std::string *arg7 = 0 ;
+  std::string arg7 ;
   
   (void)jenv;
   (void)jcls;
@@ -43269,11 +43351,10 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return ;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   arg4 = (unsigned int)jarg4; 
@@ -43282,19 +43363,18 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg7) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg7_pstr = (const char *)jenv->GetStringUTFChars(jarg7, 0); 
   if (!arg7_pstr) return ;
-  std::string arg7_str(arg7_pstr);
-  arg7 = &arg7_str;
+  (&arg7)->assign(arg7_pstr);
   jenv->ReleaseStringUTFChars(jarg7, arg7_pstr); 
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6,arg7);
 }
 
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackageError_1_1SWIG_15(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jlong jarg4, jlong jarg5, jlong jarg6) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
@@ -43307,23 +43387,22 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return ;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   arg4 = (unsigned int)jarg4; 
   arg5 = (unsigned int)jarg5; 
   arg6 = (unsigned int)jarg6; 
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5,arg6);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5,arg6);
 }
 
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackageError_1_1SWIG_16(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jlong jarg4, jlong jarg5) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   unsigned int arg5 ;
@@ -43335,22 +43414,21 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return ;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   arg4 = (unsigned int)jarg4; 
   arg5 = (unsigned int)jarg5; 
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4,arg5);
+  (arg1)->logPackageError(arg2,arg3,arg4,arg5);
 }
 
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackageError_1_1SWIG_17(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jlong jarg4) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
   
@@ -43361,21 +43439,20 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return ;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
   arg4 = (unsigned int)jarg4; 
-  (arg1)->logPackageError((std::string const &)*arg2,arg3,arg4);
+  (arg1)->logPackageError(arg2,arg3,arg4);
 }
 
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackageError_1_1SWIG_18(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   unsigned int arg3 ;
   
   (void)jenv;
@@ -43385,20 +43462,19 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return ;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = (unsigned int)jarg3; 
-  (arg1)->logPackageError((std::string const &)*arg2,arg3);
+  (arg1)->logPackageError(arg2,arg3);
 }
 
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackageError_1_1SWIG_19(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   SBMLErrorLog *arg1 = (SBMLErrorLog *) 0 ;
-  std::string *arg2 = 0 ;
+  std::string arg2 ;
   
   (void)jenv;
   (void)jcls;
@@ -43407,13 +43483,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLErrorLog_1logPackag
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  }
+  } 
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return ;
-  std::string arg2_str(arg2_pstr);
-  arg2 = &arg2_str;
+  (&arg2)->assign(arg2_pstr);
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
-  (arg1)->logPackageError((std::string const &)*arg2);
+  (arg1)->logPackageError(arg2);
 }
 
 
@@ -43494,12 +43569,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
-  std::string *arg9 = 0 ;
+  std::string arg9 ;
   unsigned int arg10 ;
   SBMLError *result = 0 ;
   
@@ -43511,11 +43586,10 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   arg5 = (unsigned int)jarg5; 
   arg6 = (unsigned int)jarg6; 
@@ -43524,14 +43598,13 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   if(!jarg9) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg9_pstr = (const char *)jenv->GetStringUTFChars(jarg9, 0); 
   if (!arg9_pstr) return 0;
-  std::string arg9_str(arg9_pstr);
-  arg9 = &arg9_str;
+  (&arg9)->assign(arg9_pstr);
   jenv->ReleaseStringUTFChars(jarg9, arg9_pstr); 
   arg10 = (unsigned int)jarg10; 
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7,arg8,(std::string const &)*arg9,arg10);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
   *(SBMLError **)&jresult = result; 
   return jresult;
 }
@@ -43542,12 +43615,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
   unsigned int arg8 ;
-  std::string *arg9 = 0 ;
+  std::string arg9 ;
   SBMLError *result = 0 ;
   
   (void)jenv;
@@ -43558,11 +43631,10 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   arg5 = (unsigned int)jarg5; 
   arg6 = (unsigned int)jarg6; 
@@ -43571,13 +43643,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   if(!jarg9) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg9_pstr = (const char *)jenv->GetStringUTFChars(jarg9, 0); 
   if (!arg9_pstr) return 0;
-  std::string arg9_str(arg9_pstr);
-  arg9 = &arg9_str;
+  (&arg9)->assign(arg9_pstr);
   jenv->ReleaseStringUTFChars(jarg9, arg9_pstr); 
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7,arg8,(std::string const &)*arg9);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   *(SBMLError **)&jresult = result; 
   return jresult;
 }
@@ -43588,7 +43659,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
@@ -43603,17 +43674,16 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   arg5 = (unsigned int)jarg5; 
   arg6 = (unsigned int)jarg6; 
   arg7 = (unsigned int)jarg7; 
   arg8 = (unsigned int)jarg8; 
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7,arg8);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   *(SBMLError **)&jresult = result; 
   return jresult;
 }
@@ -43624,7 +43694,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   unsigned int arg7 ;
@@ -43638,16 +43708,15 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   arg5 = (unsigned int)jarg5; 
   arg6 = (unsigned int)jarg6; 
   arg7 = (unsigned int)jarg7; 
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6,arg7);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   *(SBMLError **)&jresult = result; 
   return jresult;
 }
@@ -43658,7 +43727,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   unsigned int arg6 ;
   SBMLError *result = 0 ;
@@ -43671,15 +43740,14 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   arg5 = (unsigned int)jarg5; 
   arg6 = (unsigned int)jarg6; 
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5,arg6);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5,arg6);
   *(SBMLError **)&jresult = result; 
   return jresult;
 }
@@ -43690,7 +43758,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   unsigned int arg5 ;
   SBMLError *result = 0 ;
   
@@ -43702,14 +43770,13 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
   arg5 = (unsigned int)jarg5; 
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4,arg5);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4,arg5);
   *(SBMLError **)&jresult = result; 
   return jresult;
 }
@@ -43720,7 +43787,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   unsigned int arg1 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
-  std::string *arg4 = 0 ;
+  std::string arg4 ;
   SBMLError *result = 0 ;
   
   (void)jenv;
@@ -43731,13 +43798,12 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1SBMLError_1_1SWIG
   if(!jarg4) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return 0;
-  }
+  } 
   const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
   if (!arg4_pstr) return 0;
-  std::string arg4_str(arg4_pstr);
-  arg4 = &arg4_str;
+  (&arg4)->assign(arg4_pstr);
   jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
-  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,(std::string const &)*arg4);
+  result = (SBMLError *)new SBMLError(arg1,arg2,arg3,arg4);
   *(SBMLError **)&jresult = result; 
   return jresult;
 }
@@ -48209,6 +48275,160 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLExtensionRegistry_
 }
 
 
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_delete_1Callback(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+  Callback *arg1 = (Callback *) 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  arg1 = *(Callback **)&jarg1; 
+  delete arg1;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Callback_1process(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+  jint jresult = 0 ;
+  Callback *arg1 = (Callback *) 0 ;
+  SBMLDocument *arg2 = (SBMLDocument *) 0 ;
+  int result;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  (void)jarg2_;
+  arg1 = *(Callback **)&jarg1; 
+  arg2 = *(SBMLDocument **)&jarg2; 
+  result = (int)(arg1)->process(arg2);
+  jresult = (jint)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_Callback_1processSwigExplicitCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+  jint jresult = 0 ;
+  Callback *arg1 = (Callback *) 0 ;
+  SBMLDocument *arg2 = (SBMLDocument *) 0 ;
+  int result;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  (void)jarg2_;
+  arg1 = *(Callback **)&jarg1; 
+  arg2 = *(SBMLDocument **)&jarg2; 
+  result = (int)(arg1)->Callback::process(arg2);
+  jresult = (jint)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1Callback(JNIEnv *jenv, jclass jcls) {
+  jlong jresult = 0 ;
+  Callback *result = 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  result = (Callback *)new SwigDirector_Callback(jenv);
+  *(Callback **)&jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_Callback_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) {
+  Callback *obj = *((Callback **)&objarg);
+  (void)jcls;
+  SwigDirector_Callback *director = dynamic_cast<SwigDirector_Callback *>(obj);
+  if (director) {
+    director->swig_connect_director(jenv, jself, jenv->GetObjectClass(jself), (jswig_mem_own == JNI_TRUE), (jweak_global == JNI_TRUE));
+  }
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_Callback_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) {
+  Callback *obj = *((Callback **)&objarg);
+  SwigDirector_Callback *director = dynamic_cast<SwigDirector_Callback *>(obj);
+  (void)jcls;
+  if (director) {
+    director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false);
+  }
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_CallbackRegistry_1invokeCallbacks(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+  jint jresult = 0 ;
+  SBMLDocument *arg1 = (SBMLDocument *) 0 ;
+  int result;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  arg1 = *(SBMLDocument **)&jarg1; 
+  result = (int)CallbackRegistry::invokeCallbacks(arg1);
+  jresult = (jint)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_CallbackRegistry_1clearCallbacks(JNIEnv *jenv, jclass jcls) {
+  (void)jenv;
+  (void)jcls;
+  CallbackRegistry::clearCallbacks();
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_CallbackRegistry_1addCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+  Callback *arg1 = (Callback *) 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  arg1 = *(Callback **)&jarg1; 
+  CallbackRegistry::addCallback(arg1);
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_CallbackRegistry_1getNumCallbacks(JNIEnv *jenv, jclass jcls) {
+  jint jresult = 0 ;
+  int result;
+  
+  (void)jenv;
+  (void)jcls;
+  result = (int)CallbackRegistry::getNumCallbacks();
+  jresult = (jint)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_CallbackRegistry_1removeCallback_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jint jarg1) {
+  int arg1 ;
+  
+  (void)jenv;
+  (void)jcls;
+  arg1 = (int)jarg1; 
+  CallbackRegistry::removeCallback(arg1);
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_CallbackRegistry_1removeCallback_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+  Callback *arg1 = (Callback *) 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  arg1 = *(Callback **)&jarg1; 
+  CallbackRegistry::removeCallback(arg1);
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_delete_1CallbackRegistry(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+  CallbackRegistry *arg1 = (CallbackRegistry *) 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  arg1 = *(CallbackRegistry **)&jarg1; 
+  delete arg1;
+}
+
+
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1ASTNode_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jint jarg1) {
   jlong jresult = 0 ;
   ASTNodeType_t arg1 ;
@@ -49785,7 +50005,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTNode_1getDefinition
 
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTNode_1replaceArgument(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_) {
   ASTNode *arg1 = (ASTNode *) 0 ;
-  std::string arg2 ;
+  std::string *arg2 = 0 ;
   ASTNode *arg3 = (ASTNode *) 0 ;
   
   (void)jenv;
@@ -49796,13 +50016,14 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTNode_1replaceArgumen
   if(!jarg2) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
     return ;
-  } 
+  }
   const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
   if (!arg2_pstr) return ;
-  (&arg2)->assign(arg2_pstr);
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
   jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
   arg3 = *(ASTNode **)&jarg3; 
-  (arg1)->replaceArgument(arg2,arg3);
+  (arg1)->replaceArgument((std::string const &)*arg2,arg3);
 }
 
 
@@ -50137,7 +50358,36 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTNode_1getASTPlugin_
 }
 
 
-SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTNode_1getASTPlugin_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jboolean jarg3) {
+SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTNode_1getASTPlugin_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jboolean jarg3, jboolean jarg4) {
+  jlong jresult = 0 ;
+  ASTNode *arg1 = (ASTNode *) 0 ;
+  std::string *arg2 = 0 ;
+  bool arg3 ;
+  bool arg4 ;
+  ASTBasePlugin *result = 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  arg1 = *(ASTNode **)&jarg1; 
+  if(!jarg2) {
+    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+    return 0;
+  }
+  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
+  if (!arg2_pstr) return 0;
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
+  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
+  arg3 = jarg3 ? true : false; 
+  arg4 = jarg4 ? true : false; 
+  result = (ASTBasePlugin *)(arg1)->getASTPlugin((std::string const &)*arg2,arg3,arg4);
+  *(ASTBasePlugin **)&jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTNode_1getASTPlugin_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jboolean jarg3) {
   jlong jresult = 0 ;
   ASTNode *arg1 = (ASTNode *) 0 ;
   std::string *arg2 = 0 ;
@@ -50164,7 +50414,7 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTNode_1getASTPlugin_
 }
 
 
-SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTNode_1getASTPlugin_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTNode_1getASTPlugin_1_1SWIG_14(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jlong jresult = 0 ;
   ASTNode *arg1 = (ASTNode *) 0 ;
   std::string *arg2 = 0 ;
@@ -50967,6 +51217,204 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_L3ParserSettings_1visit
 }
 
 
+SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_DefinitionURLRegistry_1getInstance(JNIEnv *jenv, jclass jcls) {
+  jlong jresult = 0 ;
+  DefinitionURLRegistry *result = 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  result = (DefinitionURLRegistry *) &DefinitionURLRegistry::getInstance();
+  *(DefinitionURLRegistry **)&jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_DefinitionURLRegistry_1addDefinitionURL(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
+  jint jresult = 0 ;
+  std::string *arg1 = 0 ;
+  int arg2 ;
+  int result;
+  
+  (void)jenv;
+  (void)jcls;
+  if(!jarg1) {
+    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+    return 0;
+  }
+  const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); 
+  if (!arg1_pstr) return 0;
+  std::string arg1_str(arg1_pstr);
+  arg1 = &arg1_str;
+  jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); 
+  arg2 = (int)jarg2; 
+  result = (int)DefinitionURLRegistry::addDefinitionURL((std::string const &)*arg1,arg2);
+  jresult = (jint)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_DefinitionURLRegistry_1getNumDefinitionURLs(JNIEnv *jenv, jclass jcls) {
+  jint jresult = 0 ;
+  int result;
+  
+  (void)jenv;
+  (void)jcls;
+  result = (int)DefinitionURLRegistry::getNumDefinitionURLs();
+  jresult = (jint)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_DefinitionURLRegistry_1addSBMLDefinitions(JNIEnv *jenv, jclass jcls) {
+  (void)jenv;
+  (void)jcls;
+  DefinitionURLRegistry::addSBMLDefinitions();
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_delete_1DefinitionURLRegistry(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+  DefinitionURLRegistry *arg1 = (DefinitionURLRegistry *) 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  arg1 = *(DefinitionURLRegistry **)&jarg1; 
+  delete arg1;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_DefinitionURLRegistry_1getCoreDefinitionsAdded(JNIEnv *jenv, jclass jcls) {
+  jboolean jresult = 0 ;
+  bool result;
+  
+  (void)jenv;
+  (void)jcls;
+  result = (bool)DefinitionURLRegistry::getCoreDefinitionsAdded();
+  jresult = (jboolean)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_DefinitionURLRegistry_1getType(JNIEnv *jenv, jclass jcls, jstring jarg1) {
+  jint jresult = 0 ;
+  std::string *arg1 = 0 ;
+  int result;
+  
+  (void)jenv;
+  (void)jcls;
+  if(!jarg1) {
+    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+    return 0;
+  }
+  const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); 
+  if (!arg1_pstr) return 0;
+  std::string arg1_str(arg1_pstr);
+  arg1 = &arg1_str;
+  jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); 
+  result = (int)DefinitionURLRegistry::getType((std::string const &)*arg1);
+  jresult = (jint)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_sbml_libsbml_libsbmlJNI_DefinitionURLRegistry_1getDefinitionUrlByIndex(JNIEnv *jenv, jclass jcls, jint jarg1) {
+  jstring jresult = 0 ;
+  int arg1 ;
+  std::string result;
+  
+  (void)jenv;
+  (void)jcls;
+  arg1 = (int)jarg1; 
+  result = DefinitionURLRegistry::getDefinitionUrlByIndex(arg1);
+  jresult = jenv->NewStringUTF((&result)->c_str()); 
+  return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_DefinitionURLRegistry_1clearDefinitions(JNIEnv *jenv, jclass jcls) {
+  (void)jenv;
+  (void)jcls;
+  DefinitionURLRegistry::clearDefinitions();
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_new_1MathFilter(JNIEnv *jenv, jclass jcls) {
+  jlong jresult = 0 ;
+  MathFilter *result = 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  result = (MathFilter *)new SwigDirector_MathFilter(jenv);
+  *(MathFilter **)&jresult = result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_delete_1MathFilter(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+  MathFilter *arg1 = (MathFilter *) 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  arg1 = *(MathFilter **)&jarg1; 
+  delete arg1;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_MathFilter_1filter(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+  jboolean jresult = 0 ;
+  MathFilter *arg1 = (MathFilter *) 0 ;
+  SBase *arg2 = (SBase *) 0 ;
+  bool result;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  (void)jarg2_;
+  arg1 = *(MathFilter **)&jarg1; 
+  arg2 = *(SBase **)&jarg2; 
+  result = (bool)(arg1)->filter((SBase const *)arg2);
+  jresult = (jboolean)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_MathFilter_1filterSwigExplicitMathFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+  jboolean jresult = 0 ;
+  MathFilter *arg1 = (MathFilter *) 0 ;
+  SBase *arg2 = (SBase *) 0 ;
+  bool result;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  (void)jarg2_;
+  arg1 = *(MathFilter **)&jarg1; 
+  arg2 = *(SBase **)&jarg2; 
+  result = (bool)(arg1)->MathFilter::filter((SBase const *)arg2);
+  jresult = (jboolean)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_MathFilter_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) {
+  MathFilter *obj = *((MathFilter **)&objarg);
+  (void)jcls;
+  SwigDirector_MathFilter *director = dynamic_cast<SwigDirector_MathFilter *>(obj);
+  if (director) {
+    director->swig_connect_director(jenv, jself, jenv->GetObjectClass(jself), (jswig_mem_own == JNI_TRUE), (jweak_global == JNI_TRUE));
+  }
+}
+
+
+SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_MathFilter_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) {
+  MathFilter *obj = *((MathFilter **)&objarg);
+  SwigDirector_MathFilter *director = dynamic_cast<SwigDirector_MathFilter *>(obj);
+  (void)jcls;
+  if (director) {
+    director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false);
+  }
+}
+
+
 SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTNodeValues_1t_1name_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   ASTNodeValues_t *arg1 = (ASTNodeValues_t *) 0 ;
   std::string *arg2 = 0 ;
@@ -51315,7 +51763,34 @@ SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTBasePlugin_1defi
 }
 
 
-SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTBasePlugin_1defines_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTBasePlugin_1defines_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jboolean jarg3) {
+  jboolean jresult = 0 ;
+  ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
+  std::string *arg2 = 0 ;
+  bool arg3 ;
+  bool result;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  arg1 = *(ASTBasePlugin **)&jarg1; 
+  if(!jarg2) {
+    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+    return 0;
+  }
+  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
+  if (!arg2_pstr) return 0;
+  std::string arg2_str(arg2_pstr);
+  arg2 = &arg2_str;
+  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
+  arg3 = jarg3 ? true : false; 
+  result = (bool)((ASTBasePlugin const *)arg1)->defines((std::string const &)*arg2,arg3);
+  jresult = (jboolean)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTBasePlugin_1defines_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
   jboolean jresult = 0 ;
   ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
   std::string *arg2 = 0 ;
@@ -51494,6 +51969,23 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTBasePlugin_1getUnit
 }
 
 
+SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTBasePlugin_1getASTNodeValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+  jlong jresult = 0 ;
+  ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
+  unsigned int arg2 ;
+  ASTNodeValues_t *result = 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  arg1 = *(ASTBasePlugin **)&jarg1; 
+  arg2 = (unsigned int)jarg2; 
+  result = (ASTNodeValues_t *)((ASTBasePlugin const *)arg1)->getASTNodeValue(arg2);
+  *(ASTNodeValues_t **)&jresult = result; 
+  return jresult;
+}
+
+
 SWIGEXPORT jint JNICALL Java_org_sbml_libsbml_libsbmlJNI_ASTBasePlugin_1allowedInFunctionDefinition(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
   jint jresult = 0 ;
   ASTBasePlugin *arg1 = (ASTBasePlugin *) 0 ;
@@ -53512,6 +54004,14 @@ SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_SBMLDocumentPlugin_1SW
     return baseptr;
 }
 
+SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_MathFilter_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+    jlong baseptr = 0;
+    (void)jenv;
+    (void)jcls;
+    *(ElementFilter **)&baseptr = *(MathFilter **)&jarg1;
+    return baseptr;
+}
+
 SWIGEXPORT jlong JNICALL Java_org_sbml_libsbml_libsbmlJNI_L3v2extendedmathPkgNamespaces_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
     jlong baseptr = 0;
     (void)jenv;
@@ -53550,7 +54050,7 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_swig_1module_1init(JNIE
   static struct {
     const char *method;
     const char *signature;
-  } methods[18] = {
+  } methods[20] = {
     {
       "SwigDirector_IdentifierTransformer_transform", "(Lorg/sbml/libsbml/IdentifierTransformer;J)I" 
     },
@@ -53604,6 +54104,12 @@ SWIGEXPORT void JNICALL Java_org_sbml_libsbml_libsbmlJNI_swig_1module_1init(JNIE
     },
     {
       "SwigDirector_SBMLValidator_clearFailures", "(Lorg/sbml/libsbml/SBMLValidator;)V" 
+    },
+    {
+      "SwigDirector_Callback_process", "(Lorg/sbml/libsbml/Callback;J)I" 
+    },
+    {
+      "SwigDirector_MathFilter_filter", "(Lorg/sbml/libsbml/MathFilter;J)Z" 
     }
   };
   Swig::jclass_libsbmlJNI = (jclass) jenv->NewGlobalRef(jcls);
diff --git a/src/bindings/java/libsbml_wrap.h b/src/bindings/java/libsbml_wrap.h
index 0ef1a071..04dd8417 100644
--- a/src/bindings/java/libsbml_wrap.h
+++ b/src/bindings/java/libsbml_wrap.h
@@ -89,5 +89,35 @@ protected:
     Swig::BoolArray<6> swig_override;
 };
 
+class SwigDirector_Callback : public Callback, public Swig::Director {
+
+public:
+    void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global);
+    SwigDirector_Callback(JNIEnv *jenv);
+    virtual ~SwigDirector_Callback();
+    virtual int process(SBMLDocument *doc);
+public:
+    bool swig_overrides(int n) {
+      return (n < 1 ? swig_override[n] : false);
+    }
+protected:
+    Swig::BoolArray<1> swig_override;
+};
+
+class SwigDirector_MathFilter : public MathFilter, public Swig::Director {
+
+public:
+    void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global);
+    SwigDirector_MathFilter(JNIEnv *jenv);
+    virtual ~SwigDirector_MathFilter();
+    virtual bool filter(SBase const *element);
+public:
+    bool swig_overrides(int n) {
+      return (n < 1 ? swig_override[n] : false);
+    }
+protected:
+    Swig::BoolArray<1> swig_override;
+};
+
 
 #endif
diff --git a/src/bindings/java/local-downcast-extension-arrays.i b/src/bindings/java/local-downcast-extension-arrays.i
index 086ff8ac..15c74cd1 100644
--- a/src/bindings/java/local-downcast-extension-arrays.i
+++ b/src/bindings/java/local-downcast-extension-arrays.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-downcast-extension-distrib.i b/src/bindings/java/local-downcast-extension-distrib.i
index 5532fffe..b9988f77 100644
--- a/src/bindings/java/local-downcast-extension-distrib.i
+++ b/src/bindings/java/local-downcast-extension-distrib.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-downcast-extension-l3v2extendedmath.i b/src/bindings/java/local-downcast-extension-l3v2extendedmath.i
index ff42d03a..bd3e32f3 100644
--- a/src/bindings/java/local-downcast-extension-l3v2extendedmath.i
+++ b/src/bindings/java/local-downcast-extension-l3v2extendedmath.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-downcast-extension-spatial.i b/src/bindings/java/local-downcast-extension-spatial.i
index fd5c05b8..4ae64800 100644
--- a/src/bindings/java/local-downcast-extension-spatial.i
+++ b/src/bindings/java/local-downcast-extension-spatial.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-downcast-namespaces-arrays.i b/src/bindings/java/local-downcast-namespaces-arrays.i
index 5f69a76a..d5b6db89 100644
--- a/src/bindings/java/local-downcast-namespaces-arrays.i
+++ b/src/bindings/java/local-downcast-namespaces-arrays.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-downcast-namespaces-distrib.i b/src/bindings/java/local-downcast-namespaces-distrib.i
index bc02cf33..045e8221 100644
--- a/src/bindings/java/local-downcast-namespaces-distrib.i
+++ b/src/bindings/java/local-downcast-namespaces-distrib.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
@@ -39,10 +43,6 @@
   {
     return new DistribPkgNamespaces(cPtr, owner);
   }
-  else if (ns.hasURI(DistribExtension.getXmlnsL3V2V1()))
-  {
-    return new DistribPkgNamespaces(cPtr, owner);
-  }
 %}
 #endif /* USE_DISTRIB */
 
diff --git a/src/bindings/java/local-downcast-namespaces-l3v2extendedmath.i b/src/bindings/java/local-downcast-namespaces-l3v2extendedmath.i
index 45f5de01..9a707c44 100644
--- a/src/bindings/java/local-downcast-namespaces-l3v2extendedmath.i
+++ b/src/bindings/java/local-downcast-namespaces-l3v2extendedmath.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-downcast-namespaces-spatial.i b/src/bindings/java/local-downcast-namespaces-spatial.i
index 2567f79a..27dabafa 100644
--- a/src/bindings/java/local-downcast-namespaces-spatial.i
+++ b/src/bindings/java/local-downcast-namespaces-spatial.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-packages-arrays.i b/src/bindings/java/local-packages-arrays.i
index d2d7aa61..8ba21921 100644
--- a/src/bindings/java/local-packages-arrays.i
+++ b/src/bindings/java/local-packages-arrays.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-packages-distrib.i b/src/bindings/java/local-packages-distrib.i
index f97f85cb..b69fe216 100644
--- a/src/bindings/java/local-packages-distrib.i
+++ b/src/bindings/java/local-packages-distrib.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
@@ -44,9 +48,6 @@
 
     switch ( sb.getTypeCode() )
     {
-      case (int) libsbml.SBML_FUNCTION_DEFINITION:
-        return new DistribFunctionDefinitionPlugin(cPtr, owner);
-
       case (int) libsbml.SBML_DOCUMENT:
         return new DistribSBMLDocumentPlugin(cPtr, owner);
 
@@ -64,119 +65,26 @@
     {
       case (int) libsbml.SBML_LIST_OF:
         String name = sb.getElementName();
-        if (name.equals("listOfDistribInputs"))
+        if (name.equals("listOfUncertParameters"))
         {
-          return new ListOfDistribInputs(cPtr, owner);
+          return new ListOfUncertParameters(cPtr, owner);
         }
-        else if (name.equals("listOfExternalParameters"))
+        else if (name.equals("listOfUncertainties"))
         {
-          return new ListOfDistribExternalParameters(cPtr, owner);
-        }
-        else if (name.equals("listOfCategories"))
-        {
-          return new ListOfDistribCategories(cPtr, owner);
+          return new ListOfUncertainties(cPtr, owner);
         }
 
         return new ListOf(cPtr, owner);
 
-      case (int) libsbml.SBML_DISTRIB_DRAWFROMDISTRIBUTION:
-        return new DistribDrawFromDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_DISTRIBINPUT:
-        return new DistribInput(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_UNCERTVALUE:
-        return new DistribUncertValue(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_UNCERTBOUND:
-        return new DistribUncertBound(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_EXTERNALDISTRIBUTION:
-        return new DistribExternalDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_EXTERNALPARAMETER:
-        return new DistribExternalParameter(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_NORMALDISTRIBUTION:
-        return new DistribNormalDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_UNIFORMDISTRIBUTION:
-        return new DistribUniformDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_CATEGORICALDISTRIBUTION:
-        return new DistribCategoricalDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_CATEGORY:
-        return new DistribCategory(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_BERNOULLIDISTRIBUTION:
-        return new DistribBernoulliDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_BETADISTRIBUTION:
-        return new DistribBetaDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_BINOMIALDISTRIBUTION:
-        return new DistribBinomialDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_CAUCHYDISTRIBUTION:
-        return new DistribCauchyDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_CHISQUAREDISTRIBUTION:
-        return new DistribChiSquareDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_EXPONENTIALDISTRIBUTION:
-        return new DistribExponentialDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_FDISTRIBUTION:
-        return new DistribFDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_GAMMADISTRIBUTION:
-        return new DistribGammaDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_GEOMETRICLDISTRIBUTION:
-        return new DistribGeometricDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_HYPERGEOMETRICDISTRIBUTION:
-        return new DistribHypergeometricDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_INVERSEGAMMADISTRIBUTION:
-        return new DistribInverseGammaDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_LAPLACEDISTRIBUTION:
-        return new DistribLaPlaceDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_LOGNORMALDISTRIBUTION:
-        return new DistribLogNormalDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_LOGISTICDISTRIBUTION:
-        return new DistribLogisticDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_NEGATIVEBINOMIALDISTRIBUTION:
-        return new DistribNegativeBinomialDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_PARETODISTRIBUTION:
-        return new DistribParetoDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_POISSONDISTRIBUTION:
-        return new DistribPoissonDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_RAYLEIGHDISTRIBUTION:
-        return new DistribRayleighDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_STUDENTTDISTRIBUTION:
-        return new DistribStudentTDistribution(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_WEIBULLDISTRIBUTION:
-        return new DistribWeibullDistribution(cPtr, owner);
+      case (int) libsbml.SBML_DISTRIB_UNCERTPARAMETER:
+        return new UncertParameter(cPtr, owner);
 
       case (int) libsbml.SBML_DISTRIB_UNCERTAINTY:
-        return new DistribUncertainty(cPtr, owner);
-
-      case (int) libsbml.SBML_DISTRIB_UNCERTSTATISTICS:
-        return new DistribUncertStatistics(cPtr, owner);
+        return new Uncertainty(cPtr, owner);
 
       case (int) libsbml.SBML_DISTRIB_UNCERTSTATISTICSPAN:
-        return new DistribUncertStatisticSpan(cPtr, owner);
+        return new UncertSpan(cPtr, owner);
+
 
       default:
         return new SBase(cPtr, owner);
@@ -186,114 +94,30 @@
 %}
 
 COVARIANT_RTYPE_CLONE(DistribExtension)
-COVARIANT_RTYPE_CLONE(DistribDrawFromDistribution)
-COVARIANT_RTYPE_CLONE(DistribInput)
-COVARIANT_RTYPE_CLONE(DistribUncertValue)
-COVARIANT_RTYPE_CLONE(DistribUncertBound)
-COVARIANT_RTYPE_CLONE(DistribExternalDistribution)
-COVARIANT_RTYPE_CLONE(DistribExternalParameter)
-COVARIANT_RTYPE_CLONE(DistribNormalDistribution)
-COVARIANT_RTYPE_CLONE(DistribUniformDistribution)
-COVARIANT_RTYPE_CLONE(DistribCategoricalDistribution)
-COVARIANT_RTYPE_CLONE(DistribCategory)
-COVARIANT_RTYPE_CLONE(DistribBernoulliDistribution)
-COVARIANT_RTYPE_CLONE(DistribBetaDistribution)
-COVARIANT_RTYPE_CLONE(DistribBinomialDistribution)
-COVARIANT_RTYPE_CLONE(DistribCauchyDistribution)
-COVARIANT_RTYPE_CLONE(DistribChiSquareDistribution)
-COVARIANT_RTYPE_CLONE(DistribExponentialDistribution)
-COVARIANT_RTYPE_CLONE(DistribFDistribution)
-COVARIANT_RTYPE_CLONE(DistribGammaDistribution)
-COVARIANT_RTYPE_CLONE(DistribGeometricDistribution)
-COVARIANT_RTYPE_CLONE(DistribHypergeometricDistribution)
-COVARIANT_RTYPE_CLONE(DistribInverseGammaDistribution)
-COVARIANT_RTYPE_CLONE(DistribLaPlaceDistribution)
-COVARIANT_RTYPE_CLONE(DistribLogNormalDistribution)
-COVARIANT_RTYPE_CLONE(DistribLogisticDistribution)
-COVARIANT_RTYPE_CLONE(DistribNegativeBinomialDistribution)
-COVARIANT_RTYPE_CLONE(DistribParetoDistribution)
-COVARIANT_RTYPE_CLONE(DistribPoissonDistribution)
-COVARIANT_RTYPE_CLONE(DistribRayleighDistribution)
-COVARIANT_RTYPE_CLONE(DistribStudentTDistribution)
-COVARIANT_RTYPE_CLONE(DistribWeibullDistribution)
-COVARIANT_RTYPE_CLONE(DistribUncertainty)
-COVARIANT_RTYPE_CLONE(DistribUncertStatistics)
-COVARIANT_RTYPE_CLONE(DistribUncertStatisticSpan)
-COVARIANT_RTYPE_CLONE(ListOfDistribInputs)
-COVARIANT_RTYPE_CLONE(ListOfDistribExternalParameters)
-COVARIANT_RTYPE_CLONE(ListOfDistribCategories)
+COVARIANT_RTYPE_CLONE(UncertParameter)
+COVARIANT_RTYPE_CLONE(Uncertainty)
+COVARIANT_RTYPE_CLONE(UncertSpan)
 
-COVARIANT_RTYPE_LISTOF_GET_REMOVE(DistribInput)
-COVARIANT_RTYPE_LISTOF_GET_REMOVE(DistribExternalParameter)
-COVARIANT_RTYPE_LISTOF_GET_REMOVE(DistribCategory)
-
-SBMLCONSTRUCTOR_EXCEPTION(DistribPkgNamespaces)
-SBMLCONSTRUCTOR_EXCEPTION(DistribDrawFromDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribInput)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertValue)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertBound)
-SBMLCONSTRUCTOR_EXCEPTION(DistribExternalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribExternalParameter)
-SBMLCONSTRUCTOR_EXCEPTION(DistribNormalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUniformDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribCategoricalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribCategory)
-SBMLCONSTRUCTOR_EXCEPTION(DistribBernoulliDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribBetaDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribBinomialDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribCauchyDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribChiSquareDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribExponentialDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribFDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribGammaDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribGeometricDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribHypergeometricDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribInverseGammaDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribLaPlaceDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribLogNormalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribLogisticDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribNegativeBinomialDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribParetoDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribPoissonDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribRayleighDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribStudentTDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribWeibullDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertainty)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertStatistics)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertStatisticSpan)
-SBMLCONSTRUCTOR_EXCEPTION(ListOfDistribInputs)
-SBMLCONSTRUCTOR_EXCEPTION(ListOfDistribExternalParameters)
-SBMLCONSTRUCTOR_EXCEPTION(ListOfDistribCategories)
+COVARIANT_RTYPE_CLONE(ListOfUncertParameters)
+COVARIANT_RTYPE_CLONE(ListOfUncertainties)
 
+COVARIANT_RTYPE_LISTOF_GET_REMOVE(UncertParameter)
+COVARIANT_RTYPE_LISTOF_GET_REMOVE(Uncertainty)
 
-//
-// Convert DistribContinuousUnivariateDistribution objects into the most
-//  specific object possible.
-//
-%typemap("javaout") DistribContinuousUnivariateDistribution*
-{
-  return (DistribContinuousUnivariateDistribution)
-    libsbml.DowncastSBase($jnicall, $owner);
-}
+SBMLCONSTRUCTOR_EXCEPTION(DistribPkgNamespaces)
+SBMLCONSTRUCTOR_EXCEPTION(UncertParameter)
+SBMLCONSTRUCTOR_EXCEPTION(Uncertainty)
+SBMLCONSTRUCTOR_EXCEPTION(UncertSpan)
 
-//
-// Convert DistribDiscreteUnivariateDistribution objects into the most specific
-//  object possible.
-//
-%typemap("javaout") DistribDiscreteUnivariateDistribution*
-{
-  return (DistribDiscreteUnivariateDistribution)
-    libsbml.DowncastSBase($jnicall, $owner);
-}
+SBMLCONSTRUCTOR_EXCEPTION(ListOfUncertParameters)
+SBMLCONSTRUCTOR_EXCEPTION(ListOfUncertainties)
 
 //
-// Convert DistribCategoricalUnivariateDistribution objects into the most
-//  specific object possible.
+// Convert UncertParameter objects into the most specific object possible.
 //
-%typemap("javaout") DistribCategoricalUnivariateDistribution*
+%typemap("javaout") UncertParameter*
 {
-  return (DistribCategoricalUnivariateDistribution)
-    libsbml.DowncastSBase($jnicall, $owner);
+  return (UncertParameter) libsbml.DowncastSBase($jnicall, $owner);
 }
 
 
diff --git a/src/bindings/java/local-packages-dyn.i b/src/bindings/java/local-packages-dyn.i
index 424c0eb1..573cf753 100644
--- a/src/bindings/java/local-packages-dyn.i
+++ b/src/bindings/java/local-packages-dyn.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-packages-fbc.i b/src/bindings/java/local-packages-fbc.i
index d5d67aeb..6ff760d1 100644
--- a/src/bindings/java/local-packages-fbc.i
+++ b/src/bindings/java/local-packages-fbc.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-packages-l3v2extendedmath.i b/src/bindings/java/local-packages-l3v2extendedmath.i
index 67067db4..21b86d8c 100644
--- a/src/bindings/java/local-packages-l3v2extendedmath.i
+++ b/src/bindings/java/local-packages-l3v2extendedmath.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-packages-multi.i b/src/bindings/java/local-packages-multi.i
index 1fd120ed..5a54a755 100644
--- a/src/bindings/java/local-packages-multi.i
+++ b/src/bindings/java/local-packages-multi.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-packages-req.i b/src/bindings/java/local-packages-req.i
index c52e678c..5eb1eb9e 100644
--- a/src/bindings/java/local-packages-req.i
+++ b/src/bindings/java/local-packages-req.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local-packages-spatial.i b/src/bindings/java/local-packages-spatial.i
index aab61760..61626dc6 100644
--- a/src/bindings/java/local-packages-spatial.i
+++ b/src/bindings/java/local-packages-spatial.i
@@ -1,35 +1,41 @@
 /**
- * @file:   local-packages-spatial.i
- * @brief:  Implementation of the spatial class
- * @author: SBMLTeam
+ * @file local-packages-spatial.i
+ * @brief Casting to most specific packages object for java
+ * @author SBMLTeam
  *
  * <!--------------------------------------------------------------------------
- * This file is part of libSBML.  Please visit http://sbml.org for more
+ * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
- *     1. California Institute of Technology, Pasadena, CA, USA
- *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
- *     3. University of Heidelberg, Heidelberg, Germany
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
+ * 3. University of Heidelberg, Heidelberg, Germany
  *
  * Copyright (C) 2009-2013 jointly by the following organizations:
- *     1. California Institute of Technology, Pasadena, CA, USA
- *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
  *
  * Copyright (C) 2006-2008 by the California Institute of Technology,
- *     Pasadena, CA, USA 
+ * Pasadena, CA, USA
  *
  * Copyright (C) 2002-2005 jointly by the following organizations:
- *     1. California Institute of Technology, Pasadena, CA, USA
- *     2. Japan Science and Technology Agency, Japan
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. Japan Science and Technology Agency, Japan
  *
  * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation.  A copy of the license agreement is provided
- * in the file named "LICENSE.txt" included with this software distribution
- * and also available online as http://sbml.org/software/libsbml/license.html
+ * under the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation. A copy of the license agreement is provided in the
+ * file named "LICENSE.txt" included with this software distribution and also
+ * available online as http://sbml.org/software/libsbml/license.html
  * ------------------------------------------------------------------------ -->
  */
+
+
 #ifdef USE_SPATIAL
 
 
@@ -112,55 +118,55 @@ void TransformationComponents::getComponents(double* outputComponents);
     {
       case (int) libsbml.SBML_LIST_OF:
         String name = sb.getElementName();
-        if (name == "listOfDomainTypes")
+        if (name.equals("listOfDomainTypes"))
         {
           return new ListOfDomainTypes(cPtr, owner);
         }
-        else if (name == "listOfDomains")
+        else if (name.equals("listOfDomains"))
         {
           return new ListOfDomains(cPtr, owner);
         }
-        else if (name == "listOfInteriorPoints")
+        else if (name.equals("listOfInteriorPoints"))
         {
           return new ListOfInteriorPoints(cPtr, owner);
         }
-        else if (name == "listOfAdjacentDomains")
+        else if (name.equals("listOfAdjacentDomains"))
         {
           return new ListOfAdjacentDomains(cPtr, owner);
         }
-        else if (name == "listOfGeometryDefinitions")
+        else if (name.equals("listOfGeometryDefinitions"))
         {
           return new ListOfGeometryDefinitions(cPtr, owner);
         }
-        else if (name == "listOfCoordinateComponents")
+        else if (name.equals("listOfCoordinateComponents"))
         {
           return new ListOfCoordinateComponents(cPtr, owner);
         }
-        else if (name == "listOfSampledFields")
+        else if (name.equals("listOfSampledFields"))
         {
           return new ListOfSampledFields(cPtr, owner);
         }
-        else if (name == "listOfSampledVolumes")
+        else if (name.equals("listOfSampledVolumes"))
         {
           return new ListOfSampledVolumes(cPtr, owner);
         }
-        else if (name == "listOfAnalyticVolumes")
+        else if (name.equals("listOfAnalyticVolumes"))
         {
           return new ListOfAnalyticVolumes(cPtr, owner);
         }
-        else if (name == "listOfParametricObjects")
+        else if (name.equals("listOfParametricObjects"))
         {
           return new ListOfParametricObjects(cPtr, owner);
         }
-        else if (name == "listOfCSGObjects")
+        else if (name.equals("listOfCSGObjects"))
         {
           return new ListOfCSGObjects(cPtr, owner);
         }
-        else if (name == "listOfCSGNodes")
+        else if (name.equals("listOfCSGNodes"))
         {
           return new ListOfCSGNodes(cPtr, owner);
         }
-        else if (name == "listOfOrdinalMappings")
+        else if (name.equals("listOfOrdinalMappings"))
         {
           return new ListOfOrdinalMappings(cPtr, owner);
         }
@@ -393,7 +399,7 @@ SBMLCONSTRUCTOR_EXCEPTION(ListOfOrdinalMappings)
 //
 %typemap("javaout") GeometryDefinition*
 {
-	return (GeometryDefinition) libsbml.DowncastSBase($jnicall, $owner);
+  return (GeometryDefinition) libsbml.DowncastSBase($jnicall, $owner);
 }
 
 //
@@ -401,7 +407,7 @@ SBMLCONSTRUCTOR_EXCEPTION(ListOfOrdinalMappings)
 //
 %typemap("javaout") CSGNode*
 {
-	return (CSGNode) libsbml.DowncastSBase($jnicall, $owner);
+  return (CSGNode) libsbml.DowncastSBase($jnicall, $owner);
 }
 
 //
@@ -409,9 +415,9 @@ SBMLCONSTRUCTOR_EXCEPTION(ListOfOrdinalMappings)
 //
 %typemap("javaout") CSGTransformation*
 {
-	return (CSGTransformation) libsbml.DowncastSBase($jnicall, $owner);
+  return (CSGTransformation) libsbml.DowncastSBase($jnicall, $owner);
 }
 
 
-#endif /* USE_SPATIAL */
+#endif // USE_SPATIAL
 
diff --git a/src/bindings/java/local.cpp b/src/bindings/java/local.cpp
index ff8a35ff..e3695311 100644
--- a/src/bindings/java/local.cpp
+++ b/src/bindings/java/local.cpp
@@ -8,6 +8,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/java/local.i b/src/bindings/java/local.i
index acaa2fa4..bafb23fc 100644
--- a/src/bindings/java/local.i
+++ b/src/bindings/java/local.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/javascript/libsbml.i b/src/bindings/javascript/libsbml.i
index 595b1c1f..432f989a 100644
--- a/src/bindings/javascript/libsbml.i
+++ b/src/bindings/javascript/libsbml.i
@@ -9,6 +9,10 @@
  * This file is part of libSBML.  Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  *     1. California Institute of Technology, Pasadena, CA, USA
  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/javascript/local-arrays.i b/src/bindings/javascript/local-arrays.i
index 366c474f..eced5902 100644
--- a/src/bindings/javascript/local-arrays.i
+++ b/src/bindings/javascript/local-arrays.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/javascript/local-distrib.i b/src/bindings/javascript/local-distrib.i
index 95cc90a4..ad74bc72 100644
--- a/src/bindings/javascript/local-distrib.i
+++ b/src/bindings/javascript/local-distrib.i
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
@@ -35,69 +39,31 @@
 #ifdef USE_DISTRIB
 
 SBMLCONSTRUCTOR_EXCEPTION(DistribPkgNamespaces)
-SBMLCONSTRUCTOR_EXCEPTION(DistribDrawFromDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribInput)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertValue)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertBound)
-SBMLCONSTRUCTOR_EXCEPTION(DistribExternalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribExternalParameter)
-SBMLCONSTRUCTOR_EXCEPTION(DistribNormalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUniformDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribCategoricalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribCategory)
-SBMLCONSTRUCTOR_EXCEPTION(DistribBernoulliDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribBetaDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribBinomialDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribCauchyDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribChiSquareDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribExponentialDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribFDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribGammaDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribGeometricDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribHypergeometricDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribInverseGammaDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribLaPlaceDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribLogNormalDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribLogisticDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribNegativeBinomialDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribParetoDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribPoissonDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribRayleighDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribStudentTDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribWeibullDistribution)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertainty)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertStatistics)
-SBMLCONSTRUCTOR_EXCEPTION(DistribUncertStatisticSpan)
-SBMLCONSTRUCTOR_EXCEPTION(ListOfDistribInputs)
-SBMLCONSTRUCTOR_EXCEPTION(ListOfDistribExternalParameters)
-SBMLCONSTRUCTOR_EXCEPTION(ListOfDistribCategories)
+SBMLCONSTRUCTOR_EXCEPTION(UncertParameter)
+SBMLCONSTRUCTOR_EXCEPTION(Uncertainty)
+SBMLCONSTRUCTOR_EXCEPTION(UncertSpan)
+SBMLCONSTRUCTOR_EXCEPTION(DistribBase)
+SBMLCONSTRUCTOR_EXCEPTION(ListOfUncertParameters)
+SBMLCONSTRUCTOR_EXCEPTION(ListOfUncertainties)
 
 /**
- * Convert DistribContinuousUnivariateDistribution objects into the most specific object possible.
+ * Convert UncertParameter objects into the most specific object possible.
  */
-%typemap(out) DistribContinuousUnivariateDistribution*
+%typemap(out) UncertParameter*
 {
   $result = SWIG_NewPointerObj($1, GetDowncastSwigTypeForPackage($1,
     "distrib"), $owner | %newpointer_flags);
 }
 
 /**
- * Convert DistribDiscreteUnivariateDistribution objects into the most specific object possible.
+ * Convert DistribBase objects into the most specific object possible.
  */
-%typemap(out) DistribDiscreteUnivariateDistribution*
+%typemap(out) DistribBase*
 {
   $result = SWIG_NewPointerObj($1, GetDowncastSwigTypeForPackage($1,
     "distrib"), $owner | %newpointer_flags);
 }
 
-/**
- * Convert DistribCategoricalUnivariateDistribution objects into the most specific object possible.
- */
-%typemap(out) DistribCategoricalUnivariateDistribution*
-{
-  $result = SWIG_NewPointerObj($1, GetDowncastSwigTypeForPackage($1,
-    "distrib"), $owner | %newpointer_flags);
-}
 
 #endif // USE_DISTRIB
 
diff --git a/src/bindings/javascript/local-downcast-extension-arrays.cpp b/src/bindings/javascript/local-downcast-extension-arrays.cpp
index 17e53cf5..2b6ea502 100644
--- a/src/bindings/javascript/local-downcast-extension-arrays.cpp
+++ b/src/bindings/javascript/local-downcast-extension-arrays.cpp
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/javascript/local-downcast-extension-distrib.cpp b/src/bindings/javascript/local-downcast-extension-distrib.cpp
index c17cf0d5..5351605d 100644
--- a/src/bindings/javascript/local-downcast-extension-distrib.cpp
+++ b/src/bindings/javascript/local-downcast-extension-distrib.cpp
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/javascript/local-downcast-extension-l3v2extendedmath.cpp b/src/bindings/javascript/local-downcast-extension-l3v2extendedmath.cpp
index be24597c..835a76c1 100644
--- a/src/bindings/javascript/local-downcast-extension-l3v2extendedmath.cpp
+++ b/src/bindings/javascript/local-downcast-extension-l3v2extendedmath.cpp
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/javascript/local-downcast-extension-spatial.cpp b/src/bindings/javascript/local-downcast-extension-spatial.cpp
index adc76c0e..b370fa8d 100644
--- a/src/bindings/javascript/local-downcast-extension-spatial.cpp
+++ b/src/bindings/javascript/local-downcast-extension-spatial.cpp
@@ -1,7 +1,45 @@
+/**
+ * @file local-downcast-extension-spatial.cpp
+ * @brief Casting to most specific extension object for javascript
+ * @author SBMLTeam
+ *
+ * <!--------------------------------------------------------------------------
+ * This file is part of libSBML. Please visit http://sbml.org for more
+ * information about SBML, and the latest version of libSBML.
+ *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
+ * Copyright (C) 2013-2018 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
+ * 3. University of Heidelberg, Heidelberg, Germany
+ *
+ * Copyright (C) 2009-2013 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
+ *
+ * Copyright (C) 2006-2008 by the California Institute of Technology,
+ * Pasadena, CA, USA
+ *
+ * Copyright (C) 2002-2005 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. Japan Science and Technology Agency, Japan
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation. A copy of the license agreement is provided in the
+ * file named "LICENSE.txt" included with this software distribution and also
+ * available online as http://sbml.org/software/libsbml/license.html
+ * ------------------------------------------------------------------------ -->
+ */
+
+
 #ifdef USE_SPATIAL
 if (pkgName == "spatial")
 {
   return SWIGTYPE_p_SpatialExtension;
 }
-#endif // USE_SPATIAL 
+#endif // USE_SPATIAL
 
diff --git a/src/bindings/javascript/local-downcast-namespaces-arrays.cpp b/src/bindings/javascript/local-downcast-namespaces-arrays.cpp
index 4bd6f9cb..ae231185 100644
--- a/src/bindings/javascript/local-downcast-namespaces-arrays.cpp
+++ b/src/bindings/javascript/local-downcast-namespaces-arrays.cpp
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/javascript/local-downcast-namespaces-distrib.cpp b/src/bindings/javascript/local-downcast-namespaces-distrib.cpp
index 78d1885c..51b399e5 100644
--- a/src/bindings/javascript/local-downcast-namespaces-distrib.cpp
+++ b/src/bindings/javascript/local-downcast-namespaces-distrib.cpp
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/javascript/local-downcast-namespaces-l3v2extendedmath.cpp b/src/bindings/javascript/local-downcast-namespaces-l3v2extendedmath.cpp
index afa84784..11f6e139 100644
--- a/src/bindings/javascript/local-downcast-namespaces-l3v2extendedmath.cpp
+++ b/src/bindings/javascript/local-downcast-namespaces-l3v2extendedmath.cpp
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/javascript/local-downcast-namespaces-spatial.cpp b/src/bindings/javascript/local-downcast-namespaces-spatial.cpp
index dd1813b7..802d8ef3 100644
--- a/src/bindings/javascript/local-downcast-namespaces-spatial.cpp
+++ b/src/bindings/javascript/local-downcast-namespaces-spatial.cpp
@@ -1,7 +1,45 @@
+/**
+ * @file local-downcast-namespaces-spatial.cpp
+ * @brief Casting to most specific namespace object for javascript
+ * @author SBMLTeam
+ *
+ * <!--------------------------------------------------------------------------
+ * This file is part of libSBML. Please visit http://sbml.org for more
+ * information about SBML, and the latest version of libSBML.
+ *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
+ * Copyright (C) 2013-2018 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
+ * 3. University of Heidelberg, Heidelberg, Germany
+ *
+ * Copyright (C) 2009-2013 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
+ *
+ * Copyright (C) 2006-2008 by the California Institute of Technology,
+ * Pasadena, CA, USA
+ *
+ * Copyright (C) 2002-2005 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. Japan Science and Technology Agency, Japan
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation. A copy of the license agreement is provided in the
+ * file named "LICENSE.txt" included with this software distribution and also
+ * available online as http://sbml.org/software/libsbml/license.html
+ * ------------------------------------------------------------------------ -->
+ */
+
+
 #ifdef USE_SPATIAL
 if (pkgName == "spatial")
 {
   return SWIGTYPE_p_SBMLExtensionNamespacesT_SpatialExtension_t;
 }
-#endif // USE_SPATIAL 
+#endif // USE_SPATIAL
 
diff --git a/src/bindings/javascript/local-downcast-packages-arrays.cpp b/src/bindings/javascript/local-downcast-packages-arrays.cpp
index 3fbf81f0..571d529f 100644
--- a/src/bindings/javascript/local-downcast-packages-arrays.cpp
+++ b/src/bindings/javascript/local-downcast-packages-arrays.cpp
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ *     1. California Institute of Technology, Pasadena, CA, USA
+ *     2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
diff --git a/src/bindings/javascript/local-downcast-packages-distrib.cpp b/src/bindings/javascript/local-downcast-packages-distrib.cpp
index bba9f8fc..d67da220 100644
--- a/src/bindings/javascript/local-downcast-packages-distrib.cpp
+++ b/src/bindings/javascript/local-downcast-packages-distrib.cpp
@@ -7,6 +7,10 @@
  * This file is part of libSBML. Please visit http://sbml.org for more
  * information about SBML, and the latest version of libSBML.
  *
+ * Copyright (C) 2019 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. University of Heidelberg, Heidelberg, Germany
+ *
  * Copyright (C) 2013-2018 jointly by the following organizations:
  * 1. California Institute of Technology, Pasadena, CA, USA
  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
@@ -39,119 +43,28 @@ else if (pkgName == "distrib")
   {
     case SBML_LIST_OF:
       name = sb->getElementName();
-      if (name == "listOfDistribInputs")
+      if (name == "listOfUncertParameters")
       {
-        return SWIGTYPE_p_ListOfDistribInputs;
+        return SWIGTYPE_p_ListOfUncertParameters;
       }
-      else if (name == "listOfExternalParameters")
+      else if (name == "listOfUncertainties")
       {
-        return SWIGTYPE_p_ListOfDistribExternalParameters;
-      }
-      else if (name == "listOfCategories")
-      {
-        return SWIGTYPE_p_ListOfDistribCategories;
+        return SWIGTYPE_p_ListOfUncertainties;
       }
 
       return SWIGTYPE_p_ListOf;
 
-    case SBML_DISTRIB_DRAWFROMDISTRIBUTION:
-      return SWIGTYPE_p_DistribDrawFromDistribution;
-
-    case SBML_DISTRIB_DISTRIBINPUT:
-      return SWIGTYPE_p_DistribInput;
-
-    case SBML_DISTRIB_UNCERTVALUE:
-      return SWIGTYPE_p_DistribUncertValue;
-
-    case SBML_DISTRIB_UNCERTBOUND:
-      return SWIGTYPE_p_DistribUncertBound;
-
-    case SBML_DISTRIB_EXTERNALDISTRIBUTION:
-      return SWIGTYPE_p_DistribExternalDistribution;
-
-    case SBML_DISTRIB_EXTERNALPARAMETER:
-      return SWIGTYPE_p_DistribExternalParameter;
-
-    case SBML_DISTRIB_NORMALDISTRIBUTION:
-      return SWIGTYPE_p_DistribNormalDistribution;
-
-    case SBML_DISTRIB_UNIFORMDISTRIBUTION:
-      return SWIGTYPE_p_DistribUniformDistribution;
-
-    case SBML_DISTRIB_CATEGORICALDISTRIBUTION:
-      return SWIGTYPE_p_DistribCategoricalDistribution;
-
-    case SBML_DISTRIB_CATEGORY:
-      return SWIGTYPE_p_DistribCategory;
-
-    case SBML_DISTRIB_BERNOULLIDISTRIBUTION:
-      return SWIGTYPE_p_DistribBernoulliDistribution;
-
-    case SBML_DISTRIB_BETADISTRIBUTION:
-      return SWIGTYPE_p_DistribBetaDistribution;
-
-    case SBML_DISTRIB_BINOMIALDISTRIBUTION:
-      return SWIGTYPE_p_DistribBinomialDistribution;
-
-    case SBML_DISTRIB_CAUCHYDISTRIBUTION:
-      return SWIGTYPE_p_DistribCauchyDistribution;
-
-    case SBML_DISTRIB_CHISQUAREDISTRIBUTION:
-      return SWIGTYPE_p_DistribChiSquareDistribution;
-
-    case SBML_DISTRIB_EXPONENTIALDISTRIBUTION:
-      return SWIGTYPE_p_DistribExponentialDistribution;
-
-    case SBML_DISTRIB_FDISTRIBUTION:
-      return SWIGTYPE_p_DistribFDistribution;
-
-    case SBML_DISTRIB_GAMMADISTRIBUTION:
-      return SWIGTYPE_p_DistribGammaDistribution;
-
-    case SBML_DISTRIB_GEOMETRICLDISTRIBUTION:
-      return SWIGTYPE_p_DistribGeometricDistribution;
-
-    case SBML_DISTRIB_HYPERGEOMETRICDISTRIBUTION:
-      return SWIGTYPE_p_DistribHypergeometricDistribution;
-
-    case SBML_DISTRIB_INVERSEGAMMADISTRIBUTION:
-      return SWIGTYPE_p_DistribInverseGammaDistribution;
-
-    case SBML_DISTRIB_LAPLACEDISTRIBUTION:
-      return SWIGTYPE_p_DistribLaPlaceDistribution;
-
-    case SBML_DISTRIB_LOGNORMALDISTRIBUTION:
-      return SWIGTYPE_p_DistribLogNormalDistribution;
-
-    case SBML_DISTRIB_LOGISTICDISTRIBUTION:
-      return SWIGTYPE_p_DistribLogisticDistribution;
-
-    case SBML_DISTRIB_NEGATIVEBINOMIALDISTRIBUTION:
-      return SWIGTYPE_p_DistribNegativeBinomialDistribution;
-
-    case SBML_DISTRIB_PARETODISTRIBUTION:
-      return SWIGTYPE_p_DistribParetoDistribution;
-
-    case SBML_DISTRIB_POISSONDISTRIBUTION:
-      return SWIGTYPE_p_DistribPoissonDistribution;
-
-    case SBML_DISTRIB_RAYLEIGHDISTRIBUTION:
-      return SWIGTYPE_p_DistribRayleighDistribution;
-
-    case SBML_DISTRIB_STUDENTTDISTRIBUTION:
-      return SWIGTYPE_p_DistribStudentTDistribution;
-
-    case SBML_DISTRIB_WEIBULLDISTRIBUTION:
-      return SWIGTYPE_p_DistribWeibullDistribution;
+