Implementing the tablemodel.