refactor for htmlbars and improve list rendering