Refactor paint properties loop