constructor(maxSize = 128) {
    this.#maxSize = maxSize;
  }
Class to handle undo/redo.
Commands are just saved in a buffer.
If we hit some memory issues we could likely use a circular buffer.
It has to be used as a singleton.