Send in framebuffer to update(), and moved some state around.