lexicographically order reduce* methods in CodeGen class

Along with some tiny stylistic changes.