Refactor.
Refactor js.