While looking for a tool to find big methods, I ended up running cppcheck on the code and found a few errors. These are fixes for some of the more obvious errors.