code cleanup thread resolution mehbeh