Migrate the algorithm examples across from the thesis.