Tech Debt: Refactor JavaScript