Added table view delegate and sections logic