Rename namespace to ns for C++ compatibility