Remove unneeded sort
cleanup CLI tests
Merge last changes