Refactoring paint methods into Painter.