fix up texture stuff for MEIM -- it still needs a bit of attention, but
might work :)