Allowing modules to return either a single message or a list of messages, fixing bugs in imageModule