more Index functions
Refactor index contructor functions
Better Index isPermutation tests
test fix
typo fix
Refactor Indexz creation, add docs
Fix isPermutation check
fix more cases of isPermutation
tidy