js refactoring
zoom, data smoothing/avg