first attempt towards #754

Here is a simple attempt at trying to work towards the output described.

This doesn't work yet, I got stuck, but I was hoping it might be useful anyway.

The issue specifically at the moment is that the `System` object is not defined as a global object within the modules that need it.

Any tips appreciated.