Code refactoring for Drawing