Refactor to use BackboneJS.