A lot of cython fluff. Next up is making a faster cython implementation