Added better shader and fbo support and fixed a few things