diff --git a/src/storage/repo-storage.cpp b/src/storage/repo-storage.cpp
index 49873d7..1828eb9 100644
--- a/src/storage/repo-storage.cpp
+++ b/src/storage/repo-storage.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
@@ -18,7 +18,8 @@
  */
 
 #include "repo-storage.hpp"
-#include "../../build/src/config.hpp"
+#include "config.hpp"
+
 #include <istream>
 
 namespace repo {
diff --git a/src/storage/sqlite-storage.cpp b/src/storage/sqlite-storage.cpp
index 35fa642..42739c3 100644
--- a/src/storage/sqlite-storage.cpp
+++ b/src/storage/sqlite-storage.cpp
@@ -18,7 +18,7 @@
  */
 
 #include "sqlite-storage.hpp"
-#include "../../build/src/config.hpp"
+#include "config.hpp"
 #include "index.hpp"
 
 #include <ndn-cxx/util/sha256.hpp>
@@ -103,16 +103,16 @@
     if (rc == SQLITE_ROW) {
 
       ItemMeta item;
-      item.fullName.wireDecode(Block(sqlite3_column_blob(m_stmt, 1),
+      item.fullName.wireDecode(Block(reinterpret_cast<const uint8_t*>(sqlite3_column_blob(m_stmt, 1)),
                                      sqlite3_column_bytes(m_stmt, 1)));
       item.id = sqlite3_column_int(m_stmt, 0);
-      item.keyLocatorHash = make_shared<const ndn::Buffer>
-        (ndn::Buffer(sqlite3_column_blob(m_stmt, 3), sqlite3_column_bytes(m_stmt, 3)));
+      item.keyLocatorHash = make_shared<const ndn::Buffer>(sqlite3_column_blob(m_stmt, 3),
+                                                           sqlite3_column_bytes(m_stmt, 3));
 
       try {
         f(item);
       }
-      catch (...){
+      catch (...) {
         sqlite3_finalize(m_stmt);
         throw;
       }
@@ -176,7 +176,7 @@
   if (result == SQLITE_OK) {
     rc = sqlite3_step(insertStmt);
     if (rc == SQLITE_CONSTRAINT) {
-      std::cerr << "Insert  failed" << std::endl;
+      std::cerr << "Insert failed" << std::endl;
       sqlite3_finalize(insertStmt);
       BOOST_THROW_EXCEPTION(Error("Insert failed"));
      }
@@ -237,14 +237,14 @@
     if (sqlite3_bind_int64(queryStmt, 1, id) == SQLITE_OK) {
       rc = sqlite3_step(queryStmt);
       if (rc == SQLITE_ROW) {
-        shared_ptr<Data> data(new Data());
-        data->wireDecode(Block(sqlite3_column_blob(queryStmt, 2),
-                              sqlite3_column_bytes(queryStmt, 2)));
+        auto data = make_shared<Data>();
+        data->wireDecode(Block(reinterpret_cast<const uint8_t*>(sqlite3_column_blob(queryStmt, 2)),
+                               sqlite3_column_bytes(queryStmt, 2)));
         sqlite3_finalize(queryStmt);
         return data;
       }
       else if (rc == SQLITE_DONE) {
-        return shared_ptr<Data>();
+        return nullptr;
       }
       else {
         std::cerr << "Database query failure rc:" << rc << std::endl;
@@ -264,7 +264,7 @@
     std::cerr << "select statement prepared failed" << std::endl;
     BOOST_THROW_EXCEPTION(Error("select statement prepared failed"));
   }
-  return shared_ptr<Data>();
+  return nullptr;
 }
 
 int64_t
