Simplify function calls, add SortIndex