Cythonize some functions.