Code cleanup Pass 2