Refactored the way the tableViewController gets the results from core data