Fix a bunch of preprocessing bugs.  Time for bed.