Refactored the draw method.