Major JS refactoring.