Incorporated the new message retrieval functions.
Finished up with the assignment.