Replace the load pipeline with a single new procedure, LoadModule, written in a more monadic style. This eliminates a great deal of code, mostly by simplifying error handling.