Implement splitLookup and split.

I may have overlooked some opportunities to improve performance.