Index: trunk/FACT++/src/StateMachineImp.cc
===================================================================
--- trunk/FACT++/src/StateMachineImp.cc	(revision 16695)
+++ trunk/FACT++/src/StateMachineImp.cc	(revision 16726)
@@ -122,5 +122,5 @@
 StateMachineImp::StateMachineImp(ostream &out, const std::string &name)
     : MessageImp(out), fName(name), fCurrentState(kSM_NotReady),
-    fRunning(false), fBufferEvents(true), fExitRequested(0)
+    fBufferEvents(true), fRunning(false), fExitRequested(0)
 {
     SetDefaultStateNames();
Index: trunk/FACT++/src/StateMachineImp.h
===================================================================
--- trunk/FACT++/src/StateMachineImp.h	(revision 16695)
+++ trunk/FACT++/src/StateMachineImp.h	(revision 16726)
@@ -49,10 +49,12 @@
     std::mutex fMutexEvt; /// Mutex to ensure thread-safe access to the command fifo
 
+    bool fBufferEvents;  /// Flag if events should be buffered outside the event loop
+
+protected:
     bool fRunning;       /// Machine is in main-loop
-    bool fBufferEvents;  /// Flag if events should be buffered outside the event loop
     int  fExitRequested; /// This is a flag which is set true if the main loop should stop
 
     /// Push a command into the fifo. The fifo takes over ownership
-    void PushEvent(Event *cmd);
+    virtual void PushEvent(Event *cmd);
     /// Pop a command from the fifo.
     std::shared_ptr<Event> PopEvent();
@@ -60,7 +62,5 @@
     bool HandleNewState(int newstate, const EventImp *evt, const char *txt);
 
-    virtual EventImp *CreateEvent(const std::string &name, const std::string &fmt) = 0;
-    virtual EventImp *CreateService(const std::string &);
-
+protected:
     /// Is called continously to execute actions in the current state
     virtual int Execute() { return fCurrentState; }
@@ -70,4 +70,8 @@
     //virtual int Transition(const Event &) { return kSM_FatalError; }
 
+private:
+    virtual EventImp *CreateEvent(const std::string &name, const std::string &fmt) = 0;
+    virtual EventImp *CreateService(const std::string &);
+
     virtual void Lock() { }
     virtual void UnLock() { }
@@ -116,9 +120,9 @@
 
     /// Start the mainloop
-    int Run(bool dummy);
+    virtual int Run(bool dummy);
     int Run() { return Run(false); }
 
     /// Request to stop the mainloop
-    void Stop(int code=0);
+    virtual void Stop(int code=0);
 
     /// Used to check if the main loop is already running or still running
