continued refactoring work on Gfx