Split test_algorithm and test_array.
Add key-value sorter.
Remove unused variable in tests.