Refactor to render ui with js