Various changes to allow material use

Material now appears to be working on the shader. Still need to verify
if working properly