diff --git a/src/file-state.hpp b/src/file-state.hpp
index 1eff885..e074794 100644
--- a/src/file-state.hpp
+++ b/src/file-state.hpp
@@ -27,35 +27,35 @@
 #include "file-item.pb.hpp"
 #include "hash-helper.hpp"
 
-#include <boost/tuple/tuple.hpp>
 #include <boost/exception/all.hpp>
+#include <boost/tuple/tuple.hpp>
 
 #include <list>
 
 typedef std::list<FileItem> FileItems;
-typedef boost::shared_ptr<FileItem>  FileItemPtr;
+typedef boost::shared_ptr<FileItem> FileItemPtr;
 typedef boost::shared_ptr<FileItems> FileItemsPtr;
 
 
 class FileState : public DbHelper
 {
 public:
-  FileState (const boost::filesystem::path &path, bool cow = false);
-  ~FileState ();
+  FileState(const boost::filesystem::path& path);
+  ~FileState();
 
   /**
    * @brief Update or add a file
    */
   void
-  UpdateFile (const std::string &filename, sqlite3_int64 version,
-              const Hash &hash, const Ndnx::NdnxCharbuf &device_name, sqlite3_int64 seqno,
-              time_t atime, time_t mtime, time_t ctime, int mode, int seg_num);
+  UpdateFile(const std::string& filename, sqlite3_int64 version, const Hash& hash,
+             const Ccnx::CcnxCharbuf& device_name, sqlite3_int64 seqno, time_t atime, time_t mtime,
+             time_t ctime, int mode, int seg_num);
 
   /**
    * @brief Delete file
    */
   void
-  DeleteFile (const std::string &filename);
+  DeleteFile(const std::string& filename);
 
   /**
    * @brief Set "complete" flag
@@ -63,49 +63,53 @@
    * The call will do nothing if FileState does not have a record for the file (e.g., file got subsequently deleted)
    */
   void
-  SetFileComplete (const std::string &filename);
+  SetFileComplete(const std::string& filename);
 
   /**
    * @brief Lookup file state using file name
    */
   FileItemPtr
-  LookupFile (const std::string &filename) ;
+  LookupFile(const std::string& filename);
 
   /**
    * @brief Lookup file state using content hash (multiple items may be returned)
    */
   FileItemsPtr
-  LookupFilesForHash (const Hash &hash);
+  LookupFilesForHash(const Hash& hash);
 
   /**
    * @brief Lookup all files in the specified folder and call visitor(file) for each file
    */
   void
-  LookupFilesInFolder (const boost::function<void (const FileItem&)> &visitor, const std::string &folder, int offset=0, int limit=-1);
+  LookupFilesInFolder(const boost::function<void(const FileItem&)>& visitor,
+                      const std::string& folder, int offset = 0, int limit = -1);
 
   /**
    * @brief Lookup all files in the specified folder (wrapper around the overloaded version)
    */
   FileItemsPtr
-  LookupFilesInFolder (const std::string &folder, int offset=0, int limit=-1);
+  LookupFilesInFolder(const std::string& folder, int offset = 0, int limit = -1);
 
   /**
    * @brief Recursively lookup all files in the specified folder and call visitor(file) for each file
    */
   bool
-  LookupFilesInFolderRecursively (const boost::function<void (const FileItem&)> &visitor, const std::string &folder, int offset=0, int limit=-1);
+  LookupFilesInFolderRecursively(const boost::function<void(const FileItem&)>& visitor,
+                                 const std::string& folder, int offset = 0, int limit = -1);
 
   /**
    * @brief Recursively lookup all files in the specified folder (wrapper around the overloaded version)
    */
   FileItemsPtr
-  LookupFilesInFolderRecursively (const std::string &folder, int offset=0, int limit=-1);
+  LookupFilesInFolderRecursively(const std::string& folder, int offset = 0, int limit = -1);
 };
 
 typedef boost::shared_ptr<FileState> FileStatePtr;
 
 namespace Error {
-struct FileState : virtual boost::exception, virtual std::exception { };
+struct FileState : virtual boost::exception, virtual std::exception
+{
+};
 }
 
 
