Correct preprocess function names.

Also, a bit of cleanup.