Index: src/Fragmentation/Automation/FragmentScheduler.cpp
===================================================================
--- src/Fragmentation/Automation/FragmentScheduler.cpp	(revision 95b38499d61ebcaaaadab3c032f11c4cd7cff89c)
+++ src/Fragmentation/Automation/FragmentScheduler.cpp	(revision 8036b77b383d40bbb7e818ed0a8809eba5794745)
@@ -40,5 +40,5 @@
 #include "FragmentScheduler.hpp"
 
-FragmentJob::ptr FragmentScheduler::NoJob(new SystemCommandJob(std::string("/bin/true"), std::string("dosomething"), JobId::NoJob));
+FragmentJob::ptr FragmentScheduler::WorkerListener_t::NoJob(new SystemCommandJob(std::string("/bin/true"), std::string("dosomething"), JobId::NoJob));
 
 /** Helper function to enforce binding of FragmentWorker to possible derived
@@ -59,15 +59,7 @@
  */
 FragmentScheduler::FragmentScheduler(boost::asio::io_service& io_service, unsigned short workerport, unsigned short controllerport) :
-  worker_acceptor_(io_service,
-      boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), workerport)
-  ),
-  controller_acceptor_(io_service,
-      boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), controllerport)
-  ),
-  result( new FragmentResult(JobId::NoJob) ),
-  jobInfo((size_t)2, 0),
-  choice(NoOperation),
-  globalId(0),
-  Exitflag(OkFlag)
+    WorkerListener(io_service, workerport, JobsQueue),
+    ControllerListener(io_service, controllerport, JobsQueue,
+        boost::bind(&Listener::initiateSocket, boost::ref(WorkerListener)))
 {
   Info info(__FUNCTION__);
@@ -75,36 +67,9 @@
   // only initiate socket if jobs are already present
   if (JobsQueue.isJobPresent()) {
-    LOG(1, "Listening for workers on port " << workerport << ".");
-    initiateWorkerSocket();
-  }
-
-  initiateControllerSocket();
-  LOG(1, "Listening for controller on port " << controllerport << ".");
-}
-
-/** Internal function to start worker connection.
- *
- */
-void FragmentScheduler::initiateWorkerSocket()
-{
-  // Start an accept operation for worker connections.
-  connection_ptr new_conn(new Connection(worker_acceptor_.get_io_service()));
-  worker_acceptor_.async_accept(new_conn->socket(),
-    boost::bind(&FragmentScheduler::handle_AcceptWorker, this,
-      boost::asio::placeholders::error, new_conn));
-}
-
-/** Internal function to start controller connection.
- *
- */
-void FragmentScheduler::initiateControllerSocket()
-{
-  // Start an accept operation for controller connection.
-  connection_ptr new_conn(new Connection(controller_acceptor_.get_io_service()));
-  controller_acceptor_.async_accept(new_conn->socket(),
-    boost::bind(&FragmentScheduler::handle_AcceptController, this,
-      boost::asio::placeholders::error, new_conn));
-}
-
+    WorkerListener.initiateSocket();
+  }
+
+  ControllerListener.initiateSocket();
+}
 
 /** Handle a new worker connection.
@@ -117,5 +82,5 @@
  * \param conn reference with the connection
  */
-void FragmentScheduler::handle_AcceptWorker(const boost::system::error_code& e, connection_ptr conn)
+void FragmentScheduler::WorkerListener_t::handle_Accept(const boost::system::error_code& e, connection_ptr conn)
 {
   Info info(__FUNCTION__);
@@ -131,5 +96,5 @@
       LOG(1, "INFO: Sending job #" << job->getId() << ".");
       conn->async_write(job,
-        boost::bind(&FragmentScheduler::handle_SendJobtoWorker, this,
+        boost::bind(&FragmentScheduler::WorkerListener_t::handle_SendJobtoWorker, this,
         boost::asio::placeholders::error, conn));
 
@@ -137,5 +102,5 @@
       // send the static NoJob
       conn->async_write(NoJob,
-        boost::bind(&FragmentScheduler::handle_SendJobtoWorker, this,
+        boost::bind(&FragmentScheduler::WorkerListener_t::handle_SendJobtoWorker, this,
         boost::asio::placeholders::error, conn));
 
@@ -150,5 +115,5 @@
     // accept operation the io_service will run out of work to do and the
     // server will exit.
-    Exitflag = WorkerErrorFlag;
+    Exitflag = ErrorFlag;
     ELOG(0, e.message());
   }
@@ -157,5 +122,5 @@
     // Start an accept operation for a new Connection only when there
     // are still jobs present
-    initiateWorkerSocket();
+    initiateSocket();
   }
 }
