Separated gzz into funcstions and profiled

Moved some things around and got rid of some Python variable conversions
to get a decent speedup. Got it faster than C.
Need to implement a queue in Cython to be able to release the GIL and
use prange.