Abstract data formatting into Object
Revert to js in html gile