Changed all methods in class Messages to return string object

instead of printing on the console.