Made noTone static and replaced repetitive code with calls to noTone