ENH: push more stuff into cython