Isolate leave related logic from RecordAction into LeaveAction.