First pass on colorray state machine