Move all the framebuffer management out into its own file.