Added History tracking and buttons