Fix compiling as C++...
Mostly finished converting things from post-increment to pre-increment.