start refactoring graphics/drawing code