Simplify index-selection code
Moar tests, moar code coverage