add a message entity and use it in the client

You should test without the constructor optional parameters (but I think this is obvious due to my previous messages :) )