refactoring gui.graphics package