More improvements to compiler