MVP fix that makes it work with new loader API.

Parts of the program are non-idiomatic usage of the new loader API and
could be improved.