data_table.js code refactoring