Minor refactoring tweak to JS file.