Building the command batch

These routines add commands to the buffer or clear the buffer: