diff --git a/.gitignore b/.gitignore
index 782109a95487b17a69ae03bd443feb7fb77c8ecd..54860fd46bbc539835707714f36b093062d4c999 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,10 +9,10 @@
 .libs
 **/.deps
 **/.dirstamp
-libsharp-uninstalled.pc
-libsharp-uninstalled.sh
-libsharp.pc
-libsharp.pc.in
+libsharp2-uninstalled.pc
+libsharp2-uninstalled.sh
+libsharp2.pc
+libsharp2.pc.in
 perf.data*
 /auto
 /autom4te.cache
diff --git a/COMPILE b/COMPILE
index a89866223aa034d304808addbd7dd5baf9ee85b5..e3a87b7bc3cd33407c1f7abf86c9a3414eeb348f 100644
--- a/COMPILE
+++ b/COMPILE
@@ -1,6 +1,6 @@
-Libsharp is configured, compiled and installed using GNU autotools.
+Libsharp2 is configured, compiled and installed using GNU autotools.
 
-If you have cloned the libsharp repository, you have to run
+If you have cloned the libsharp2 repository, you have to run
 "autoreconf -i" before starting the configuration, which requires several
 GNU developer tools to be available on your system.
 
@@ -20,8 +20,8 @@ since it allows the compiler to fuse multiplications and additions into FMA
 instructions, which is forbidden by the C99 standard. Since FMAs are a central
 aspect of the algorithm, they are needed for optimum performance.
 
-If you are calling libsharp from other code which requires strict adherence
-to the C99 standard, you should still be able to compile libsharp with
+If you are calling libsharp2 from other code which requires strict adherence
+to the C99 standard, you should still be able to compile libsharp2 with
 "-ffast-math" without any problems.
 
 
@@ -36,7 +36,7 @@ at runtime.
 This is enabled by passing "-DMULTIARCH" as part of the CFLAGS.
 If this is enabled, please do _not_ specify "-march=native" or
 "-mtarget=avx" or similar!
-If you are compiling libsharp for a particular target CPU only, or if you are
+If you are compiling libsharp2 for a particular target CPU only, or if you are
 using a different compiler, however, "-march-native" should be used. The
 resulting binary will most likely not run on other computers, though.
 
diff --git a/Makefile.am b/Makefile.am
index 8b7d2430fdb8bb6b23c070bcc30aea4ca901cc38..e105ca0fe15edb5fccd1207ed817ed284657c8c8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,22 +1,22 @@
 ACLOCAL_AMFLAGS = -I m4
 
-lib_LTLIBRARIES = libsharp.la
-
-libsharp_la_SOURCES = \
-  pocketfft/pocketfft.c \
-  pocketfft/pocketfft.h \
-  libsharp/sharp_utils.c \
-  libsharp/sharp_utils.h \
-  libsharp/sharp.c \
-  libsharp/sharp_almhelpers.c \
-  libsharp/sharp_core.c \
-  libsharp/sharp_geomhelpers.c \
-  libsharp/sharp_legendre_roots.c \
-  libsharp/sharp_ylmgen_c.c \
-  libsharp/sharp_internal.h \
-  libsharp/sharp_legendre_roots.h \
-  libsharp/sharp_vecsupport.h \
-  libsharp/sharp_ylmgen_c.h
+lib_LTLIBRARIES = libsharp2.la
+
+libsharp2_la_SOURCES = \
+  libsharp2/pocketfft.c \
+  libsharp2/pocketfft.h \
+  libsharp2/sharp_utils.c \
+  libsharp2/sharp_utils.h \
+  libsharp2/sharp.c \
+  libsharp2/sharp_almhelpers.c \
+  libsharp2/sharp_core.c \
+  libsharp2/sharp_geomhelpers.c \
+  libsharp2/sharp_legendre_roots.c \
+  libsharp2/sharp_ylmgen_c.c \
+  libsharp2/sharp_internal.h \
+  libsharp2/sharp_legendre_roots.h \
+  libsharp2/sharp_vecsupport.h \
+  libsharp2/sharp_ylmgen_c.h
 
 # format is "current:revision:age"
 # any change: increase revision
@@ -24,17 +24,17 @@ libsharp_la_SOURCES = \
 # any backward-compatible change: increase age
 # any backward-incompatible change: age=0
 # ==> age <= current
-libsharp_la_LDFLAGS = -version-info 0:0:0
+libsharp2_la_LDFLAGS = -version-info 0:0:0
 
 AM_CFLAGS = @AM_CFLAGS@
 
 if HAVE_MULTIARCH
 
