Jenks reloaded

In-progress refactor of Jenks

* Removes 1-based array assumption
* Adds a lot more comments, and in the right places.