code refactoring of JS files