Implement state machine ala js0n.  First test passes, second fails.