Add sorted pool splitting.
Added a command line interface, as well as some examples.