dumb bug in shader code, some cleanup