clean-up cython code