when I loaded the first data I got something like this https://jsfiddle.net/hsekwbyv/.
The data and headers were missing (as variables) so I used the default settings. What I can see from the code it one thing - we should not use the HTML structure for the Handsontable container (in this case #container). If you wish to use CSS to change styling it should be done via cells, columns or (for particular cells) via setCellMeta method.
Why it looks like this?
Handsontable creates layers of cells to support some of the operations. If your case it creates another layer but the rest of the table is not aware of it as it is not visible in the table’s metadata.