Misc changes to loader