Structure table with thead and tbody to make javascript append/prepend simpler to understand