Remove unused variables and add a new variable to keep track of multiple TOF channels