Work on stability.
Drop some inlining.
Fix deallocation of CurvMap.