Completed history traversal algorithm and implemented History interface.