Refactoring: making framebuffer code more OO-ish.