diff --git a/model/sync-digest.h b/model/sync-digest.h
index d98868e..52072d2 100644
--- a/model/sync-digest.h
+++ b/model/sync-digest.h
@@ -61,12 +61,18 @@
   /**
    * @brief Obtain a short version of the hash (just first sizeof(size_t) bytes
    *
-   * Side effect: Finalize will be called on `this'
+   * Side effect: finalize() will be called on `this'
    */
   std::size_t
   getHash ();
 
   /**
+   * @brief Finalize digest. All subsequent calls to "operator <<" will fire an exception
+   */
+  void
+  finalize ();
+
+  /**
    * @brief Compare two full digests
    *
    * Side effect: Finalize will be called on `this' and `digest'
@@ -107,12 +113,6 @@
   operator = (Digest &digest) { return *this; }
   
   /**
-   * @brief Finalize digest. All subsequent calls to "operator <<" will fire an exception
-   */
-  void
-  finalize ();
-
-  /**
    * @brief Add size bytes of buffer to the hash
    */
   void
diff --git a/model/sync-full-leaf.cc b/model/sync-full-leaf.cc
index f575056..ee1d3dc 100644
--- a/model/sync-full-leaf.cc
+++ b/model/sync-full-leaf.cc
@@ -37,7 +37,8 @@
 FullLeaf::updateDigest ()
 {
   m_digest.reset ();
-  m_digest << getInfo ().getDigest () << getSeq ().getDigest ();
+  m_digest << getInfo ().getDigest () << *getSeq ().getDigest ();
+  m_digest.finalize ();
 }
 
 // from Leaf
diff --git a/model/sync-leaf.h b/model/sync-leaf.h
index c5f4c20..037e4a5 100644
--- a/model/sync-leaf.h
+++ b/model/sync-leaf.h
@@ -41,7 +41,7 @@
    * @param seq  Initial sequence number of the pointer
    */
   Leaf (NameInfoConstPtr info, const SeqNo &seq);
-  virtual ~Leaf () = 0;
+  virtual ~Leaf ();
   
   /**
    * @brief Get name of the leaf
diff --git a/model/sync-seq-no.cc b/model/sync-seq-no.cc
new file mode 100644
index 0000000..31db4ae
--- /dev/null
+++ b/model/sync-seq-no.cc
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include "sync-seq-no.h"
+#include <boost/make_shared.hpp>
+
+using namespace boost;
+
+namespace Sync {
+
+DigestConstPtr
+SeqNo::getDigest () const
+{
+  DigestPtr digest = make_shared<Digest> ();
+  *digest << m_session << m_seq;
+  digest->finalize ();
+  return digest;
+}
+
+} // Sync
diff --git a/model/sync-seq-no.h b/model/sync-seq-no.h
index a6005af..354a1b6 100644
--- a/model/sync-seq-no.h
+++ b/model/sync-seq-no.h
@@ -29,14 +29,35 @@
 namespace Sync {
 
 /**
+ * @ingroup sync
  * @brief Sequence number abstraction
- *
- * 
  */
 class SeqNo
 {
 public:
   /**
+   * @brief Copy constructor
+   * @param seq sequence number object to copy from
+   */
+  SeqNo (const SeqNo &seq)
+  {
+    *this = seq;
+  }
+
+  /**
+   * @brief Assignment operator
+   * @param seq sequence number object to copy from
+   */
+  SeqNo &
+  operator = (const SeqNo &seq)
+  {
+    m_session = seq.m_session;
+    m_seq = seq.m_seq;
+
+    return *this;
+  }
+
+  /**
    * @brief Constructor with just sequence number. Session assumed to be zero
    * @param seq Sequence number
    */
@@ -55,7 +76,12 @@
     , m_seq (seq)
   { }
 
-  inline const Digest&
+  /**
+   * @brief Get sequence number digest
+   *
+   * Digest will be calculated every time it is requested
+   */
+  DigestConstPtr
   getDigest () const;
 
   /**
@@ -82,18 +108,17 @@
     return m_session == seq.m_session && m_seq == seq.m_seq;
   }
 
-  SeqNo &
-  operator = (const SeqNo &seq)
-  {
-    m_session = seq.m_session;
-    m_seq = seq.m_seq;
+  /**
+   * @brief Get session id
+   */
+  uint32_t getSession () const
+  { return m_session; }
 
-    return *this;
-  }
-  
-private:
-  inline void
-  updateDigest ();
+  /**
+   * @brief Get sequence number
+   */
+  uint32_t getSeq () const
+  { return m_seq; }
   
 private:
   /**
@@ -112,25 +137,8 @@
    * For now, wrapping sequence number after max to zero is not supported
    */
   uint32_t m_seq;
-
-  Digest m_digest;
 };
 
-
-void
-SeqNo::updateDigest ()
-{
-  m_digest.reset ();
-  m_digest << m_session << m_seq;
-}
-  
-const Digest&
-SeqNo::getDigest () const
-{
-  return m_digest;
-}
-
-
 } // Sync
 
 #endif // SYNC_SEQ_NO_H
