Improve metadata handling, and use multipolygon where useful.