Added commands, undoing, and redoing.