Clean up and refactor existing code
Clean up and refactor existing code

- Make spacing consistent
- Make scoping consistent
- Pass ESLint
- Add JSDoc for key functions
- Reduce state, replace some for loops with .map and .reduce
- Clean up rounding for display
- Clean up some variable names

looker/regression-js,looker/regression-js