Add wrapper structure, make metadata dictionary per-wrapper rather than global