Changed message passing to a pointer to the message, for better performance