@@ -170,5 +135,5 @@
  * \param conn reference with the connection
  */
-void FragmentScheduler::handle_SendJobtoWorker(const boost::system::error_code& e, connection_ptr conn)
+void FragmentScheduler::WorkerListener_t::handle_SendJobtoWorker(const boost::system::error_code& e, connection_ptr conn)
 {
     Info info(__FUNCTION__);
@@ -177,5 +142,5 @@
     LOG(1, "INFO: Receiving result for a job ...");
     conn->async_read(result,
-      boost::bind(&FragmentScheduler::handle_ReceiveResultFromWorker, this,
+      boost::bind(&FragmentScheduler::WorkerListener_t::handle_ReceiveResultFromWorker, this,
       boost::asio::placeholders::error, conn));
 }
@@ -186,5 +151,5 @@
  * \param conn reference with the connection
  */
-void FragmentScheduler::handle_ReceiveResultFromWorker(const boost::system::error_code& e, connection_ptr conn)
+void FragmentScheduler::WorkerListener_t::handle_ReceiveResultFromWorker(const boost::system::error_code& e, connection_ptr conn)
 {
   Info info(__FUNCTION__);
@@ -212,5 +177,5 @@
  * \param conn reference with the connection
  */
-void FragmentScheduler::handle_AcceptController(const boost::system::error_code& e, connection_ptr conn)
+void FragmentScheduler::ControllerListener_t::handle_Accept(const boost::system::error_code& e, connection_ptr conn)
 {
   Info info(__FUNCTION__);
@@ -218,5 +183,5 @@
   {
     conn->async_read(choice,
-      boost::bind(&FragmentScheduler::handle_ReadChoice, this,
+      boost::bind(&FragmentScheduler::ControllerListener_t::handle_ReadChoice, this,
       boost::asio::placeholders::error, conn));
   }
@@ -226,5 +191,5 @@
     // accept operation the io_service will run out of work to do and the
     // server will exit.
-    Exitflag = ControllerErrorFlag;
+    Exitflag = ErrorFlag;
     ELOG(0, e.message());
   }
@@ -236,5 +201,5 @@
  * \param conn reference with the connection
  */
-void FragmentScheduler::handle_ReadChoice(const boost::system::error_code& e, connection_ptr conn)
+void FragmentScheduler::ControllerListener_t::handle_ReadChoice(const boost::system::error_code& e, connection_ptr conn)
 {
   Info info(__FUNCTION__);
@@ -255,5 +220,5 @@
       LOG(1, "INFO: Sending next available job id " << nextid << " to controller ...");
       conn->async_write(nextid,
-        boost::bind(&FragmentScheduler::handle_GetNextJobIdState, this,
+        boost::bind(&FragmentScheduler::ControllerListener_t::handle_GetNextJobIdState, this,
         boost::asio::placeholders::error, conn));
       break;
@@ -265,5 +230,5 @@
       LOG(1, "INFO: Receiving bunch of jobs from a controller ...");
       conn->async_read(jobs,
-        boost::bind(&FragmentScheduler::handle_ReceiveJobs, this,
+        boost::bind(&FragmentScheduler::ControllerListener_t::handle_ReceiveJobs, this,
         boost::asio::placeholders::error, conn));
       break;
@@ -277,5 +242,5 @@
       LOG(1, "INFO: Sending state that "+toString(jobInfo[0])+" jobs are present and "+toString(jobInfo[1])+" jobs are done to controller ...");
       conn->async_write(jobInfo,
-        boost::bind(&FragmentScheduler::handle_CheckResultState, this,
+        boost::bind(&FragmentScheduler::ControllerListener_t::handle_CheckResultState, this,
         boost::asio::placeholders::error, conn));
       break;
@@ -287,5 +252,5 @@
       LOG(1, "INFO: Sending "+toString(results.size())+" results to controller ...");
       conn->async_write(results,
-        boost::bind(&FragmentScheduler::handle_SendResults, this,
+        boost::bind(&FragmentScheduler::ControllerListener_t::handle_SendResults, this,
         boost::asio::placeholders::error, conn));
       break;
@@ -297,5 +262,5 @@
     }
     default:
-      Exitflag = ControllerErrorFlag;
+      Exitflag = ErrorFlag;
       ELOG(1, "FragmentScheduler::handle_ReadChoice() - called with no valid choice.");
       break;
@@ -307,5 +272,5 @@
       LOG(1, "Launching new acceptor on socket.");
       // Start an accept operation for a new Connection.
-      initiateControllerSocket();
+      initiateSocket();
     }
   }
@@ -315,5 +280,5 @@
     // accept operation the io_service will run out of work to do and the
     // server will exit.
-    Exitflag = ControllerErrorFlag;
+    Exitflag = ErrorFlag;
     ELOG(0, e.message());
   }
@@ -329,8 +294,8 @@
  * \param conn reference with the connection
  */
-void FragmentScheduler::handle_ReceiveJobs(const boost::system::error_code& e, connection_ptr conn)
-{
-  Info info(__FUNCTION__);
-  bool initiateSocket = !JobsQueue.isJobPresent();
+void FragmentScheduler::ControllerListener_t::handle_ReceiveJobs(const boost::system::error_code& e, connection_ptr conn)
+{
+  Info info(__FUNCTION__);
+  bool need_initiateSocket = !JobsQueue.isJobPresent();
 
   // jobs are received, hence place in JobsQueue
@@ -338,11 +303,11 @@
     LOG(1, "INFO: Pushing " << jobs.size() << " jobs into queue.");
     JobsQueue.pushJobs(jobs);
-    // initiate socket if we had no jobs before
-    if (initiateSocket)
-      initiateWorkerSocket();
   }
 
   jobs.clear();
 
+  // initiate socket if we had no jobs before
+  if (need_initiateSocket)
+    initiateWorkerSocket();
 }
 
@@ -352,5 +317,5 @@
  * \param conn reference with the connection
  */
-void FragmentScheduler::handle_CheckResultState(const boost::system::error_code& e, connection_ptr conn)
+void FragmentScheduler::ControllerListener_t::handle_CheckResultState(const boost::system::error_code& e, connection_ptr conn)
 {
   Info info(__FUNCTION__);
@@ -364,5 +329,5 @@
  * \param conn reference with the connection
  */
-void FragmentScheduler::handle_GetNextJobIdState(const boost::system::error_code& e, connection_ptr conn)
+void FragmentScheduler::ControllerListener_t::handle_GetNextJobIdState(const boost::system::error_code& e, connection_ptr conn)
 {
   Info info(__FUNCTION__);
@@ -376,5 +341,5 @@
  * \param conn reference with the connection
  */
-void FragmentScheduler::handle_SendResults(const boost::system::error_code& e, connection_ptr conn)
+void FragmentScheduler::ControllerListener_t::handle_SendResults(const boost::system::error_code& e, connection_ptr conn)
 {
   Info info(__FUNCTION__);
Index: src/Fragmentation/Automation/FragmentScheduler.hpp
===================================================================
--- src/Fragmentation/Automation/FragmentScheduler.hpp	(revision 95b38499d61ebcaaaadab3c032f11c4cd7cff89c)
+++ src/Fragmentation/Automation/FragmentScheduler.hpp	(revision 8036b77b383d40bbb7e818ed0a8809eba5794745)
@@ -16,4 +16,5 @@
 #include <vector>
 #include <boost/asio.hpp>
+#include <boost/function.hpp>
 
 #include "Connection.hpp"
@@ -22,8 +23,10 @@
 #include "GlobalJobId.hpp"
 #include "Jobs/FragmentJob.hpp"
+#include "Listener.hpp"
 #include "Results/FragmentResult.hpp"
 #include "types.hpp"
 
-/** FragmentScheduler serves FragmentJobs to Workers.
+/** FragmentScheduler serves FragmentJobs to Workers and accepts commands from
+ * a Controller.
  *
  */
@@ -35,11 +38,106 @@
   FragmentScheduler(boost::asio::io_service& io_service, unsigned short workerport, unsigned short controllerport);
 
-  enum Exitflag_t{
-    OkFlag = 0,
-    QueueError = 128,
-    ControllerErrorFlag = 254,
-    WorkerErrorFlag = 255
+private:
+  class WorkerListener_t : public Listener
+  {
+  public:
+    WorkerListener_t(
+        boost::asio::io_service& io_service,
+        unsigned short port,
+        FragmentQueue &_JobsQueue) :
+      Listener(io_service, port),
+      JobsQueue(_JobsQueue),
+      result( new FragmentResult(JobId::NoJob) )
+    {}
+    virtual ~WorkerListener_t() {}
+
+  protected:
+    /// Handle completion of a accept worker operation.
+    void handle_Accept(const boost::system::error_code& e, connection_ptr conn);
+
+    /// Worker callback function when job has been sent.
+    void handle_SendJobtoWorker(const boost::system::error_code& e, connection_ptr conn);
+
+    /// Worker callback function when result has been received.
+    void handle_ReceiveResultFromWorker(const boost::system::error_code& e, connection_ptr conn);
+  private:
+    //!> reference to external FragmentQueue containing jobs to work on
+    FragmentQueue & JobsQueue;
+
+    /// result that is received from the client.
+    FragmentResult::ptr result;
+
+    // static entity to indicate to clients that the queue is empty.
+    static FragmentJob::ptr NoJob;
   };
 
+  class ControllerListener_t : public Listener
+  {
+  public:
+    ControllerListener_t(
+        boost::asio::io_service& io_service,
+        unsigned short port,
+        FragmentQueue &_JobsQueue,
+        boost::function<void ()> _initiateWorkerSocket) :
+      Listener(io_service, port),
+      JobsQueue(_JobsQueue),
+      jobInfo((size_t)2, 0),
+      choice(NoOperation),
+      globalId(0),
+      initiateWorkerSocket(_initiateWorkerSocket)
+    {}
+    virtual ~ControllerListener_t() {}
+
+  protected:
+    /// Handle completion of a accept controller operation.
+    void handle_Accept(const boost::system::error_code& e, connection_ptr conn);
+
+    /// Handle completion of controller operation to read choice
+    void handle_ReadChoice(const boost::system::error_code& e, connection_ptr conn);
+
+    /// Controller callback function when job has been sent.
+    void handle_ReceiveJobs(const boost::system::error_code& e, connection_ptr conn);
+
+    /// Controller callback function when checking on state of results.
+    void handle_CheckResultState(const boost::system::error_code& e, connection_ptr conn);
+
+    /// Controller callback function when checking on state of results.
+    void handle_GetNextJobIdState(const boost::system::error_code& e, connection_ptr conn);
+
+    /// Controller callback function when result has been received.
+    void handle_SendResults(const boost::system::error_code& e, connection_ptr conn);
+
+  private:
+    //!> reference to external FragmentQueue containing jobs to work on
+    FragmentQueue & JobsQueue;
+
+    /// bunch of jobs received from controller before placed in JobsQueue
+    std::vector<FragmentJob::ptr> jobs;
+
+    /// number of jobs that are waiting to be and are calculated, required for returning status
+    std::vector<size_t> jobInfo;
+
+    // choice
+    enum ControllerChoices choice;
+
+    // TODO: replace this instance by a IdPool.
+    //!> global id to give next available job id
+    GlobalJobId globalId;
+
+    //!> callback function to tell that worker socket should be enabled
+    boost::function<void ()> initiateWorkerSocket;
+  };
+
+private:
+  //!> Listener instance that waits for a worker
+  WorkerListener_t  WorkerListener;
+
+  //!> Listener instance that waits for a controller
+  ControllerListener_t  ControllerListener;
+
+  /// Queue with data to be sent to each client.
+  FragmentQueue JobsQueue;
+
+public:
   /** Getter for Exitflag.
    *
@@ -48,74 +146,11 @@
   size_t getExitflag() const
   {
-    return Exitflag;
+    if (WorkerListener.getExitflag() != 0)
+      return WorkerListener.getExitflag();
+    if (ControllerListener.getExitflag() != 0)
+      return ControllerListener.getExitflag();
+    return 0;
   }
 
-protected:
-  /// Handle completion of a accept worker operation.
-  void handle_AcceptWorker(const boost::system::error_code& e, connection_ptr conn);
-
-  /// Handle completion of a accept controller operation.
-  void handle_AcceptController(const boost::system::error_code& e, connection_ptr conn);
-
-  /// Handle completion of controller operation to read choice
-  void handle_ReadChoice(const boost::system::error_code& e, connection_ptr conn);
-
-  /// Worker callback function when job has been sent.
-  void handle_SendJobtoWorker(const boost::system::error_code& e, connection_ptr conn);
-
-  /// Worker callback function when result has been received.
-  void handle_ReceiveResultFromWorker(const boost::system::error_code& e, connection_ptr conn);
-
-  /// Controller callback function when job has been sent.
-  void handle_ReceiveJobs(const boost::system::error_code& e, connection_ptr conn);
-
-private:
-
-  /// Controller callback function when checking on state of results.
-  void handle_CheckResultState(const boost::system::error_code& e, connection_ptr conn);
-
-  /// Controller callback function when checking on state of results.
-  void handle_GetNextJobIdState(const boost::system::error_code& e, connection_ptr conn);
-
-  /// Controller callback function when result has been received.
-  void handle_SendResults(const boost::system::error_code& e, connection_ptr conn);
-
-  /// internal function to prepare worker connections
-  void initiateWorkerSocket();
-
-  /// internal function to prepare controller connections
-  void initiateControllerSocket();
-
-private:
-  /// The acceptor object used to accept incoming worker socket connections.
-  boost::asio::ip::tcp::acceptor worker_acceptor_;
-
-  /// The acceptor object used to accept incoming controller socket connections.
-  boost::asio::ip::tcp::acceptor controller_acceptor_;
-
-  /// result that is received from the client.
-  FragmentResult::ptr result;
-
-  /// bunch of jobs received from controller before placed in JobsQueue
-  std::vector<FragmentJob::ptr> jobs;
-
-  /// number of jobs that are waiting to be and are calculated, required for returning status
-  std::vector<size_t> jobInfo;
-
-  // choice
-  enum ControllerChoices choice;
-
-  /// Queue with data to be sent to each client.
-  FragmentQueue JobsQueue;
-
-  // static entity to indicate to clients that the queue is empty.
-  static FragmentJob::ptr NoJob;
-
-  // TODO: replace this instance by a IdPool.
-  //!> global id to give next available job id
-  GlobalJobId globalId;
-
-  // Exit flag on program exit
-  enum Exitflag_t Exitflag;
 };
 
Index: src/Fragmentation/Automation/Listener.cpp
===================================================================
--- src/Fragmentation/Automation/Listener.cpp	(revision 8036b77b383d40bbb7e818ed0a8809eba5794745)
+++ src/Fragmentation/Automation/Listener.cpp	(revision 8036b77b383d40bbb7e818ed0a8809eba5794745)
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+
+/*
+ * Listener.cpp
+ *
+ *  Created on: 22.02.2012
+ *      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 "Listener.hpp"
+
+#include "CodePatterns/Log.hpp"
+
+/** Constructor for class Listener.
+ *
+ * @param io_service io service to obtain connections from
+ * @param port service or port number to listen on
+ */
+Listener::Listener(boost::asio::io_service& io_service, unsigned short port) :
+    Exitflag(OkFlag),
+    acceptor_(io_service,
+        boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), port)
+    )
+{
+  LOG(1, "Listening on port " << port << ".");
+}
+
+/** Destructor for class Listener.
+ *
+ */
+Listener::~Listener()
+{}
+
+/** Initialises the socket in a \a Connection for listening.
+ *
+ */
+void Listener::initiateSocket()
+{
+  // Start an accept operation for worker connections.
+  connection.reset(new Connection(acceptor_.get_io_service()));
+  acceptor_.async_accept(connection->socket(),
+    boost::bind(&Listener::handle_Accept, this,
+      boost::asio::placeholders::error, connection));
+}
+
+/** Initialises the socket in a \a Connection for listening.
+ *
+ */
+void Listener::closeSocket()
+{
+  boost::system::error_code errorcode;
+
+  if (connection->socket().is_open())
+  {
+    LOG(1, "INFO: Shutting socket down ...");
+    // Boost documentation recommends calling shutdown first
+    // for "graceful" closing of socket.
+    connection->socket().shutdown(boost::asio::ip::tcp::socket::shutdown_both, errorcode);
+    if (errorcode)
+    {
+      ELOG(1, "socket.shutdown error: " << errorcode.message());
+    }
+
+    LOG(1, "INFO: Closing socket ...");
+    connection->socket().close(errorcode);
+    if (errorcode)
+    {
+      ELOG(1, "socket.close error: " << errorcode.message());
+    }
+  } else {
+    LOG(1, "INFO: Socket is not open, no need to shut down.");
+  }
+}
+
Index: src/Fragmentation/Automation/Listener.hpp
===================================================================
--- src/Fragmentation/Automation/Listener.hpp	(revision 8036b77b383d40bbb7e818ed0a8809eba5794745)
+++ src/Fragmentation/Automation/Listener.hpp	(revision 8036b77b383d40bbb7e818ed0a8809eba5794745)
@@ -0,0 +1,80 @@
+/*
+ * Listener.hpp
+ *
+ *  Created on: 22.02.2012
+ *      Author: heber
+ */
+
+#ifndef LISTENER_HPP_
+#define LISTENER_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <boost/asio.hpp>
+
+#include "Connection.hpp"
+
+/** Class Listener implements a class listening on a given port for incoming
+ * connections.
+ *
+ * In order to use, inherit it and implement the virtual function handle_Accept().
+ * \code
+ *   class foo : public Listener {
+ *     ...
+ *     void handle_Accept(const boost::system::error_code& e, connection_ptr conn)
+ *     {
+ *       if (!e) {
+ *         conn->async_write(job,
+ *          boost::bind(&<functionpointer>,
+ *          boost::asio::placeholders::error, conn));
+ *      }
+ *       ...
+ *     }
+ *   };
+ * \endcode
+ * where async_write or async_read expect some bound function taking again
+ * the error and the connection as arguments (i.e. a cascade of handlers).
+ *
+ */
+class Listener
+{
+public:
+  Listener(boost::asio::io_service& io_service, unsigned short port);
+  ~Listener();
+
+  void initiateSocket();
+  void closeSocket();
+
+  enum Exitflag_t{
+    OkFlag = 0,
+    ErrorFlag = 255
+  };
+
+  /** Getter for Exitflag.
+   *
+   * @return Exitflag of operations
+   */
+  size_t getExitflag() const
+  {
+    return Exitflag;
+  }
+
+protected:
+  /// Handle completion for initially acceptig connection
+  virtual void handle_Accept(const boost::system::error_code& e, connection_ptr conn)=0;
+
+  // Exit flag on program exit
+  enum Exitflag_t Exitflag;
+
+private:
+  /// The acceptor object used to accept incoming worker socket connections.
+  boost::asio::ip::tcp::acceptor acceptor_;
+
+  //!> Connection object
+  connection_ptr connection;
+};
+
+#endif /* LISTENER_HPP_ */
Index: src/Fragmentation/Automation/Makefile.am
===================================================================
--- src/Fragmentation/Automation/Makefile.am	(revision 95b38499d61ebcaaaadab3c032f11c4cd7cff89c)
+++ src/Fragmentation/Automation/Makefile.am	(revision 8036b77b383d40bbb7e818ed0a8809eba5794745)
@@ -86,10 +86,12 @@
 
 SERVERSOURCE = \
-  FragmentScheduler.cpp
+  FragmentScheduler.cpp \
+  Listener.cpp
 
 SERVERHEADER = \
   Connection.hpp \
   ControllerChoices.hpp \
-  FragmentScheduler.hpp
+  FragmentScheduler.hpp \
+  Listener.hpp
 
 WORKERSOURCE = \
