Refactor js a little.