Undo actions for sorting and filtering

Added undo actions for sorting and filtering.