Export to OSM cleanup.

Fixes #271.