Update profiler to new namespace and class approach

Compiling, not tested