Refactoring course unsubscribe action.