Extract retrieving data from model to controller.