Refactoring. Improving controls painting.