Refactored code to use the model instead of creating multiple NSDictionary objects.