Fix up some small typos and avoid c++11's string::back()/pop_back() calls for now.