Reworked history implementation