-libavx_la_SOURCES = libsharp/sharp_core_inc.c
-libavx2_la_SOURCES = libsharp/sharp_core_inc.c
-libfma_la_SOURCES = libsharp/sharp_core_inc.c
-libfma4_la_SOURCES = libsharp/sharp_core_inc.c
-libavx512f_la_SOURCES = libsharp/sharp_core_inc.c
+libavx_la_SOURCES = libsharp2/sharp_core_inc.c
+libavx2_la_SOURCES = libsharp2/sharp_core_inc.c
+libfma_la_SOURCES = libsharp2/sharp_core_inc.c
+libfma4_la_SOURCES = libsharp2/sharp_core_inc.c
+libavx512f_la_SOURCES = libsharp2/sharp_core_inc.c
 
 noinst_LTLIBRARIES = libavx.la libavx2.la libfma.la libfma4.la libavx512f.la
 
@@ -44,23 +44,23 @@ libfma_la_CFLAGS = ${AM_CFLAGS} -mfma -DARCH=fma
 libfma4_la_CFLAGS = ${AM_CFLAGS} -mfma4 -DARCH=fma4
 libavx512f_la_CFLAGS = ${AM_CFLAGS} -mavx512f -DARCH=avx512f
 
-libsharp_la_LIBADD = libavx.la libavx2.la libfma.la libfma4.la libavx512f.la
+libsharp2_la_LIBADD = libavx.la libavx2.la libfma.la libfma4.la libavx512f.la
 
 endif
 
 nobase_include_HEADERS = \
-  libsharp/sharp.h \
-  libsharp/sharp_mpi.h \
-  libsharp/sharp_geomhelpers.h \
-  libsharp/sharp_almhelpers.h \
-  libsharp/sharp_cxx.h
+  libsharp2/sharp.h \
+  libsharp2/sharp_mpi.h \
+  libsharp2/sharp_geomhelpers.h \
+  libsharp2/sharp_almhelpers.h \
+  libsharp2/sharp_cxx.h
 
 EXTRA_DIST = \
-  runtest.sh fortran/sharp.f90 fortran/test_sharp.f90 libsharp/sharp_mpi.c
+  runtest.sh fortran/sharp.f90 fortran/test_sharp.f90 libsharp2/sharp_mpi.c
 
-check_PROGRAMS = sharp_testsuite
-sharp_testsuite_SOURCES = test/sharp_testsuite.c test/memusage.c test/memusage.h
-sharp_testsuite_LDADD = libsharp.la -lm
+check_PROGRAMS = sharp2_testsuite
+sharp2_testsuite_SOURCES = test/sharp2_testsuite.c test/memusage.c test/memusage.h
+sharp2_testsuite_LDADD = libsharp2.la
 
 TESTS = runtest.sh
 
diff --git a/README.md b/README.md
index e135b44e05c9fe71096ed834daab7daf59a39fb9..c5262248fbc55d9135c32706c884a18ca00c7682 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Libsharp
+# Libsharp2
 
 Library for efficient spherical harmonic transforms at arbitrary spins,
 supporting CPU vectorization, OpenMP and MPI.
@@ -20,10 +20,10 @@ These improvements reduce the fraction of CPU time spent on evaluating the
 recurrences for Y_lm coefficients, which means that computing multiple
 simultaneous SHTs no longer has a big performance advantage compared to SHTs
 done one after the other.
-As a consequence, libsharp support for simultaneous SHTs was dropped, making
+As a consequence, libsharp's support for simultaneous SHTs was dropped, making
 its interface much simpler.
 
-With the proper compilers and flags (see the file COMPILE for details) libsharp
+With the proper compilers and flags (see the file COMPILE for details) libsharp2
 is now built with support for SSE2, AVX, AVX2, FMA3, FMA4 and AVX512f and the
 appropriate implementation is selected dynamically at runtime. This should
 provide a very significant performance boost for everyone using pre-compiled
diff --git a/configure.ac b/configure.ac
index b020181ed3eb757f5137637dc5f2ed1ca93c0fda..3b40dc2aae416f919353267c00335ab5275730c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([libsharp], [1.0.0])
+AC_INIT([libsharp2], [1.0.0])
 AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror])
 AM_MAINTAINER_MODE([enable])
 
@@ -22,6 +22,10 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 AC_PROG_CC_C99
 AC_OPENMP
+
+# add math library
+LIBS="-lm"
+
 AC_PROG_LIBTOOL
 
 tmpval=`echo $CFLAGS | grep -c '\-DMULTIARCH'`
@@ -29,7 +33,7 @@ AM_CONDITIONAL([HAVE_MULTIARCH], [test $tmpval -gt 0])
 
 AM_CFLAGS="$AM_CFLAGS $OPENMP_CFLAGS"
 
-PACKAGE_LIBS="-lsharp"
+PACKAGE_LIBS="-lsharp2"
 PACKAGE_CFLAGS="$PACKAGE_CFLAGS $OPENMP_CFLAGS"
 PACKAGE_LDFLAGS="$PACKAGE_LDFLAGS $OPENMP_CFLAGS"
 
