cleanup and multiplication reduction