Index: src/Fragmentation/Automation/Controller/Commands/CheckResultsOperation.cpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/CheckResultsOperation.cpp	(revision d6fe761176eef8308b81d1ceb788fe4bf80e3d8d)
+++ src/Fragmentation/Automation/Controller/Commands/CheckResultsOperation.cpp	(revision 9948a765b2debfa507c64194b464a960ac1a7c34)
@@ -24,5 +24,4 @@
 
 #include <boost/bind.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 #include "Connection.hpp" // Must come before boost/serialization headers.
@@ -38,5 +37,5 @@
  * \param endpoint_iterator endpoint of the connection
  */
-void CheckResultsOperation::handle_connect_check(const boost::system::error_code& e,
+void CheckResultsOperation::handle_connect(const boost::system::error_code& e,
     boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
 {
@@ -54,5 +53,5 @@
     boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator;
     connection_.socket().async_connect(endpoint,
-      boost::bind(&CheckResultsOperation::handle_connect_check, this,
+      boost::bind(&CheckResultsOperation::handle_connect, this,
       boost::asio::placeholders::error, ++endpoint_iterator));
   } else {
@@ -89,35 +88,2 @@
 }
 
-/** Internal function to connect to the endpoint of the server asynchronuously.
- *
- * We require internal connetion_ and host and service to be set up for this.
- */
-void CheckResultsOperation::connect_check()
-{
-  Info info(__FUNCTION__);
-  // Resolve the host name into an IP address.
-  boost::asio::ip::tcp::resolver::iterator endpoint_iterator = getEndpointIterator();
-  boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator;
-
-  // Start an asynchronous connect operation.
-  std::cout << "Connecting to endpoint " << endpoint << " to check " << std::endl;
-  connection_.socket().async_connect(endpoint,
-    boost::bind(&CheckResultsOperation::handle_connect_check, this,
-      boost::asio::placeholders::error, ++endpoint_iterator));
-}
-
-/** Prepares the calculation of the results for the current jobs.
- */
-void CheckResultsOperation::operator()()
-{
-  Info info(__FUNCTION__);
-  // connect
-  connect_check();
-  //disconnect
-  disconnect();
-}
-
-void CheckResultsOperation::handle_connect(const boost::system::error_code& e,
-    boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
-{}
-
Index: src/Fragmentation/Automation/Controller/Commands/CheckResultsOperation.hpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/CheckResultsOperation.hpp	(revision d6fe761176eef8308b81d1ceb788fe4bf80e3d8d)
+++ src/Fragmentation/Automation/Controller/Commands/CheckResultsOperation.hpp	(revision 9948a765b2debfa507c64194b464a960ac1a7c34)
@@ -33,20 +33,10 @@
 
 public:
-  // placing receive jobs operations into an io_service
-  virtual void operator()();
-
   // virtual function pointer to the connection handler
   virtual void handle_connect(const boost::system::error_code& e,
       boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
 
-  /// Handle completion of a CheckResults operation.
-  void handle_connect_check(const boost::system::error_code& e,
-      boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
-
   /// Callback function when doneJobs have been received.
   void handle_ReceiveDoneJobs(const boost::system::error_code& e);
-
-  /// internal function to connect to server and check done jobs
-  void connect_check();
 
   /** Getter for doneJobs.
Index: src/Fragmentation/Automation/Controller/Commands/Operation.cpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/Operation.cpp	(revision d6fe761176eef8308b81d1ceb788fe4bf80e3d8d)
+++ src/Fragmentation/Automation/Controller/Commands/Operation.cpp	(revision 9948a765b2debfa507c64194b464a960ac1a7c34)
@@ -96,5 +96,5 @@
 }
 
-void Operation::testfunction(const std::string& _host, const std::string& _service)
+void Operation::operator()(const std::string& _host, const std::string& _service)
 {
   Info info(__FUNCTION__);
Index: src/Fragmentation/Automation/Controller/Commands/Operation.hpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/Operation.hpp	(revision d6fe761176eef8308b81d1ceb788fe4bf80e3d8d)
+++ src/Fragmentation/Automation/Controller/Commands/Operation.hpp	(revision 9948a765b2debfa507c64194b464a960ac1a7c34)
@@ -29,11 +29,9 @@
 
   // virtual function pointer to the operation to do
-  virtual void operator()() = 0;
+  void operator()(const std::string& _host, const std::string& _service);
 
   // virtual function pointer to the connection handler
   virtual void handle_connect(const boost::system::error_code& e,
       boost::asio::ip::tcp::resolver::iterator endpoint_iterator) = 0;
-
-  void testfunction(const std::string& _host, const std::string& _service);
 
   /// Handle completion of an operation.
Index: src/Fragmentation/Automation/Controller/Commands/ReceiveJobsOperation.cpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/ReceiveJobsOperation.cpp	(revision d6fe761176eef8308b81d1ceb788fe4bf80e3d8d)
+++ src/Fragmentation/Automation/Controller/Commands/ReceiveJobsOperation.cpp	(revision 9948a765b2debfa507c64194b464a960ac1a7c34)
@@ -41,5 +41,5 @@
  * \param endpoint_iterator endpoint of the connection
  */
-void ReceiveJobsOperation::handle_connect_calc(const boost::system::error_code& e,
+void ReceiveJobsOperation::handle_connect(const boost::system::error_code& e,
     boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
 {
@@ -57,5 +57,5 @@
     boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator;
     connection_.socket().async_connect(endpoint,
-      boost::bind(&ReceiveJobsOperation::handle_connect_calc, this,
+      boost::bind(&ReceiveJobsOperation::handle_connect, this,
       boost::asio::placeholders::error, ++endpoint_iterator));
   } else {
@@ -110,22 +110,4 @@
 }
 
-/** Internal function to connect to the endpoint of the server asynchronuously.
- *
- * We require internal connetion_ and host and service to be set up for this.
- */
-void ReceiveJobsOperation::connect_calc()
-{
-  Info info(__FUNCTION__);
-  // Resolve the host name into an IP address.
-  boost::asio::ip::tcp::resolver::iterator endpoint_iterator = getEndpointIterator();
-  boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator;
-
-  // Start an asynchronous connect operation.
-  std::cout << "Connecting to endpoint " << endpoint << " to calc " << std::endl;
-  connection_.socket().async_connect(endpoint,
-    boost::bind(&ReceiveJobsOperation::handle_connect_calc, this,
-      boost::asio::placeholders::error, ++endpoint_iterator));
-}
-
 /** Place number of jobs into this controller.
  *
@@ -140,17 +122,2 @@
 }
 
-/** Prepares the calculation of the results for the current jobs.
- */
-void ReceiveJobsOperation::operator()()
-{
-  Info info(__FUNCTION__);
-  // connect
-  connect_calc();
-  //disconnect
-  disconnect();
-}
-
-void ReceiveJobsOperation::handle_connect(const boost::system::error_code& e,
-    boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
-{}
-
Index: src/Fragmentation/Automation/Controller/Commands/ReceiveJobsOperation.hpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/ReceiveJobsOperation.hpp	(revision d6fe761176eef8308b81d1ceb788fe4bf80e3d8d)
+++ src/Fragmentation/Automation/Controller/Commands/ReceiveJobsOperation.hpp	(revision 9948a765b2debfa507c64194b464a960ac1a7c34)
@@ -32,20 +32,10 @@
 
 public:
-  /// Placing receive jobs operations into an io_service
-  virtual void operator()();
-
   // virtual function pointer to the connection handler
   virtual void handle_connect(const boost::system::error_code& e,
       boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
 
-  /// Handle completion of a calculate operation.
-  void handle_connect_calc(const boost::system::error_code& e,
-      boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
-
   /// Callback function when bunch of jobs have been sent.
   void handle_SendJobs(const boost::system::error_code& e);
-
-  /// internal function to connect to server and send jobs for calculation
-  void connect_calc();
 
   /// Setter for jobs
Index: src/Fragmentation/Automation/Controller/Commands/SendResultsOperation.cpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/SendResultsOperation.cpp	(revision d6fe761176eef8308b81d1ceb788fe4bf80e3d8d)
+++ src/Fragmentation/Automation/Controller/Commands/SendResultsOperation.cpp	(revision 9948a765b2debfa507c64194b464a960ac1a7c34)
@@ -24,5 +24,4 @@
 
 #include <boost/bind.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 #include <vector>
@@ -41,5 +40,5 @@
  * \param endpoint_iterator endpoint of the connection
  */
-void SendResultsOperation::handle_connect_get(const boost::system::error_code& e,
+void SendResultsOperation::handle_connect(const boost::system::error_code& e,
     boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
 {
@@ -57,5 +56,5 @@
     boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator;
     connection_.socket().async_connect(endpoint,
-      boost::bind(&SendResultsOperation::handle_connect_get, this,
+      boost::bind(&SendResultsOperation::handle_connect, this,
       boost::asio::placeholders::error, ++endpoint_iterator));
   } else {
@@ -108,22 +107,4 @@
 }
 
-/** Internal function to connect to the endpoint of the server asynchronuously.
- *
- * We require internal connetion_ and host and service to be set up for this.
- */
-void SendResultsOperation::connect_get()
-{
-  Info info(__FUNCTION__);
-  // Resolve the host name into an IP address.
-  boost::asio::ip::tcp::resolver::iterator endpoint_iterator = getEndpointIterator();
-  boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator;
-
-  // Start an asynchronous connect operation.
-  std::cout << "Connecting to endpoint " << endpoint << " to get results " << std::endl;
-  connection_.socket().async_connect(endpoint,
-    boost::bind(&SendResultsOperation::handle_connect_get, this,
-      boost::asio::placeholders::error, ++endpoint_iterator));
-}
-
 /** Getter for results.
  *
@@ -136,17 +117,2 @@
   return results;
 }
-
-/** Function to initiate receival of results.
- *
- */
-void SendResultsOperation::operator()()
-{
-  // connect
-  connect_get();
-  //disconnect
-  disconnect();
-}
-
-void SendResultsOperation::handle_connect(const boost::system::error_code& e,
-    boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
-{}
Index: src/Fragmentation/Automation/Controller/Commands/SendResultsOperation.hpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/SendResultsOperation.hpp	(revision d6fe761176eef8308b81d1ceb788fe4bf80e3d8d)
+++ src/Fragmentation/Automation/Controller/Commands/SendResultsOperation.hpp	(revision 9948a765b2debfa507c64194b464a960ac1a7c34)
@@ -32,13 +32,6 @@
 
 public:
-  // placing receive jobs operations into an io_service
-  virtual void operator()();
-
   // virtual function pointer to the connection handler
   virtual void handle_connect(const boost::system::error_code& e,
-      boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
-
-  /// Handle completion of a GetResults operation.
-  void handle_connect_get(const boost::system::error_code& e,
       boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
 
@@ -48,7 +41,4 @@
   /// Callback function when results have been received.
   void handle_ReceivedResults(const boost::system::error_code& e);
-
-  /// internal function to connect to server and receive calculated results
-  void connect_get();
 
   /// Getter for results
Index: src/Fragmentation/Automation/Controller/Commands/ShutdownOperation.cpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/ShutdownOperation.cpp	(revision d6fe761176eef8308b81d1ceb788fe4bf80e3d8d)
+++ src/Fragmentation/Automation/Controller/Commands/ShutdownOperation.cpp	(revision 9948a765b2debfa507c64194b464a960ac1a7c34)
@@ -24,5 +24,4 @@
 
 #include <boost/bind.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 #include "Connection.hpp" // Must come before boost/serialization headers.
@@ -38,5 +37,5 @@
  * \param endpoint_iterator endpoint of the connection
  */
-void ShutdownOperation::handle_connect_shutdown(const boost::system::error_code& e,
+void ShutdownOperation::handle_connect(const boost::system::error_code& e,
     boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
 {
@@ -54,5 +53,5 @@
     boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator;
     connection_.socket().async_connect(endpoint,
-      boost::bind(&ShutdownOperation::handle_connect_shutdown, this,
+      boost::bind(&ShutdownOperation::handle_connect, this,
       boost::asio::placeholders::error, ++endpoint_iterator));
   } else {
@@ -64,35 +63,2 @@
   }
 }
-
-/** Internal function to connect to the endpoint of the server asynchronuously.
- *
- * We require internal connetion_ and host and service to be set up for this.
- */
-void ShutdownOperation::connect_shutdown()
-{
-  Info info(__FUNCTION__);
-  // Resolve the host name into an IP address.
-  boost::asio::ip::tcp::resolver::iterator endpoint_iterator = getEndpointIterator();
-  boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator;
-
-  // Start an asynchronous connect operation.
-  std::cout << "Connecting to endpoint " << endpoint << " to get results " << std::endl;
-  connection_.socket().async_connect(endpoint,
-    boost::bind(&ShutdownOperation::handle_connect_shutdown, this,
-      boost::asio::placeholders::error, ++endpoint_iterator));
-}
-
-/** Function to initiate shutdown of server.
- *
- */
-void ShutdownOperation::operator()()
-{
-  // connect
-  connect_shutdown();
-  //disconnect
-  disconnect();
-}
-
-void ShutdownOperation::handle_connect(const boost::system::error_code& e,
-    boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
-{}
Index: src/Fragmentation/Automation/Controller/Commands/ShutdownOperation.hpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/ShutdownOperation.hpp	(revision d6fe761176eef8308b81d1ceb788fe4bf80e3d8d)
+++ src/Fragmentation/Automation/Controller/Commands/ShutdownOperation.hpp	(revision 9948a765b2debfa507c64194b464a960ac1a7c34)
@@ -31,17 +31,7 @@
 
 public:
-  // placing receive jobs operations into an io_service
-  virtual void operator()();
-
   // virtual function pointer to the connection handler
   virtual void handle_connect(const boost::system::error_code& e,
       boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
-
-  /// Handle completion of a Shutdown operation.
-  void handle_connect_shutdown(const boost::system::error_code& e,
-      boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
-
-  /// internal function to connect to server and receive calculated results
-  void connect_shutdown();
 };
 
