Refactored table model into classes for individual types of tables