Refactoring GFX module.