took some further steps in implementing gfxdevice.