Futher improvements to fix tiny issues with the material as a string
-- bug that allows a 0 material to be written
-- plate variables