refactoring with JsRender.
refactoring with JsRender.