Fix indentation for JavaScript-mode. Refactoring.