Added functionality for history managment.