Adapt algorithms to work with split sequences.
The main script.