Refactoring to create a common table view data source interface