Migrating from C style to C++ style of coding in nest plugin