Add several index implementations and a program to test them with.  Some reorganisation and pruning too.