diff --git a/libsharp/libsharp.dox b/libsharp2/libsharp2.dox
similarity index 89%
rename from libsharp/libsharp.dox
rename to libsharp2/libsharp2.dox
index 06361ee219d06e573fbd99a68150235f9882f307..b180091f56331baded6ae32c4807923c5926406d 100644
--- a/libsharp/libsharp.dox
+++ b/libsharp2/libsharp2.dox
@@ -1,17 +1,17 @@
-/*! \mainpage libsharp documentation
+/*! \mainpage libsharp2 documentation
   <ul>
   <li>\ref introduction "Introduction"
   <li><a href="modules.html">Programming interface</a>
   </ul>
  */
 
-/*! \page introduction Introduction to libsharp
+/*! \page introduction Introduction to libsharp2
 
   "SHARP" is an acronym for <i>Spherical HARmonic Package</i>.
   All user-visible data types and functions in this library start with
   the prefix "sharp_" to avoid pollution of the global C namespace.
 
-  <i>libsharp</i>'s main functionality is the conversion between <i>maps</i>
+  <i>libsharp2</i>'s main functionality is the conversion between <i>maps</i>
   on the sphere and <i>spherical harmonic coefficients</i> (or <i>a_lm</i>).
   A map is defined as a set of <i>rings</i>, which in turn consist of
   individual pixels that
@@ -56,7 +56,7 @@
   for generating often-used pixelisations like ECP grids, Gaussian grids,
   and Healpix grids.
 
-  Currently, libsharp supports the following kinds of transforms:
+  Currently, libsharp2 supports the following kinds of transforms:
   <ul>
   <li>scalar a_lm to map</li>
   <li>scalar map to a_lm</li>
@@ -67,10 +67,10 @@
   <li>scalar a_lm to maps of first derivatives</li>
   </ul>
 
-  libsharp supports shared-memory parallelisation via OpenMP; this feature will
+  libsharp2 supports shared-memory parallelisation via OpenMP; this feature will
   be automatically enabled if the compiler supports it.
 
-  Libsharp will also make use of SSE2/AVX/AVX512 instructions when compiled
+  Libsharp2 will also make use of SSE2/AVX/AVX512 instructions when compiled
   for a platform known to support them.
 
   Support for MPI-parallel transforms is also available; in this mode,
diff --git a/pocketfft/pocketfft.c b/libsharp2/pocketfft.c
similarity index 99%
rename from pocketfft/pocketfft.c
rename to libsharp2/pocketfft.c
index 56c9dc5dc14c6282fa09d2162be10c8a7ba9854b..50ee2e8c7d5af8b4edae4f2386b79e1ed55d44a3 100644
--- a/pocketfft/pocketfft.c
+++ b/libsharp2/pocketfft.c
@@ -13,7 +13,7 @@
 #include <math.h>
 #include <string.h>
 
-#include "pocketfft/pocketfft.h"
+#include "libsharp2/pocketfft.h"
 
 #define RALLOC(type,num) \
   ((type *)malloc((num)*sizeof(type)))
@@ -31,6 +31,8 @@
 #define WARN_UNUSED_RESULT
 #endif
 
+#pragma GCC visibility push(hidden)
+
 // adapted from https://stackoverflow.com/questions/42792939/
 // CAUTION: this function only works for arguments in the range [-0.25; 0.25]!
 static void my_sincosm1pi (double a, double *restrict res)
@@ -2192,3 +2194,5 @@ int pocketfft_forward_r(pocketfft_plan_r plan, double c[], double fct)
   else // if (plan->blueplan)
     return rfftblue_forward(plan->blueplan,c,fct);
   }
+
+#pragma GCC visibility pop
diff --git a/pocketfft/pocketfft.h b/libsharp2/pocketfft.h
similarity index 100%
rename from pocketfft/pocketfft.h
rename to libsharp2/pocketfft.h
diff --git a/libsharp/sharp.c b/libsharp2/sharp.c
similarity index 98%
rename from libsharp/sharp.c
rename to libsharp2/sharp.c
index a4345f2df3d8f479ce9db69b75eb3f7dca675fe2..1e5ac037b28f299024993f8270d8aeba3814e3b9 100644
--- a/libsharp/sharp.c
+++ b/libsharp2/sharp.c
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp.c
  *  Spherical transform library
@@ -27,12 +27,12 @@
 
 #include <math.h>
 #include <string.h>
-#include "pocketfft/pocketfft.h"
-#include "libsharp/sharp_ylmgen_c.h"
-#include "libsharp/sharp_internal.h"
-#include "libsharp/sharp_utils.h"
-#include "libsharp/sharp_almhelpers.h"
-#include "libsharp/sharp_geomhelpers.h"
+#include "libsharp2/pocketfft.h"
+#include "libsharp2/sharp_ylmgen_c.h"
+#include "libsharp2/sharp_internal.h"
+#include "libsharp2/sharp_utils.h"
+#include "libsharp2/sharp_almhelpers.h"
+#include "libsharp2/sharp_geomhelpers.h"
 
 typedef complex double dcmplx;
 typedef complex float  fcmplx;
diff --git a/libsharp/sharp.h b/libsharp2/sharp.h
similarity index 95%
rename from libsharp/sharp.h
rename to libsharp2/sharp.h
index 1fe1566132a768f339e5c76f2707d8fdbadb074a..a279235c00260eb6bcaf23112cd92ed8205396ec 100644
--- a/libsharp/sharp.h
+++ b/libsharp2/sharp.h
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp.h
  *  Portable interface for the spherical transform library.
@@ -169,7 +169,7 @@ void sharp_destroy_geom_info (sharp_geom_info *info);
 
 /*! \} */
 
