Refactoring JavaScript: Turning Bad Code Into Good Code