Progress on compiler, adding optimizations