Rewrite of painter infrastructure.
Rewrite of painter infrastructure.