Split some functionality to table.js
Add new line at end of table.js