Changed models code to send the data to views