Rewrote MaterialData to use tags instead, simplified a lot everywhere.