-/*! \defgroup lowlevelgroup Low-level libsharp SHT interface */
+/*! \defgroup lowlevelgroup Low-level libsharp2 SHT interface */
 /*! \{ */
 
 /*! Enumeration of SHARP job types. */
@@ -197,7 +197,7 @@ typedef enum { SHARP_DP              = 1<<4,
                SHARP_USE_WEIGHTS     = 1<<20,    /* internal use only */
              } sharp_jobflags;
 
-/*! Performs a libsharp SHT job. The interface deliberately does not use
+/*! Performs a libsharp2 SHT job. The interface deliberately does not use
   the C99 "complex" data type, in order to be callable from C89 and C++.
   \param type the type of SHT
   \param spin the spin of the quantities to be transformed
@@ -231,10 +231,10 @@ void sharp_set_nchunks_max(int new_nchunks_max);
 
 
 typedef enum { SHARP_ERROR_NO_MPI = 1,
-               /*!< libsharp not compiled with MPI support */
+               /*!< libsharp2 not compiled with MPI support */
               } sharp_errors;
 
-/*! Works like sharp_execute_mpi, but is always present whether or not libsharp
+/*! Works like sharp_execute_mpi, but is always present whether or not libsharp2
     is compiled with USE_MPI. This is primarily useful for wrapper code etc.
 
     Note that \a pcomm has the type MPI_Comm*, except we declare void* to avoid
diff --git a/libsharp/sharp_almhelpers.c b/libsharp2/sharp_almhelpers.c
similarity index 85%
rename from libsharp/sharp_almhelpers.c
rename to libsharp2/sharp_almhelpers.c
index 59b564c32af61865878ec0e09b6168cf2c1a486c..3df322df6081eb257bc4aff784db02dc38030cbe 100644
--- a/libsharp/sharp_almhelpers.c
+++ b/libsharp2/sharp_almhelpers.c
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_almhelpers.c
  *  Spherical transform library
@@ -25,8 +25,8 @@
  *  \author Martin Reinecke
  */
 
-#include "libsharp/sharp_almhelpers.h"
-#include "libsharp/sharp_utils.h"
+#include "libsharp2/sharp_almhelpers.h"
+#include "libsharp2/sharp_utils.h"
 
 void sharp_make_triangular_alm_info (int lmax, int mmax, int stride,
   sharp_alm_info **alm_info)
diff --git a/libsharp/sharp_almhelpers.h b/libsharp2/sharp_almhelpers.h
similarity index 80%
rename from libsharp/sharp_almhelpers.h
rename to libsharp2/sharp_almhelpers.h
index 3dc85f5176f516096f6e383be6ed138b40b0c0b4..91d098be9610496dee19d01b9e53a34c9bb75d07 100644
--- a/libsharp/sharp_almhelpers.h
+++ b/libsharp2/sharp_almhelpers.h
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_almhelpers.h
  *  SHARP helper function for the creation of a_lm data structures
@@ -25,10 +25,10 @@
  *  \author Martin Reinecke
  */
 
-#ifndef SHARP_ALMHELPERS_H
-#define SHARP_ALMHELPERS_H
+#ifndef SHARP2_ALMHELPERS_H
+#define SHARP2_ALMHELPERS_H
 
-#include "libsharp/sharp.h"
+#include "libsharp2/sharp.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/libsharp/sharp_core.c b/libsharp2/sharp_core.c
similarity index 90%
rename from libsharp/sharp_core.c
rename to libsharp2/sharp_core.c
index 1dec17a505e9c233d508370cf3459616e192074c..6f41ad28fff49577beb46a39ccb7242d057b8d4b 100644
--- a/libsharp/sharp_core.c
+++ b/libsharp2/sharp_core.c
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_core.c
  *  Spherical transform library
