Changed everything to cython