Table class refactoring