Merge "Small refactor for reset buffer" into main