Added continuation functionality to patterngen.