Refactor plugin to remove encapsulate datatable plugin