Simplify sorting code
Updated readme, don't forget to update submodules