remove unnecessary unsets + temp variable + comment nit