Add comments and rename resolve counter.