Closes #26
Still not debugged, and I'm not sure if the added complexity is worth the better indexing.