p2plib/messages.go / MessageHandler put in a way that the messages handlers can be created from the main code (not from the package)
subsitute the REST functions by the messages in the MessageHandler