Reorganize compiler for more flexibility.