This uses C++11 smart pointers in a bunch of locations, fixes a few whitespace issues, and removes float-equality and shadowing warnings from renderer.cpp.
This patch will also work in C++11 if std::make_unique is replaced with a double-allocation or is polyfilled.