current shading debug mode and clean up code