Remove length check. #1066
Remove array_values(). #1066
Remove sorting. It is not needed. #1066