Revert to Cython implementation