Refactorings for JavaScript