First implementation of history buffer.