function buildTableWithThead(headCells, bodyRows) {
        var table = document.createElement('table');

        var thead = document.createElement('thead');

        thead.appendChild(buildRow(headCells));

        table.appendChild(thead);

        var tbody = document.createElement('tbody');

        bodyRows.forEach(function (row) {
            tbody.appendChild(buildRow(row));
        });

        table.appendChild(tbody);

        return table;
    }
Builds a table where the first row is a thead and the body
is constructed from the given cell tag matrix

@param {string[]} headCells Cell tags for the row contained by thead (tr|th)
@param {string[][]} bodyRows Matrix (array of arrays) of cell tags contained by tbody (tr|th)
@returns {Element} table constructed from given tags