JS file refactoring...