The goal here is reduce as much as possible the number of calls to appendChild and append to DOM only once