@@ -27,7 +27,7 @@
 
 #define ARCH default
 #define GENERIC_ARCH
-#include "libsharp/sharp_core_inc.c"
+#include "libsharp2/sharp_core_inc.c"
 #undef GENERIC_ARCH
 #undef ARCH
 
diff --git a/libsharp/sharp_core_inc.c b/libsharp2/sharp_core_inc.c
similarity index 98%
rename from libsharp/sharp_core_inc.c
rename to libsharp2/sharp_core_inc.c
index 612a778804ed9bce76399179a06f59c15372b2cb..eaf34f0dc1af025ebd76061c3826eca50ac10d82 100644
--- a/libsharp/sharp_core_inc.c
+++ b/libsharp2/sharp_core_inc.c
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_core_inc.c
  *  Computational core
@@ -37,10 +37,10 @@
 #include <complex.h>
 #include <math.h>
 #include <string.h>
-#include "libsharp/sharp_vecsupport.h"
-#include "libsharp/sharp.h"
-#include "libsharp/sharp_internal.h"
-#include "libsharp/sharp_utils.h"
+#include "libsharp2/sharp_vecsupport.h"
+#include "libsharp2/sharp.h"
+#include "libsharp2/sharp_internal.h"
+#include "libsharp2/sharp_utils.h"
 
 #pragma GCC visibility push(hidden)
 
diff --git a/libsharp/sharp_cxx.h b/libsharp2/sharp_cxx.h
similarity index 94%
rename from libsharp/sharp_cxx.h
rename to libsharp2/sharp_cxx.h
index 60995ed23b10414732d3253092459a9d6303c934..191fea1afe6f2b8905f881b74c4dd8b63addcdb0 100644
--- a/libsharp/sharp_cxx.h
+++ b/libsharp2/sharp_cxx.h
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_cxx.h
  *  Spherical transform library
@@ -25,13 +25,13 @@
  *  \author Martin Reinecke
  */
 
-#ifndef SHARP_CXX_H
-#define SHARP_CXX_H
+#ifndef SHARP2_CXX_H
+#define SHARP2_CXX_H
 
 #include <complex>
