Optimizations for compiling