Module prepend

Still two failures to work out, but it mostly works.

Don't pull until this is worked out. There might be dragons hiding in those last two.