diff --git a/include/redfish_v1.hpp b/include/redfish_v1.hpp
index 243ddfb..1a5ee74 100644
--- a/include/redfish_v1.hpp
+++ b/include/redfish_v1.hpp
@@ -51,27 +51,6 @@
         res.end();
       });
 
-  CROW_ROUTE(app, "/redfish/v1/")
-      .methods(
-          "GET"_method)([&](const crow::request& req, crow::response& res) {
-        res.json_value = {
-            {"@odata.context", "/redfish/v1/$metadata#ServiceRoot.ServiceRoot"},
-            {"@odata.id", "/redfish/v1/"},
-            {"@odata.type", "#ServiceRoot.v1_1_1.ServiceRoot"},
-            {"Id", "RootService"},
-            {"Name", "Root Service"},
-            {"RedfishVersion", "1.1.0"},
-            {"Links",
-             {{"Sessions",
-               {{"@odata.id", "/redfish/v1/SessionService/Sessions/"}}}}}};
-
-        res.json_value["UUID"] =
-            app.template get_middleware<PersistentData::Middleware>()
-                .system_uuid;
-        get_redfish_sub_routes(app, "/redfish/v1/", res.json_value);
-        res.end();
-      });
-
   CROW_ROUTE(app, "/redfish/v1/Chassis/")
       .methods("GET"_method)(
           [&](const crow::request& req, crow::response& res) {
diff --git a/redfish-core/include/node.hpp b/redfish-core/include/node.hpp
index 46b37d9..70b85222 100644
--- a/redfish-core/include/node.hpp
+++ b/redfish-core/include/node.hpp
@@ -15,9 +15,9 @@
 */
 #pragma once
 
-#include "crow.h"
 #include "privileges.hpp"
 #include "token_authorization_middleware.hpp"
+#include "crow.h"
 
 namespace redfish {
 
@@ -31,7 +31,6 @@
   Node(CrowApp& app, PrivilegeProvider& provider, std::string odataType,
        std::string odataId, Params... params)
       : odataType(odataType), odataId(odataId) {
-
     // privileges for the node as defined in the privileges_registry.json
     entityPrivileges = provider.getPrivileges(odataId, odataType);
 
@@ -111,5 +110,24 @@
   EntityPrivileges entityPrivileges;
 };
 
+template <typename CrowApp>
+void getRedfishSubRoutes(CrowApp& app, const std::string& url,
+                         nlohmann::json& j) {
+  std::vector<const std::string*> routes = app.get_routes(url);
+
+  for (auto route : routes) {
+    auto redfishSubRoute =
+        route->substr(url.size(), route->size() - url.size() - 1);
+
+    // Exclude: - exact matches,
+    //          - metadata urls starting with "$",
+    //          - urls at the same level
+    if (!redfishSubRoute.empty() && redfishSubRoute[0] != '$' &&
+        redfishSubRoute.find('/') == std::string::npos) {
+      j[redfishSubRoute] = nlohmann::json{{"@odata.id", *route}};
+    }
+  }
+}
+
 }  // namespace redfish
 
diff --git a/redfish-core/include/privileges.hpp b/redfish-core/include/privileges.hpp
index 43c48c2..290c0eb 100644
--- a/redfish-core/include/privileges.hpp
+++ b/redfish-core/include/privileges.hpp
@@ -54,8 +54,8 @@
     // load privilege_registry.json to memory
   }
 
-  EntityPrivileges getPrivileges(const std::string &entity_url,
-                                 const std::string &entity_type) const {
+  EntityPrivileges getPrivileges(const std::string& entity_url,
+                                 const std::string& entity_type) const {
     // return an entity privilege object based on the privilege_registry.json,
     // currently returning default constructed object
     return EntityPrivileges();
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
new file mode 100644
index 0000000..c4b765c
--- /dev/null
+++ b/redfish-core/include/redfish.hpp
@@ -0,0 +1,43 @@
+/*
+// Copyright (c) 2018 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+*/
+#pragma once
+
+#include "../lib/service_root.hpp"
+
+namespace redfish {
+/*
+ * @brief Top level class installing and providing Redfish services
+ */
+class RedfishService {
+ public:
+  /*
+   * @brief Redfish service constructor
+   *
+   * Loads Redfish configuration and installs schema resources
+   *
+   * @param[in] app   Crow app on which Redfish will initialize
+   */
+  template <typename CrowApp>
+  RedfishService(CrowApp& app) {
+    auto privilegeProvider = PrivilegeProvider();
+    serviceRootPtr = std::make_unique<ServiceRoot>(app, privilegeProvider);
+  }
+
+ private:
+  std::unique_ptr<ServiceRoot> serviceRootPtr;
+};
+
+}  // namespace redfish
diff --git a/redfish-core/lib/service_root.hpp b/redfish-core/lib/service_root.hpp
new file mode 100644
index 0000000..55015e4
--- /dev/null
+++ b/redfish-core/lib/service_root.hpp
@@ -0,0 +1,53 @@
+/*
+// Copyright (c) 2018 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+*/
+#pragma once
+
+#include "node.hpp"
+
+namespace redfish {
+
+class ServiceRoot : public Node {
+ public:
+  template <typename CrowApp, typename PrivilegeProvider>
+  ServiceRoot(CrowApp& app, PrivilegeProvider& provider)
+      : Node(app, provider, "#ServiceRoot.v1_1_1.ServiceRoot", "/redfish/v1/") {
+    nodeJson["@odata.type"] = Node::odataType;
+    nodeJson["@odata.id"] = Node::odataId;
+    nodeJson["@odata.context"] =
+        "/redfish/v1/$metadata#ServiceRoot.ServiceRoot";
+    nodeJson["Id"] = "RootService";
+    nodeJson["Name"] = "Root Service";
+    nodeJson["RedfishVersion"] = "1.1.0";
+    nodeJson["Links"]["Sessions"] = {
+        {"@odata.id", "/redfish/v1/SessionService/Sessions/"}};
+    nodeJson["UUID"] =
+        app.template get_middleware<crow::PersistentData::Middleware>()
+            .system_uuid;
+    getRedfishSubRoutes(app, "/redfish/v1/", nodeJson);
+  }
+
+ private:
+  void doGet(crow::response& res, const crow::request& req,
+             const std::vector<std::string>& params) override {
+    res.add_header("Content-Type", "application/json");
+    res.body = nodeJson.dump();
+    res.end();
+  }
+
+  nlohmann::json nodeJson;
+};
+
+}  // namespace redfish
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index 9640ac3..8060f88 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -14,6 +14,7 @@
 #include <string>
 #include <crow/app.h>
 #include <boost/asio.hpp>
+#include "redfish.hpp"
 
 int main(int argc, char** argv) {
   auto io = std::make_shared<boost::asio::io_service>();
@@ -51,5 +52,7 @@
   crow::connections::system_bus =
       std::make_shared<dbus::connection>(*io, dbus::bus::system);
 
+  redfish::RedfishService redfish(app);
+
   app.run();
 }
