Removed 5-loop repaint. Added support for brush state.