Index: src/Fragmentation/Automation/Controller/Commands/EnrollInPoolOperation.cpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/EnrollInPoolOperation.cpp	(revision a8f54b69dfbfc0ab76b69519598d610576b3927e)
+++ src/Fragmentation/Automation/Controller/Commands/EnrollInPoolOperation.cpp	(revision a06358c06389e0dcc7c1707087422a19b0beb155)
@@ -30,4 +30,5 @@
 #include "Jobs/FragmentJob.hpp"
 #include "WorkerAddress.hpp"
+#include "WorkerChoices.hpp"
 
 /// Handle completion of a connect operation.
@@ -41,7 +42,6 @@
     // of jobs. The connection::async_read() function will automatically
     // decode the data that is read from the underlying socket.
-    LOG(1, "INFO: Enrolling in pool with " << address << "...");
     connection_.async_write(address,
-      boost::bind(&EnrollInPoolOperation::handle_FinishOperation, this,
+      boost::bind(&EnrollInPoolOperation::handle_SendChoice, this,
       boost::asio::placeholders::error));
   } else if (endpoint_iterator != boost::asio::ip::tcp::resolver::iterator()) {
@@ -61,6 +61,29 @@
 
 
-/// Handle sent of address
-void EnrollInPoolOperation::handle_sendAddress(const boost::system::error_code& e)
+/// Handle sending choice
+void EnrollInPoolOperation::handle_SendChoice(const boost::system::error_code& e)
+{
+  Info info(__FUNCTION__);
+  if (!e)
+  {
+    // Successfully established connection. Start operation to read the list
+    // of jobs. The connection::async_read() function will automatically
+    // decode the data that is read from the underlying socket.
+    LOG(1, "INFO: Enrolling in pool with " << address << " ...");
+    enum WorkerChoices choice = EnrollInPool;
+    connection_.async_write(choice,
+      boost::bind(&EnrollInPoolOperation::handle_ReceiveFlag, this,
+      boost::asio::placeholders::error));
+  } else {
+    // An error occurred. Log it and return. Since we are not starting a new
+    // operation the io_service will run out of work to do and the client will
+    // exit.
+    ELOG(1, e.message());
+  }
+}
+
+
+/// Handle receiving flag
+void EnrollInPoolOperation::handle_ReceiveFlag(const boost::system::error_code& e)
 {
   Info info(__FUNCTION__);
@@ -81,5 +104,5 @@
 }
 
-/// Handle sent of address
+/// Handle received flag
 void EnrollInPoolOperation::handle_FinishOperation(const boost::system::error_code& e)
 {
Index: src/Fragmentation/Automation/Controller/Commands/EnrollInPoolOperation.hpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/EnrollInPoolOperation.hpp	(revision a8f54b69dfbfc0ab76b69519598d610576b3927e)
+++ src/Fragmentation/Automation/Controller/Commands/EnrollInPoolOperation.hpp	(revision a06358c06389e0dcc7c1707087422a19b0beb155)
@@ -47,8 +47,11 @@
       boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
 
-  /// Handle sent of address
-  void handle_sendAddress(const boost::system::error_code& e);
+  /// Handle sending choice
+  void handle_SendChoice(const boost::system::error_code& e);
 
-  /// Handle sent of address
+  /// Handle receiving flag
+  void handle_ReceiveFlag(const boost::system::error_code& e);
+
+  /// Handle received flag
   void handle_FinishOperation(const boost::system::error_code& e);
 
Index: src/Fragmentation/Automation/Controller/Commands/ObtainJobOperation.cpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/ObtainJobOperation.cpp	(revision a8f54b69dfbfc0ab76b69519598d610576b3927e)
+++ src/Fragmentation/Automation/Controller/Commands/ObtainJobOperation.cpp	(revision a06358c06389e0dcc7c1707087422a19b0beb155)
@@ -29,4 +29,5 @@
 #include "CodePatterns/Log.hpp"
 #include "Jobs/FragmentJob.hpp"
+#include "WorkerChoices.hpp"
 
 /// Handle completion of a connect operation.
Index: src/Fragmentation/Automation/Controller/Commands/SubmitResultOperation.cpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/SubmitResultOperation.cpp	(revision a8f54b69dfbfc0ab76b69519598d610576b3927e)
+++ src/Fragmentation/Automation/Controller/Commands/SubmitResultOperation.cpp	(revision a06358c06389e0dcc7c1707087422a19b0beb155)
@@ -29,4 +29,5 @@
 #include "CodePatterns/Log.hpp"
 #include "Results/FragmentResult.hpp"
+#include "WorkerChoices.hpp"
 
 
@@ -43,5 +44,5 @@
     LOG(1, "INFO: Sending address " << address << " ...");
     connection_.async_write(address,
-      boost::bind(&SubmitResultOperation::handle_SendAddress, this,
+      boost::bind(&SubmitResultOperation::handle_SendChoice, this,
       boost::asio::placeholders::error));
   } else if (endpoint_iterator != boost::asio::ip::tcp::resolver::iterator()) {
@@ -62,5 +63,5 @@
 
 /// Callback function when address has been sent and result is about to
-void SubmitResultOperation::handle_SendAddress(const boost::system::error_code& e)
+void SubmitResultOperation::handle_SendChoice(const boost::system::error_code& e)
 {
   Info info(__FUNCTION__);
@@ -70,6 +71,6 @@
     // of jobs. The connection::async_write() function will automatically
     // decode the data that is read from the underlying socket.
-    LOG(1, "INFO: Sending result #" << result->getId() << " ...");
-    connection_.async_write(result,
+    enum WorkerChoices choice = SendResult;
+    connection_.async_write(choice,
       boost::bind(&SubmitResultOperation::handle_SendResult, this,
       boost::asio::placeholders::error));
@@ -83,11 +84,17 @@
 }
 
-/// Callback function when result has been sent.
+/// Callback function when address has been sent and result is about to
 void SubmitResultOperation::handle_SendResult(const boost::system::error_code& e)
 {
   Info info(__FUNCTION__);
-  if (!e) {
-    LOG(1, "INFO: result #" << result->getId() << " sent.");
-    AsyncOperation::handle_FinishOperation(e);
+  if (!e)
+  {
+    // Successfully established connection. Start operation to read the list
+    // of jobs. The connection::async_write() function will automatically
+    // decode the data that is read from the underlying socket.
+    LOG(1, "INFO: Sending result #" << result->getId() << " ...");
+    connection_.async_write(result,
+      boost::bind(&SubmitResultOperation::handle_FinishOperation, this,
+      boost::asio::placeholders::error));
   } else {
     // An error occurred. Log it and return. Since we are not starting a new
@@ -98,2 +105,10 @@
   }
 }
+
+/// Callback function when result has been sent.
+void SubmitResultOperation::handle_FinishOperation(const boost::system::error_code& e)
+{
+  Info info(__FUNCTION__);
+  LOG(1, "INFO: result #" << result->getId() << " sent.");
+  AsyncOperation::handle_FinishOperation(e);
+}
Index: src/Fragmentation/Automation/Controller/Commands/SubmitResultOperation.hpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/SubmitResultOperation.hpp	(revision a8f54b69dfbfc0ab76b69519598d610576b3927e)
+++ src/Fragmentation/Automation/Controller/Commands/SubmitResultOperation.hpp	(revision a06358c06389e0dcc7c1707087422a19b0beb155)
@@ -68,8 +68,11 @@
 
   /// Callback function when address has been sent and result is about to.
-  void handle_SendAddress(const boost::system::error_code& e);
+  void handle_SendChoice(const boost::system::error_code& e);
 
   /// Callback function when result has been sent.
   void handle_SendResult(const boost::system::error_code& e);
+
+  /// Callback function when result has been sent.
+  void handle_FinishOperation(const boost::system::error_code& e);
 
 private:
