Some drawing refactoring.