History Redo and Undo Button Functionality

This PR is dedicated for history :)