Index: src/Fragmentation/Automation/FragmentJob.cpp
===================================================================
--- src/Fragmentation/Automation/FragmentJob.cpp	(revision b5ebb569dab339861535e482277051aeb3f8943a)
+++ src/Fragmentation/Automation/FragmentJob.cpp	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
@@ -26,6 +26,6 @@
  */
 FragmentJob::FragmentJob() :
-  outputfile(""),
-  JobId(-1)
+  JobId(-1),
+  outputfile("")
 {}
 
@@ -36,6 +36,6 @@
  */
 FragmentJob::FragmentJob(const std::string &_outputfile, const JobId_t _JobId) :
-  outputfile(_outputfile),
-  JobId(_JobId)
+  JobId(_JobId),
+  outputfile(_outputfile)
 {}
 
@@ -52,9 +52,4 @@
 bool FragmentJob::operator==(const FragmentJob &other) const
 {
-  return (outputfile == other.outputfile) && (JobId == JobId);
+  return (outputfile == other.outputfile) && (getId() == other.getId());
 }
-
-const JobId_t FragmentJob::getId() const
-{
-  return JobId;
-}
Index: src/Fragmentation/Automation/FragmentJob.hpp
===================================================================
--- src/Fragmentation/Automation/FragmentJob.hpp	(revision b5ebb569dab339861535e482277051aeb3f8943a)
+++ src/Fragmentation/Automation/FragmentJob.hpp	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
@@ -16,6 +16,7 @@
 #include <string>
 
-#include "boost/serialization/access.hpp"
+#include "boost/serialization/array.hpp"
 
+#include "JobId.hpp"
 #include "types.hpp"
 
@@ -28,5 +29,5 @@
  * transfered to a scheduler (server) and be deserialized by the Worker.
  */
-class FragmentJob
+class FragmentJob : public JobId
 {
   friend class FragmentWorker;
@@ -42,5 +43,6 @@
   }
 
-  const JobId_t getId() const;
+  //!> string containing the configuration file for the solver
+  std::string outputfile;
 
 private:
@@ -50,13 +52,7 @@
   void serialize(Archive& ar, const unsigned int version)
   {
+    ar & boost::serialization::base_object<JobId>(*this);
     ar & outputfile;
-    ar & JobId;
   }
-
-private:
-  //!> string containing the configuration file for the solver
-  std::string outputfile;
-  //!> unique id of this job (used for the temporary filename) and associating result
-  JobId_t JobId;
 };
 
Index: src/Fragmentation/Automation/FragmentQueue.cpp
===================================================================
--- src/Fragmentation/Automation/FragmentQueue.cpp	(revision b5ebb569dab339861535e482277051aeb3f8943a)
+++ src/Fragmentation/Automation/FragmentQueue.cpp	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
@@ -100,9 +100,9 @@
 {
   /// check for presence
-  ResultMap::iterator iter = results.find(jobid);
+  ResultMap::iterator iter = results.find(result.getId());
   ASSERT(iter != results.end(),
-      "FragmentQueue::pushResult() - job "+toString(jobid)+" is not known to us.");
+      "FragmentQueue::pushResult() - job "+toString(result.getId())+" is not known to us.");
   ASSERT(iter->second == NoResult,
-      "FragmentQueue::pushResult() - is not waiting for the result of job "+toString(jobid)+".");
+      "FragmentQueue::pushResult() - is not waiting for the result of job "+toString(result.getId())+".");
   /// and overwrite NoResult in found entry
   iter->second = result;
Index: src/Fragmentation/Automation/FragmentResult.cpp
===================================================================
--- src/Fragmentation/Automation/FragmentResult.cpp	(revision b5ebb569dab339861535e482277051aeb3f8943a)
+++ src/Fragmentation/Automation/FragmentResult.cpp	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
@@ -25,8 +25,8 @@
 /** Constructor of class FragmentResult.
  *
- * \param id id of FragmntJob associated to this FragmentResult.
+ * \param _id id of FragmntJob associated to this FragmentResult.
  */
 FragmentResult::FragmentResult(const JobId_t _id) :
-  id(_id),
+  JobId(_id),
   result(std::string("Nothing"))
 {}
