Added Chosen. Refactor js.