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