Major rewrite of painter mechanism.
Major rewrite of painter mechanism.