Index: common/MessageProcessor.cpp
===================================================================
--- common/MessageProcessor.cpp	(revision 635ad9bc611245f979f31a3cb8536a7cd912cc7a)
+++ common/MessageProcessor.cpp	(revision 68d94de7bbe815d1c0be9b36199a2411f78823b3)
@@ -13,4 +13,12 @@
 
 MessageProcessor::MessageProcessor() {
+   this->sock = 0;
+   this->outputLog = NULL;
+   lastUsedId = 0;
+}
+
+MessageProcessor::MessageProcessor(int sock, ofstream* outputLog) {
+   this->sock = sock;
+   this->outputLog = outputLog;
    lastUsedId = 0;
 }
@@ -19,5 +27,5 @@
 }
 
-int MessageProcessor::sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest, ofstream* outputLog) {
+int MessageProcessor::sendMessage(NETWORK_MSG *msg, struct sockaddr_in *dest) {
    cout << "Sending message of type " << msg->type << endl;
 
@@ -35,5 +43,5 @@
 }
 
-int MessageProcessor::receiveMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *source, ofstream* outputLog) {
+int MessageProcessor::receiveMessage(NETWORK_MSG *msg, struct sockaddr_in *source) {
    socklen_t socklen = sizeof(struct sockaddr_in);
 
@@ -84,5 +92,5 @@
 }
 
-void MessageProcessor::resendUnackedMessages(int sock, ofstream* outputLog) {
+void MessageProcessor::resendUnackedMessages() {
    map<unsigned int, map<unsigned long, MessageContainer> >::iterator it;
    map<unsigned long, MessageContainer>::iterator it2;
@@ -99,5 +107,5 @@
 }
 
-void MessageProcessor::cleanAckedMessages(ofstream* outputLog) {
+void MessageProcessor::cleanAckedMessages() {
    map<unsigned int, map<unsigned long, MessageContainer> >::iterator it = sentMessages.begin();
    map<unsigned long, MessageContainer>::iterator it2;
Index: common/MessageProcessor.h
===================================================================
--- common/MessageProcessor.h	(revision 635ad9bc611245f979f31a3cb8536a7cd912cc7a)
+++ common/MessageProcessor.h	(revision 68d94de7bbe815d1c0be9b36199a2411f78823b3)
@@ -10,4 +10,6 @@
 class MessageProcessor {
 private:
+   int sock;
+   ofstream* outputLog;
    int lastUsedId;
 
@@ -18,14 +20,15 @@
    map<unsigned long, map<unsigned int, unsigned long long> > ackedMessages;
 
-   unsigned long pid;
+   //unsigned long pid;
 
 public:
    MessageProcessor();
+   MessageProcessor(int sock, ofstream* outputLog = NULL);
    ~MessageProcessor();
 
-   int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest, ofstream* outputLog = NULL);
-   int receiveMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest, ofstream* outputLog = NULL);
-   void resendUnackedMessages(int sock, ofstream* outputLog = NULL);
-   void cleanAckedMessages(ofstream* outputLog = NULL);
+   int sendMessage(NETWORK_MSG *msg, struct sockaddr_in *dest);
+   int receiveMessage(NETWORK_MSG *msg, struct sockaddr_in *source);
+   void resendUnackedMessages();
+   void cleanAckedMessages();
 
    map<unsigned int, map<unsigned long, MessageContainer> >& getSentMessages();
