refactored more cython types