Added the frame class, based on old SNES GUI code.