Add better documentation, make messagesToSend thread-safe
Dispatch external messages before starting with external events. Stops DPOR
from hanging, though I don't understand why.