Some cleanup and improvment on datatable