Adapted to use the messaging library