Suggest JS Refactoring