Added support for metadata in addition to ordered data.