Changed DBL_MIN/MAX to safer C++ alternative, exposed basic methods of NS (though it's not working yet)