Using structs instead of classes for task message passing