Made some C++ best practices related changes