Math cleaning
Description
Cleaning of the math routine and removing some unused routines.
Some tolerances are also adjusted for been consistent all across the code (in the calculation of spherical harmonics).
Fortran 2008 provides an hypot routine, so we don't need to define it.