Used cython.long rather then int in some cases.
Moved cython syntax to .pxd files to avoid cimport errors.