An attempt to generate source maps

Please double check that these changes work before accepting them.