Refactor TableBuilder