Refactor JS files.