Make `messages` take iterables, not file handles