Migration of more code to C++

Fixed a compile error with redifintion of operator new
Moving everything into namespace cge