Support for index sort acdending/descending. Added unit tests