table refactor and componentization