Two classes for passing messages to workers