Created a function that passes data to classes and then sets it to be the title of the next view controller.