More removal of m1 and m2 usages. m1 and m2 were convenient and fast, although
if we really want n number of materials possible for elements, we'll need something
more convenient (maybe stick with list, maybe switch over to vector).