Exporting source maps

Please review the code in the meanwhile. This is not ready to be merged yet.
:+1: