diff --git a/blobs-ipmid/blobs.hpp b/blobs-ipmid/blobs.hpp
index e75495b..ab0b567 100644
--- a/blobs-ipmid/blobs.hpp
+++ b/blobs-ipmid/blobs.hpp
@@ -91,7 +91,7 @@
      * @param[in,out] meta - a pointer to a blobmeta.
      * @return bool - true if it was successful.
      */
-    virtual bool stat(const std::string& path, struct BlobMeta* meta) = 0;
+    virtual bool stat(const std::string& path, BlobMeta* meta) = 0;
 
     /* The methods below are per session. */
 
@@ -163,7 +163,7 @@
      * @param[in,out] meta - pointer to update with the BlobMeta.
      * @return bool - wether it was successful.
      */
-    virtual bool stat(uint16_t session, struct BlobMeta* meta) = 0;
+    virtual bool stat(uint16_t session, BlobMeta* meta) = 0;
 
     /**
      * Attempt to expire a session.  This is called when a session has been
diff --git a/example/example.cpp b/example/example.cpp
index dd7c486..2ab0bd3 100644
--- a/example/example.cpp
+++ b/example/example.cpp
@@ -41,7 +41,7 @@
     return false;
 }
 
-bool ExampleBlobHandler::stat(const std::string& path, struct BlobMeta* meta)
+bool ExampleBlobHandler::stat(const std::string& path, BlobMeta* meta)
 {
     return false;
 }
@@ -149,7 +149,7 @@
     return true;
 }
 
-bool ExampleBlobHandler::stat(uint16_t session, struct BlobMeta* meta)
+bool ExampleBlobHandler::stat(uint16_t session, BlobMeta* meta)
 {
     ExampleBlob* sess = getSession(session);
     if (!sess)
diff --git a/example/example.hpp b/example/example.hpp
index 335eade..a53d6c0 100644
--- a/example/example.hpp
+++ b/example/example.hpp
@@ -66,7 +66,7 @@
     bool canHandleBlob(const std::string& path) override;
     std::vector<std::string> getBlobIds() override;
     bool deleteBlob(const std::string& path) override;
-    bool stat(const std::string& path, struct BlobMeta* meta) override;
+    bool stat(const std::string& path, BlobMeta* meta) override;
     bool open(uint16_t session, uint16_t flags,
               const std::string& path) override;
     std::vector<uint8_t> read(uint16_t session, uint32_t offset,
@@ -77,7 +77,7 @@
                    const std::vector<uint8_t>& data) override;
     bool commit(uint16_t session, const std::vector<uint8_t>& data) override;
     bool close(uint16_t session) override;
-    bool stat(uint16_t session, struct BlobMeta* meta) override;
+    bool stat(uint16_t session, BlobMeta* meta) override;
     bool expire(uint16_t session) override;
 
     constexpr static char supportedPath[] = "/dev/fake/command";
diff --git a/ipmi.cpp b/ipmi.cpp
index 92955f9..1613085 100644
--- a/ipmi.cpp
+++ b/ipmi.cpp
@@ -190,7 +190,7 @@
     return IPMI_CC_OK;
 }
 
-static ipmi_ret_t returnStatBlob(struct BlobMeta* meta, uint8_t* replyCmdBuf,
+static ipmi_ret_t returnStatBlob(BlobMeta* meta, uint8_t* replyCmdBuf,
                                  size_t* dataLen)
 {
     struct BmcBlobStatRx reply;
@@ -227,7 +227,7 @@
     }
 
     /* Attempt to stat. */
-    struct BlobMeta meta;
+    BlobMeta meta;
     if (!mgr->stat(path, &meta))
     {
         return IPMI_CC_UNSPECIFIED_ERROR;
@@ -244,7 +244,7 @@
     (*dataLen) = 0;
 
     /* Attempt to stat. */
-    struct BlobMeta meta;
+    BlobMeta meta;
 
     if (!mgr->stat(request.sessionId, &meta))
     {
diff --git a/manager.cpp b/manager.cpp
index 639ca2d..dcc223e 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -191,7 +191,7 @@
     return item->second.blobId;
 }
 
-bool BlobManager::stat(const std::string& path, struct BlobMeta* meta)
+bool BlobManager::stat(const std::string& path, BlobMeta* meta)
 {
     /* meta should never be NULL. */
     GenericBlobInterface* handler = getHandler(path);
@@ -205,7 +205,7 @@
     return handler->stat(path, meta);
 }
 
-bool BlobManager::stat(uint16_t session, struct BlobMeta* meta)
+bool BlobManager::stat(uint16_t session, BlobMeta* meta)
 {
     /* meta should never be NULL. */
     GenericBlobInterface* handler = getHandler(session);
diff --git a/manager.hpp b/manager.hpp
index 4caf4ea..7b169db 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -52,9 +52,9 @@
     virtual bool open(uint16_t flags, const std::string& path,
                       uint16_t* session) = 0;
 
-    virtual bool stat(const std::string& path, struct BlobMeta* meta) = 0;
+    virtual bool stat(const std::string& path, BlobMeta* meta) = 0;
 
-    virtual bool stat(uint16_t session, struct BlobMeta* meta) = 0;
+    virtual bool stat(uint16_t session, BlobMeta* meta) = 0;
 
     virtual bool commit(uint16_t session, const std::vector<uint8_t>& data) = 0;
 
@@ -135,7 +135,7 @@
      * @param[in,out] meta - a pointer to store the metadata.
      * @return bool - true if able to retrieve the information.
      */
-    bool stat(const std::string& path, struct BlobMeta* meta) override;
+    bool stat(const std::string& path, BlobMeta* meta) override;
 
     /**
      * Attempts to retrieve a BlobMeta for a given session.
@@ -144,7 +144,7 @@
      * @param[in,out] meta - a pointer to store the metadata.
      * @return bool - true if able to retrieve the information.
      */
-    bool stat(uint16_t session, struct BlobMeta* meta) override;
+    bool stat(uint16_t session, BlobMeta* meta) override;
 
     /**
      * Attempt to commit a blob for a given session.
diff --git a/test/blob_mock.hpp b/test/blob_mock.hpp
index b70d3d1..7ec7d15 100644
--- a/test/blob_mock.hpp
+++ b/test/blob_mock.hpp
@@ -15,7 +15,7 @@
     MOCK_METHOD1(canHandleBlob, bool(const std::string&));
     MOCK_METHOD0(getBlobIds, std::vector<std::string>());
     MOCK_METHOD1(deleteBlob, bool(const std::string&));
-    MOCK_METHOD2(stat, bool(const std::string&, struct BlobMeta*));
+    MOCK_METHOD2(stat, bool(const std::string&, BlobMeta*));
     MOCK_METHOD3(open, bool(uint16_t, uint16_t, const std::string&));
     MOCK_METHOD3(read, std::vector<uint8_t>(uint16_t, uint32_t, uint32_t));
     MOCK_METHOD3(write, bool(uint16_t, uint32_t, const std::vector<uint8_t>&));
@@ -23,7 +23,7 @@
                  bool(uint16_t, uint32_t, const std::vector<uint8_t>&));
     MOCK_METHOD2(commit, bool(uint16_t, const std::vector<uint8_t>&));
     MOCK_METHOD1(close, bool(uint16_t));
-    MOCK_METHOD2(stat, bool(uint16_t, struct BlobMeta*));
+    MOCK_METHOD2(stat, bool(uint16_t, BlobMeta*));
     MOCK_METHOD1(expire, bool(uint16_t));
 };
 } // namespace blobs
diff --git a/test/ipmi_sessionstat_unittest.cpp b/test/ipmi_sessionstat_unittest.cpp
index 875b6a8..2f407a1 100644
--- a/test/ipmi_sessionstat_unittest.cpp
+++ b/test/ipmi_sessionstat_unittest.cpp
@@ -33,8 +33,8 @@
 
     dataLen = sizeof(struct BmcBlobSessionStatTx);
 
-    EXPECT_CALL(mgr, stat(Matcher<uint16_t>(req->sessionId),
-                          Matcher<struct BlobMeta*>(_)))
+    EXPECT_CALL(mgr,
+                stat(Matcher<uint16_t>(req->sessionId), Matcher<BlobMeta*>(_)))
         .WillOnce(Return(false));
 
     EXPECT_EQ(IPMI_CC_UNSPECIFIED_ERROR,
@@ -63,8 +63,8 @@
     rep.metadataLen = 0x00;
 
     EXPECT_CALL(mgr, stat(Matcher<uint16_t>(req->sessionId),
-                          Matcher<struct BlobMeta*>(NotNull())))
-        .WillOnce(Invoke([&](uint16_t session, struct BlobMeta* meta) {
+                          Matcher<BlobMeta*>(NotNull())))
+        .WillOnce(Invoke([&](uint16_t session, BlobMeta* meta) {
             meta->blobState = rep.blobState;
             meta->size = rep.size;
             return true;
@@ -91,7 +91,7 @@
 
     dataLen = sizeof(struct BmcBlobSessionStatTx);
 
-    struct BlobMeta lmeta;
+    BlobMeta lmeta;
     lmeta.blobState = 0x01;
     lmeta.size = 0x100;
     lmeta.metadata.push_back(0x01);
@@ -106,8 +106,8 @@
     rep.metadataLen = lmeta.metadata.size();
 
     EXPECT_CALL(mgr, stat(Matcher<uint16_t>(req->sessionId),
-                          Matcher<struct BlobMeta*>(NotNull())))
-        .WillOnce(Invoke([&](uint16_t session, struct BlobMeta* meta) {
+                          Matcher<BlobMeta*>(NotNull())))
+        .WillOnce(Invoke([&](uint16_t session, BlobMeta* meta) {
             (*meta) = lmeta;
             return true;
         }));
diff --git a/test/ipmi_stat_unittest.cpp b/test/ipmi_stat_unittest.cpp
index b4f542d..5002e69 100644
--- a/test/ipmi_stat_unittest.cpp
+++ b/test/ipmi_stat_unittest.cpp
@@ -63,7 +63,7 @@
     dataLen = sizeof(struct BmcBlobStatTx) + blobId.length() + 1;
 
     EXPECT_CALL(mgr, stat(Matcher<const std::string&>(StrEq(blobId)),
-                          Matcher<struct BlobMeta*>(_)))
+                          Matcher<BlobMeta*>(_)))
         .WillOnce(Return(false));
 
     EXPECT_EQ(IPMI_CC_UNSPECIFIED_ERROR,
@@ -96,8 +96,8 @@
     rep.metadataLen = 0x00;
 
     EXPECT_CALL(mgr, stat(Matcher<const std::string&>(StrEq(blobId)),
-                          Matcher<struct BlobMeta*>(NotNull())))
-        .WillOnce(Invoke([&](const std::string& path, struct BlobMeta* meta) {
+                          Matcher<BlobMeta*>(NotNull())))
+        .WillOnce(Invoke([&](const std::string& path, BlobMeta* meta) {
             meta->blobState = rep.blobState;
             meta->size = rep.size;
             return true;
@@ -128,7 +128,7 @@
 
     dataLen = sizeof(struct BmcBlobStatTx) + blobId.length() + 1;
 
-    struct BlobMeta lmeta;
+    BlobMeta lmeta;
     lmeta.blobState = 0x01;
     lmeta.size = 0x100;
     lmeta.metadata.push_back(0x01);
@@ -143,8 +143,8 @@
     rep.metadataLen = lmeta.metadata.size();
 
     EXPECT_CALL(mgr, stat(Matcher<const std::string&>(StrEq(blobId)),
-                          Matcher<struct BlobMeta*>(NotNull())))
-        .WillOnce(Invoke([&](const std::string& path, struct BlobMeta* meta) {
+                          Matcher<BlobMeta*>(NotNull())))
+        .WillOnce(Invoke([&](const std::string& path, BlobMeta* meta) {
             (*meta) = lmeta;
             return true;
         }));
diff --git a/test/manager_mock.hpp b/test/manager_mock.hpp
index 73d4d07..bfb3348 100644
--- a/test/manager_mock.hpp
+++ b/test/manager_mock.hpp
@@ -20,8 +20,8 @@
     MOCK_METHOD0(buildBlobList, uint32_t());
     MOCK_METHOD1(getBlobId, std::string(uint32_t));
     MOCK_METHOD3(open, bool(uint16_t, const std::string&, uint16_t*));
-    MOCK_METHOD2(stat, bool(const std::string&, struct BlobMeta*));
-    MOCK_METHOD2(stat, bool(uint16_t, struct BlobMeta*));
+    MOCK_METHOD2(stat, bool(const std::string&, BlobMeta*));
+    MOCK_METHOD2(stat, bool(uint16_t, BlobMeta*));
     MOCK_METHOD2(commit, bool(uint16_t, const std::vector<uint8_t>&));
     MOCK_METHOD1(close, bool(uint16_t));
     MOCK_METHOD3(read, std::vector<uint8_t>(uint16_t, uint32_t, uint32_t));
diff --git a/test/manager_sessionstat_unittest.cpp b/test/manager_sessionstat_unittest.cpp
index 6ae27d3..015a079 100644
--- a/test/manager_sessionstat_unittest.cpp
+++ b/test/manager_sessionstat_unittest.cpp
@@ -14,7 +14,7 @@
     // Calling Stat on a session that doesn't exist should return false.
 
     BlobManager mgr;
-    struct BlobMeta meta;
+    BlobMeta meta;
     uint16_t sess = 1;
 
     EXPECT_FALSE(mgr.stat(sess, &meta));
@@ -36,7 +36,7 @@
     EXPECT_CALL(*m1ptr, open(_, flags, path)).WillOnce(Return(true));
     EXPECT_TRUE(mgr.open(flags, path, &sess));
 
-    struct BlobMeta meta;
+    BlobMeta meta;
     EXPECT_CALL(*m1ptr, stat(sess, &meta)).WillOnce(Return(false));
 
     EXPECT_FALSE(mgr.stat(sess, &meta));
@@ -58,7 +58,7 @@
     EXPECT_CALL(*m1ptr, open(_, flags, path)).WillOnce(Return(true));
     EXPECT_TRUE(mgr.open(flags, path, &sess));
 
-    struct BlobMeta meta;
+    BlobMeta meta;
     EXPECT_CALL(*m1ptr, stat(sess, &meta)).WillOnce(Return(true));
 
     EXPECT_TRUE(mgr.stat(sess, &meta));
diff --git a/test/manager_stat_unittest.cpp b/test/manager_stat_unittest.cpp
index a13a66d..4f66278 100644
--- a/test/manager_stat_unittest.cpp
+++ b/test/manager_stat_unittest.cpp
@@ -17,7 +17,7 @@
     auto m1ptr = m1.get();
     EXPECT_TRUE(mgr.registerHandler(std::move(m1)));
 
-    struct BlobMeta meta;
+    BlobMeta meta;
     std::string path = "/asdf/asdf";
     EXPECT_CALL(*m1ptr, canHandleBlob(path)).WillOnce(Return(false));
 
@@ -33,7 +33,7 @@
     auto m1ptr = m1.get();
     EXPECT_TRUE(mgr.registerHandler(std::move(m1)));
 
-    struct BlobMeta meta;
+    BlobMeta meta;
     std::string path = "/asdf/asdf";
     EXPECT_CALL(*m1ptr, canHandleBlob(path)).WillOnce(Return(true));
     EXPECT_CALL(*m1ptr, stat(path, &meta)).WillOnce(Return(false));
@@ -50,7 +50,7 @@
     auto m1ptr = m1.get();
     EXPECT_TRUE(mgr.registerHandler(std::move(m1)));
 
-    struct BlobMeta meta;
+    BlobMeta meta;
     std::string path = "/asdf/asdf";
     EXPECT_CALL(*m1ptr, canHandleBlob(path)).WillOnce(Return(true));
     EXPECT_CALL(*m1ptr, stat(path, &meta)).WillOnce(Return(true));
