Added implementations of setMaterial, removeMaterial, getMaterial