BZ-8894: Update JavaScript files with class pattern and JSDoc