Added undo and redo functionality to ImageEnhancer