Mod text/binary loading code cleanup