Added checks that blocks are available for sorting with comparators
Added documentation