Performance improvements for ~2x speedup.

Is now slightly faster than version in PyCogent.