Index: src/Fragmentation/Automation/Makefile.am
===================================================================
--- src/Fragmentation/Automation/Makefile.am	(revision f7f99510d4b31a8e2923b0af4c9fc96e6ef2fa3f)
+++ src/Fragmentation/Automation/Makefile.am	(revision 00a248e52e820b8b1e298f757c031943126dee7d)
@@ -31,10 +31,12 @@
 
 clients11n_SOURCES = \
-  client.cpp \
+  atexit.cpp \
+  atexit.hpp \
   Connection.hpp \
   FragmentJob.cpp \
   FragmentJob.hpp \
   FragmentWorker.cpp \
-  FragmentWorker.hpp
+  FragmentWorker.hpp \
+  Worker.cpp
 clients11n_LDFLAGS = $(AM_LDFLAGS) $(BOOST_ASIO_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS)
 clients11n_CXXFLAGS = $(AM_CPPFLAGS)
Index: src/Fragmentation/Automation/Worker.cpp
===================================================================
--- src/Fragmentation/Automation/Worker.cpp	(revision 00a248e52e820b8b1e298f757c031943126dee7d)
+++ src/Fragmentation/Automation/Worker.cpp	(revision 00a248e52e820b8b1e298f757c031943126dee7d)
@@ -0,0 +1,65 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2011 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * \file Worker.cpp
+ *
+ * This file strongly follows the Serialization example from the boost::asio
+ * library (see client.cpp)
+ *
+ *  Created on: Oct 19, 2011
+ *      Author: heber
+ */
+
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+// boost asio needs specific operator new
+#include <boost/asio.hpp>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include <iostream>
+
+#include "atexit.hpp"
+#include "CodePatterns/Info.hpp"
+#include "FragmentWorker.hpp"
+
+
+int main(int argc, char* argv[])
+{
+  // from this moment on, we need to be sure to deeinitialize in the correct order
+  // this is handled by the cleanup function
+  atexit(cleanUp);
+
+  try
+  {
+    // Check command line arguments.
+    if (argc != 3)
+    {
+      std::cerr << "Usage: " << argv[0] << " <host> <port>" << std::endl;
+      return 1;
+    }
+
+    boost::asio::io_service io_service;
+    FragmentWorker client(io_service, argv[1], argv[2]);
+    {
+      Info info("io_service");
+      io_service.run();
+    }
+  }
+  catch (std::exception& e)
+  {
+    std::cerr << e.what() << std::endl;
+  }
+
+
+  return 0;
+}
Index: c/Fragmentation/Automation/client.cpp
===================================================================
--- src/Fragmentation/Automation/client.cpp	(revision f7f99510d4b31a8e2923b0af4c9fc96e6ef2fa3f)
+++ 	(revision )
@@ -1,37 +1,0 @@
-//
-// client.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#include <boost/asio.hpp>
-#include <iostream>
-#include "FragmentWorker.hpp"
-
-
-int main(int argc, char* argv[])
-{
-  try
-  {
-    // Check command line arguments.
-    if (argc != 3)
-    {
-      std::cerr << "Usage: client <host> <port>" << std::endl;
-      return 1;
-    }
-
-    boost::asio::io_service io_service;
-    FragmentWorker client(io_service, argv[1], argv[2]);
-    io_service.run();
-  }
-  catch (std::exception& e)
-  {
-    std::cerr << e.what() << std::endl;
-  }
-
-  return 0;
-}
Index: tests/CodeChecks/testsuite-config_h.at
===================================================================
--- tests/CodeChecks/testsuite-config_h.at	(revision f7f99510d4b31a8e2923b0af4c9fc96e6ef2fa3f)
+++ tests/CodeChecks/testsuite-config_h.at	(revision 00a248e52e820b8b1e298f757c031943126dee7d)
@@ -1,5 +1,5 @@
 AT_SETUP([Checking for present config.h include])
 AT_KEYWORDS([CodeCheck config_h])
-ok="unity.cpp AllActionHeaders.hpp AllActionPython.hpp pugiconfig.hpp pugixml.cpp pugixml.hpp client.cpp"
+ok="unity.cpp AllActionHeaders.hpp AllActionPython.hpp pugiconfig.hpp pugixml.cpp pugixml.hpp"
 echo `pwd`
 echo "${#ok[*]} are ok to not contain config.h: ${ok[*]}."
Index: tests/CodeChecks/testsuite-memdebug.at
===================================================================
--- tests/CodeChecks/testsuite-memdebug.at	(revision f7f99510d4b31a8e2923b0af4c9fc96e6ef2fa3f)
+++ tests/CodeChecks/testsuite-memdebug.at	(revision 00a248e52e820b8b1e298f757c031943126dee7d)
@@ -1,5 +1,5 @@
 AT_SETUP([Checking for present MemDebug.hpp include])
 AT_KEYWORDS([CodeCheck MemDebug])
-ok="builder.cpp MemDebug.cpp SubspaceFactorizer.cpp TestRunner.cpp unity.cpp pugixml.cpp client.cpp"
+ok="builder.cpp MemDebug.cpp SubspaceFactorizer.cpp TestRunner.cpp unity.cpp pugixml.cpp"
 echo `pwd`
 echo "${#ok[*]} are ok to not contain MemDebug.hpp: ${ok[0]} ${ok[1]}."
Index: tests/CodeChecks/testsuite-project-disclaimer.at
===================================================================
--- tests/CodeChecks/testsuite-project-disclaimer.at	(revision f7f99510d4b31a8e2923b0af4c9fc96e6ef2fa3f)
+++ tests/CodeChecks/testsuite-project-disclaimer.at	(revision 00a248e52e820b8b1e298f757c031943126dee7d)
@@ -1,5 +1,5 @@
 AT_SETUP([Checking for present project disclaimer])
 AT_KEYWORDS([CodeCheck disclaimer])
-ok="unity.cpp pugixml.cpp client.cpp"
+ok="unity.cpp pugixml.cpp"
 echo `pwd`
 echo "${#ok[*]} are ok to not contain config.h: ${ok[*]}."
