Rewriting js to ember, first step.