C++ified some stuff.