Js refactor 10142013