Rewrote the loader code (but still ugly).