fixed segfault
fixed stupid uniforms
cleanup