Change DispatchResult type to class instead of struct