Remove unused variables
Update all scripts with new getNumberEvents() method