extract framebuffer handling to a separate class