Exporting source maps

Please review the code in the meanwhile. This is not ready to be merged yet.
Can you please rename this from `list` to `collection` – it is a very confusing clash with `std::list` (which it isn't).