Rewrite metadata

Presumably fixes #150