Redesigned and clean up code for historyBufferReadPrevious