Moved some methods to delegate and data source protocols.