Fixed Material Properties in leaf node and scenegraph

Probably the worst code ever....