Run cython version of the code on Gordon

Fixed the code to run with Hadoop on Gordon.