-#include "libsharp/sharp.h"
-#include "libsharp/sharp_geomhelpers.h"
-#include "libsharp/sharp_almhelpers.h"
+#include "libsharp2/sharp.h"
+#include "libsharp2/sharp_geomhelpers.h"
+#include "libsharp2/sharp_almhelpers.h"
 
 class sharp_base
   {
diff --git a/libsharp/sharp_geomhelpers.c b/libsharp2/sharp_geomhelpers.c
similarity index 95%
rename from libsharp/sharp_geomhelpers.c
rename to libsharp2/sharp_geomhelpers.c
index cd7c6fa51624b95c46579d17f8b9f39c8fc130da..db459bcfdceee7d691bd5b5f3f7aa184c395b2a6 100644
--- a/libsharp/sharp_geomhelpers.c
+++ b/libsharp2/sharp_geomhelpers.c
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_geomhelpers.c
  *  Spherical transform library
@@ -26,10 +26,10 @@
  */
 
 #include <math.h>
-#include "libsharp/sharp_geomhelpers.h"
-#include "libsharp/sharp_legendre_roots.h"
-#include "libsharp/sharp_utils.h"
-#include "pocketfft/pocketfft.h"
+#include "libsharp2/sharp_geomhelpers.h"
+#include "libsharp2/sharp_legendre_roots.h"
+#include "libsharp2/sharp_utils.h"
+#include "libsharp2/pocketfft.h"
 
 void sharp_make_subset_healpix_geom_info (int nside, int stride, int nrings,
   const int *rings, const double *weight, sharp_geom_info **geom_info)
diff --git a/libsharp/sharp_geomhelpers.h b/libsharp2/sharp_geomhelpers.h
similarity index 94%
rename from libsharp/sharp_geomhelpers.h
rename to libsharp2/sharp_geomhelpers.h
index d0a4f33ff483451db742c2379d345ff2a1543f4e..dcd12e823adfac52bdc91898f366b0d0c9f35f6c 100644
--- a/libsharp/sharp_geomhelpers.h
+++ b/libsharp2/sharp_geomhelpers.h
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_geomhelpers.h
  *  SHARP helper function for the creation of grid geometries
@@ -25,10 +25,10 @@
  *  \author Martin Reinecke
  */
 
-#ifndef SHARP_GEOMHELPERS_H
-#define SHARP_GEOMHELPERS_H
+#ifndef SHARP2_GEOMHELPERS_H
+#define SHARP2_GEOMHELPERS_H
 
-#include "libsharp/sharp.h"
+#include "libsharp2/sharp.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/libsharp/sharp_internal.h b/libsharp2/sharp_internal.h
similarity index 76%
rename from libsharp/sharp_internal.h
rename to libsharp2/sharp_internal.h
index 89c4429089d7c37e02387f99e79dd2b63f9cc3c3..09e45e8c77e1edd6cc7ee087cac1bed7b4a554f0 100644
--- a/libsharp/sharp_internal.h
+++ b/libsharp2/sharp_internal.h
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_internal.h
  *  Internally used functionality for the spherical transform library.
@@ -25,16 +25,16 @@
  *  \author Martin Reinecke \author Dag Sverre Seljebotn
  */
 
-#ifndef SHARP_INTERNAL_H
-#define SHARP_INTERNAL_H
+#ifndef SHARP2_INTERNAL_H
+#define SHARP2_INTERNAL_H
 
 #ifdef __cplusplus
 #error This header file cannot be included from C++, only from C
 #endif
 
 #include <complex.h>
-#include "libsharp/sharp.h"
-#include "libsharp/sharp_ylmgen_c.h"
+#include "libsharp2/sharp.h"
+#include "libsharp2/sharp_ylmgen_c.h"
 
 typedef struct
   {
diff --git a/libsharp/sharp_legendre_roots.c b/libsharp2/sharp_legendre_roots.c
similarity index 95%
rename from libsharp/sharp_legendre_roots.c
rename to libsharp2/sharp_legendre_roots.c
index 648cfca234d1b5c12cde90758f2b9a4b8aeae140..5a0376b09d66b549e9498ebbbcb3c176fb2639b9 100644
--- a/libsharp/sharp_legendre_roots.c
+++ b/libsharp2/sharp_legendre_roots.c
@@ -7,8 +7,8 @@
     - tweaked Newton iteration to obtain higher accuracy */
 
 #include <math.h>
-#include "libsharp/sharp_legendre_roots.h"
-#include "libsharp/sharp_utils.h"
+#include "libsharp2/sharp_legendre_roots.h"
+#include "libsharp2/sharp_utils.h"
 
 static inline double one_minus_x2 (double x)
   { return (fabs(x)>0.1) ? (1.+x)*(1.-x) : 1.-x*x; }
diff --git a/libsharp/sharp_legendre_roots.h b/libsharp2/sharp_legendre_roots.h
similarity index 73%
rename from libsharp/sharp_legendre_roots.h
rename to libsharp2/sharp_legendre_roots.h
index 4220fceb12b259a68cc27b0de04119b87a265ed4..518058b4cf2245e73063cf1c2b30369eef9da682 100644
--- a/libsharp/sharp_legendre_roots.h
+++ b/libsharp2/sharp_legendre_roots.h
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_legendre_roots.h
  *
@@ -24,8 +24,8 @@
  *  \author Martin Reinecke
  */
 
-#ifndef SHARP_LEGENDRE_ROOTS_H
-#define SHARP_LEGENDRE_ROOTS_H
+#ifndef SHARP2_LEGENDRE_ROOTS_H
+#define SHARP2_LEGENDRE_ROOTS_H
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/libsharp/sharp_mpi.c b/libsharp2/sharp_mpi.c
similarity index 96%
rename from libsharp/sharp_mpi.c
rename to libsharp2/sharp_mpi.c
index 2be016abb781b2a89ab433a32efab28cf0964e00..3b7ca7f50037a9b7f2a9626835c08745be07d14b 100644
--- a/libsharp/sharp_mpi.c
+++ b/libsharp2/sharp_mpi.c
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_mpi.c
  *  Functionality only needed for MPI-parallel transforms
@@ -27,7 +27,7 @@
 
 #ifdef USE_MPI
 
-#include "libsharp/sharp_mpi.h"
+#include "libsharp2/sharp_mpi.h"
 
 typedef struct
   {
diff --git a/libsharp/sharp_mpi.h b/libsharp2/sharp_mpi.h
similarity index 87%
rename from libsharp/sharp_mpi.h
rename to libsharp2/sharp_mpi.h
index 01950321d2e8f6f709b395b7b90d0cb7d524f349..56c758740f9c2f317703e757761cbcab652f8f6e 100644
--- a/libsharp/sharp_mpi.h
+++ b/libsharp2/sharp_mpi.h
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_mpi.h
  *  Interface for the spherical transform library with MPI support.
@@ -29,13 +29,13 @@
 #define SHARP_MPI_H
 
 #include <mpi.h>
-#include "libsharp/sharp.h"
+#include "libsharp2/sharp.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-/*! Performs an MPI parallel libsharp SHT job. The interface deliberately does
+/*! Performs an MPI parallel libsharp2 SHT job. The interface deliberately does
   not use the C99 "complex" data type, in order to be callable from C89 and C++.
   \param comm the MPI communicator to be used for this SHT
   \param type the type of SHT
diff --git a/libsharp/sharp_utils.c b/libsharp2/sharp_utils.c
similarity index 81%
rename from libsharp/sharp_utils.c
rename to libsharp2/sharp_utils.c
index c73edf88dd3f1c3a0ab2d57c882ef61e9a6d98d7..f1acd9f161cc52f2c3e6758ce39c09e74c72d390 100644
--- a/libsharp/sharp_utils.c
+++ b/libsharp2/sharp_utils.c
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*
  *  Convenience functions
@@ -26,8 +26,9 @@
  */
 
 #include <stdio.h>
-#include "libsharp/sharp_utils.h"
+#include "libsharp2/sharp_utils.h"
 
+#pragma GCC visibility push(hidden)
 void sharp_fail_ (const char *file, int line, const char *func, const char *msg)
   {
   fprintf(stderr,"%s, %i (%s):\n%s\n",file,line,func,msg);
@@ -46,9 +47,11 @@ static size_t manipsize(size_t sz)
   if (((sz+overhead)%critical_stride)>(2*cacheline)) return sz;
   return sz+2*cacheline;
   }
+#pragma GCC visibility pop
 
 #ifdef __SSE__
 #include <xmmintrin.h>
+#pragma GCC visibility push(hidden)
 void *sharp_malloc_ (size_t sz)
   {
   void *res;
@@ -59,7 +62,9 @@ void *sharp_malloc_ (size_t sz)
   }
 void sharp_free_ (void *ptr)
   { if ((ptr)!=NULL) _mm_free(ptr); }
+#pragma GCC visibility pop
 #else
+#pragma GCC visibility push(hidden)
 void *sharp_malloc_ (size_t sz)
   {
   void *res;
@@ -70,6 +75,7 @@ void *sharp_malloc_ (size_t sz)
   }
 void sharp_free_ (void *ptr)
   { if ((ptr)!=NULL) free(ptr); }
+#pragma GCC visibility pop
 #endif
 
 #if defined (_OPENMP)
@@ -83,6 +89,7 @@ void sharp_free_ (void *ptr)
 #include <stdlib.h>
 #endif
 
+#pragma GCC visibility push(hidden)
 double sharp_wallTime(void)
   {
 #if defined (_OPENMP)
@@ -106,3 +113,4 @@ double sharp_wallTime(void)
   return t.tv_sec + 1e-6*t.tv_usec;
 #endif
   }
+#pragma GCC visibility pop
diff --git a/libsharp/sharp_utils.h b/libsharp2/sharp_utils.h
similarity index 100%
rename from libsharp/sharp_utils.h
rename to libsharp2/sharp_utils.h
diff --git a/libsharp/sharp_vecsupport.h b/libsharp2/sharp_vecsupport.h
similarity index 94%
rename from libsharp/sharp_vecsupport.h
rename to libsharp2/sharp_vecsupport.h
index 7894ef63429f02326e53b49162f1571ae5151d76..ca9bee73a8a8b4fb82e3d22ff80054bf70e1bc43 100644
--- a/libsharp/sharp_vecsupport.h
+++ b/libsharp2/sharp_vecsupport.h
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*  \file sharp_vecsupport.h
  *  Convenience functions for vector arithmetics
@@ -25,8 +25,8 @@
  *  Author: Martin Reinecke
  */
 
-#ifndef SHARP_VECSUPPORT_H
-#define SHARP_VECSUPPORT_H
+#ifndef SHARP2_VECSUPPORT_H
+#define SHARP2_VECSUPPORT_H
 
 #include <math.h>
 
diff --git a/libsharp/sharp_ylmgen_c.c b/libsharp2/sharp_ylmgen_c.c
similarity index 95%
rename from libsharp/sharp_ylmgen_c.c
rename to libsharp2/sharp_ylmgen_c.c
index 791908ce49ba143a4ab542517d4c590ee440ebeb..9e01902c9de2132242694b8f30b4088480919b4f 100644
--- a/libsharp/sharp_ylmgen_c.c
+++ b/libsharp2/sharp_ylmgen_c.c
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*
  *  Helper code for efficient calculation of Y_lm(theta,phi=0)
@@ -27,8 +27,8 @@
 
 #include <math.h>
 #include <stdlib.h>
-#include "libsharp/sharp_ylmgen_c.h"
-#include "libsharp/sharp_utils.h"
+#include "libsharp2/sharp_ylmgen_c.h"
+#include "libsharp2/sharp_utils.h"
 
 #pragma GCC visibility push(hidden)
 
diff --git a/libsharp/sharp_ylmgen_c.h b/libsharp2/sharp_ylmgen_c.h
similarity index 87%
rename from libsharp/sharp_ylmgen_c.h
rename to libsharp2/sharp_ylmgen_c.h
index 1fa1cfa730762f3e9e860f3fb6ce29314f7beae8..a14e7b54c537ac8246c6747b5652c989c82e4267 100644
--- a/libsharp/sharp_ylmgen_c.h
+++ b/libsharp2/sharp_ylmgen_c.h
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*! \file sharp_ylmgen_c.h
  *  Code for efficient calculation of Y_lm(phi=0,theta)
@@ -25,8 +25,8 @@
  *  \author Martin Reinecke
  */
 
-#ifndef SHARP_YLMGEN_C_H
-#define SHARP_YLMGEN_C_H
+#ifndef SHARP2_YLMGEN_C_H
+#define SHARP2_YLMGEN_C_H
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/python/pysharp.cc b/python/pysharp.cc
index 1b1d28e64389909c48bad025d8036dc971da6020..ebf9ba5ddae21cc3ba98dbb3b43b7c1c987bd5d5 100644
--- a/python/pysharp.cc
+++ b/python/pysharp.cc
@@ -1,25 +1,25 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
  *  For more information about HEALPix, see http://healpix.sourceforge.net
  */
 
 /*
- *  libsharp is being developed at the Max-Planck-Institut fuer Astrophysik
+ *  libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik
  */
 
 /*
@@ -34,8 +34,8 @@
 #include <complex>
 #include <string>
 
-#include "libsharp/sharp_cxx.h"
-#include "libsharp/sharp_legendre_roots.h"
+#include "libsharp2/sharp_cxx.h"
+#include "libsharp2/sharp_legendre_roots.h"
 
 using namespace std;
 
@@ -169,7 +169,7 @@ a_d_c GL_thetas(int64_t nlat)
 
 
 const char *pysharp_DS = R"""(
-Python interface for libsharp
+Python interface for libsharp2
 
 All angles are interpreted as radians.
 The theta coordinate is measured as co-latitude, ranging from 0 (North Pole)
diff --git a/python/setup.py b/python/setup.py
index 153af067ee3ccb09900ad18c6143290a53d1b29b..f70ef07e5bf9b8cedde979f93c47bedc3f88f87b 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -59,7 +59,7 @@ def get_extension_modules():
 
 setup(name='pysharp',
       version='0.0.1',
-      description='Python bindings for libsharp',
+      description='Python bindings for libsharp2',
       include_package_data=True,
       author='Martin Reinecke',
       author_email='martin@mpa-garching.mpg.de',
diff --git a/runtest.sh b/runtest.sh
index be291ec0751713ea527f83dc8da2e005dd8cbf2a..1a0dde11da3d85ad65048c9ce7c2f6fa63d06e2c 100755
--- a/runtest.sh
+++ b/runtest.sh
@@ -1,4 +1,4 @@
 #!/bin/sh
 
-./sharp_testsuite acctest
+./sharp2_testsuite acctest
 
diff --git a/test/sharp_testsuite.c b/test/sharp2_testsuite.c
similarity index 97%
rename from test/sharp_testsuite.c
rename to test/sharp2_testsuite.c
index c9986be3de981a8933d73dba62afb2fafafd577e..80949fb7f2dfb5ed573e0dc4cd1ea6e798f6cc31 100644
--- a/test/sharp_testsuite.c
+++ b/test/sharp2_testsuite.c
@@ -1,22 +1,22 @@
 /*
- *  This file is part of libsharp.
+ *  This file is part of libsharp2.
  *
- *  libsharp is free software; you can redistribute it and/or modify
+ *  libsharp2 is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  libsharp is distributed in the hope that it will be useful,
+ *  libsharp2 is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with libsharp; if not, write to the Free Software
+ *  along with libsharp2; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
+/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
 
 /*  \file sharp_testsuite.c
  *
@@ -29,15 +29,16 @@
 #include <complex.h>
 #ifdef USE_MPI
 #include "mpi.h"
-#include "libsharp/sharp_mpi.h"
+#include "libsharp2/sharp_mpi.h"
 #endif
 #ifdef _OPENMP
 #include <omp.h>
 #endif
-#include "libsharp/sharp.h"
-#include "libsharp/sharp_geomhelpers.h"
-#include "libsharp/sharp_almhelpers.h"
-#include "libsharp/sharp_utils.h"
+#include "libsharp2/sharp.h"
+#include "libsharp2/sharp_geomhelpers.h"
+#include "libsharp2/sharp_almhelpers.h"
+#include "libsharp2/sharp_utils.h"
+#include "libsharp2/sharp_utils.c"
 #include "test/memusage.h"
 
 static void OpenMP_status(void)