Fixed bugs in IndexTable, changed main interface. Night wasted
Added big test