@@ -36,5 +36,5 @@
  */
 FragmentResult::FragmentResult(const FragmentResult &other) :
-  id(other.id),
+  JobId(other.getId()),
   result(other.result)
 {}
@@ -46,17 +46,17 @@
 {}
 
-/** Equality operator: Equal if both ids are the same
+/** Equality operator: Equal if both JobIds are the same
  *
  * \param other instance to check against
- * \return true - both ids are the same, false - ids are not the same.
+ * \return true - both JobIds are the same, false - JobIds are not the same.
  */
 bool FragmentResult::operator==(const FragmentResult &other) const
 {
-  return id == other.id;
+  return getId() == other.getId();
 }
 
 /** Assigment operator.
  *
- * \note We can't use default assigment because of const member FragmentResult::id.
+ * \note We can't use default assigment because of const member FragmentResult::JobId.
  *
  * \param other instance to make equal to
@@ -66,5 +66,5 @@
   /// check self-assignment
   if (this != &other) {
-    const_cast<JobId_t &>(id) = other.id;
+    setId(other.getId());
     result = other.result;
   }
Index: src/Fragmentation/Automation/FragmentResult.hpp
===================================================================
--- src/Fragmentation/Automation/FragmentResult.hpp	(revision b5ebb569dab339861535e482277051aeb3f8943a)
+++ src/Fragmentation/Automation/FragmentResult.hpp	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
@@ -16,4 +16,8 @@
 
 #include <string>
+
+#include "boost/serialization/array.hpp"
+
+#include "JobId.hpp"
 #include "types.hpp"
 
@@ -21,5 +25,5 @@
  *
  */
-class FragmentResult
+class FragmentResult : public JobId
 {
 public:
@@ -33,9 +37,16 @@
     { return !(*this == other); }
 
-
-  //!> this job's unique id
-  const JobId_t id;
   //!> result
   std::string result;
+
+private:
+  friend class boost::serialization::access;
+  // serialization
+  template <typename Archive>
+  void serialize(Archive& ar, const unsigned int version)
+  {
+    ar & boost::serialization::base_object<JobId>(*this);
+    ar & result;
+  }
 };
 
Index: src/Fragmentation/Automation/FragmentWorker.cpp
===================================================================
--- src/Fragmentation/Automation/FragmentWorker.cpp	(revision b5ebb569dab339861535e482277051aeb3f8943a)
+++ src/Fragmentation/Automation/FragmentWorker.cpp	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
@@ -88,5 +88,5 @@
 void FragmentWorker::handle_read(const boost::system::error_code& e)
 {
-    Info info(__FUNCTION__);
+  Info info(__FUNCTION__);
   if (!e)
   {
@@ -96,5 +96,5 @@
         std::cout << "Job number " << i << "\n";
         std::cout << "  output: " << jobs_[i].outputfile << "\n";
-        std::cout << "  id: " << jobs_[i].JobId << "\n";
+        std::cout << "  id: " << jobs_[i].getId() << "\n";
     }
   }
Index: src/Fragmentation/Automation/JobId.cpp
===================================================================
--- src/Fragmentation/Automation/JobId.cpp	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
+++ src/Fragmentation/Automation/JobId.cpp	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
@@ -0,0 +1,57 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2011-2012 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * JobId.cpp
+ *
+ *  Created on: Oct 23, 2011
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "JobId.hpp"
+
+/** Constructor for class JobId.
+ *
+ */
+JobId::JobId()
+{}
+
+/** Constructor for class JobId.
+ * \param id JobId to set
+ */
+JobId::JobId(const JobId_t id) :
+  id(id)
+{}
+
+/** Destructor for class JobId.
+ *
+ */
+JobId::~JobId()
+{}
+
+/** Getter for id.
+ * \return id
+ */
+const JobId_t JobId::getId() const
+{
+  return id;
+}
+
+/** Protected seetter for id.
+ * \param _id new id
+ */
+void JobId::setId(const JobId_t _id)
+{
+  id = _id;
+}
Index: src/Fragmentation/Automation/JobId.hpp
===================================================================
--- src/Fragmentation/Automation/JobId.hpp	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
+++ src/Fragmentation/Automation/JobId.hpp	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
@@ -0,0 +1,49 @@
+/*
+ * JobId.hpp
+ *
+ *  Created on: Oct 23, 2011
+ *      Author: heber
+ */
+
+#ifndef JOBID_HPP_
+#define JOBID_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "boost/serialization/access.hpp"
+
+#include "types.hpp"
+
+/** Class simply contains an Id along with getter and setter,
+ *
+ */
+class JobId
+{
+public:
+  JobId();
+  JobId(const JobId_t id);
+  ~JobId();
+
+  const JobId_t getId() const;
+
+protected:
+  void setId(const JobId_t id);
+
+private:
+  friend class boost::serialization::access;
+  // serialization
+  template <typename Archive>
+  void serialize(Archive& ar, const unsigned int version)
+  {
+    ar & id;
+  }
+
+private:
+  //!> unique id of this job (used for the temporary filename) and associating result
+  JobId_t id;
+};
+
+#endif /* JOBID_HPP_ */
Index: src/Fragmentation/Automation/Makefile.am
===================================================================
--- src/Fragmentation/Automation/Makefile.am	(revision b5ebb569dab339861535e482277051aeb3f8943a)
+++ src/Fragmentation/Automation/Makefile.am	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
@@ -13,17 +13,35 @@
 AM_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS}
 
