seq-builder rewritten and minor changes