Fix function call
Fix the sortable check for indexes
Use the correct function name
Fix the prefix length function

I wobbled between the function move and slight calling change.
Remove unused code
Fix the range specification for view indexes