More improvements to cython codegen