-INCLUDES = -I$(top_srcdir)/src/unittests -I$(top_srcdir)/src/Actions -I$(top_srcdir)/src/UIElements -I$(top_srcdir)/LinearAlgebra/src
-
 bin_PROGRAMS += Server Worker
 
-Server_SOURCES = \
+SERVERSOURCE = \
   atexit.cpp \
+  FragmentJob.cpp \
+  FragmentScheduler.cpp \
+  JobId.cpp \
+  Server.cpp
+
+SERVERHEADER = \
   atexit.hpp \
   Connection.hpp \
+  FragmentJob.hpp \
+  FragmentScheduler.hpp \
+  JobId.hpp
+
+WORKERSOURCE = \
+  atexit.cpp \
   FragmentJob.cpp \
+  FragmentWorker.cpp \
+  JobId.cpp \
+  Worker.cpp
+
+WORKERHEADER = \
+  atexit.hpp \
+  Connection.hpp \
   FragmentJob.hpp \
-  FragmentScheduler.cpp \
-  FragmentScheduler.hpp \
-  Server.cpp
+  FragmentWorker.hpp \
+  JobId.hpp
+
+Server_SOURCES = $(SERVERSOURCE) $(SERVERHEADER)
 Server_LDFLAGS = $(AM_LDFLAGS) $(BOOST_ASIO_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS)
 Server_CXXFLAGS = $(AM_CPPFLAGS)
@@ -35,13 +53,5 @@
   ${CodePatterns_LIBS}
 
-Worker_SOURCES = \
-  atexit.cpp \
-  atexit.hpp \
-  Connection.hpp \
-  FragmentJob.cpp \
-  FragmentJob.hpp \
-  FragmentWorker.cpp \
-  FragmentWorker.hpp \
-  Worker.cpp
+Worker_SOURCES = $(WORKERSOURCE) $(WORKERHEADER)
 Worker_LDFLAGS = $(AM_LDFLAGS) $(BOOST_ASIO_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS)
 Worker_CXXFLAGS = $(AM_CPPFLAGS)
Index: src/Fragmentation/Automation/unittests/Makefile.am
===================================================================
--- src/Fragmentation/Automation/unittests/Makefile.am	(revision b5ebb569dab339861535e482277051aeb3f8943a)
+++ src/Fragmentation/Automation/unittests/Makefile.am	(revision b05673868c5ee97ab3b5a5b15c41567fc0659845)
@@ -17,4 +17,5 @@
 
 FRAGMENTATIONAUTOMATIONLIBS = \
+  $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) \
   $(BOOST_THREAD_LDFLAGS) $(BOOST_THREAD_LIBS) \
   ${CodePatterns_LIBS}
@@ -30,5 +31,7 @@
   FragmentQueue.hpp \
   FragmentResult.cpp \
-  FragmentResult.hpp
+  FragmentResult.hpp \
+  JobId.cpp \
+  JobId.hpp
 FragmentQueueUnitTest_LDADD = $(FRAGMENTATIONAUTOMATIONLIBS)
 
