Refactor A/B test code based on some new JS techniques I learned from my course.