Adding chaining and realignment! Need to parallelise the realignment,
but should be easy.