I've placed my port here:
https://gist.github.com/anonymous/ce176d7ab4f6b7b1ba91
If you see anything wrong with it, or odd, feel free to share.
I'm still investigating what is happening to make the run so slow, so if you can find something wrong in my code, that would help.