Initial motif-generating code.