Rewrite some of the crappiest parts of the compiler.