Finish class loader fixes

This finishes out #518 with some more class loader fixes.