Refactor the js presentation