Identification and removal of non-Gaussian noise transients for gravitational-wave searches