diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c33631b6858e629db963be7d142ae020c149470..b1c2ad3163bf8b7a066665160e51992a67b9a539 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,94 +24,94 @@ set (CMAKE_CXX_FLAGS "-DMSGPACK_DISABLE_LEGACY_NIL -DMSGPACK_DISABLE_LEGACY_CONV
 find_package (GnuTLS 3.1 REQUIRED)
 find_package (Msgpack 1.2 REQUIRED)
 if (OPENDHT_TOOLS)
-	find_package (Readline 6 REQUIRED)
+    find_package (Readline 6 REQUIRED)
 endif ()
 
 list (APPEND opendht_SOURCES
-	src/utils.cpp
-	src/infohash.cpp
-	src/crypto.cpp
-	src/default_types.cpp
-	src/node.cpp
-	src/value.cpp
-	src/dht.cpp
-	src/network_engine.cpp
-	src/securedht.cpp
-	src/dhtrunner.cpp
-	src/argon2/argon2.c
-	src/argon2/core.c
-	src/argon2/blake2/blake2b.c
-	src/argon2/thread.c
-	src/argon2/encoding.c
-	src/argon2/ref.c
+    src/utils.cpp
+    src/infohash.cpp
+    src/crypto.cpp
+    src/default_types.cpp
+    src/node.cpp
+    src/value.cpp
+    src/dht.cpp
+    src/network_engine.cpp
+    src/securedht.cpp
+    src/dhtrunner.cpp
+    src/argon2/argon2.c
+    src/argon2/core.c
+    src/argon2/blake2/blake2b.c
+    src/argon2/thread.c
+    src/argon2/encoding.c
+    src/argon2/ref.c
 )
 
 list (APPEND opendht_HEADERS
-	include/opendht/utils.h
-	include/opendht/rng.h
-	include/opendht/crypto.h
-	include/opendht/infohash.h
-	include/opendht/default_types.h
-	include/opendht/node.h
-	include/opendht/value.h
-	include/opendht/dht.h
-	include/opendht/network_engine.h
-	include/opendht/scheduler.h
-	include/opendht/securedht.h
-	include/opendht/log.h
-	include/opendht.h
+    include/opendht/utils.h
+    include/opendht/rng.h
+    include/opendht/crypto.h
+    include/opendht/infohash.h
+    include/opendht/default_types.h
+    include/opendht/node.h
+    include/opendht/value.h
+    include/opendht/dht.h
+    include/opendht/network_engine.h
+    include/opendht/scheduler.h
+    include/opendht/securedht.h
+    include/opendht/log.h
+    include/opendht.h
 )
 
 configure_file (
-	opendht.pc.in
-	opendht.pc
-	@ONLY
+    opendht.pc.in
+    opendht.pc
+    @ONLY
 )
 
 include_directories (
-	./
-	include/
-	include/opendht/
-	${CMAKE_CURRENT_BINARY_DIR}/include/
+    ./
+    include/
+    include/opendht/
+    ${CMAKE_CURRENT_BINARY_DIR}/include/
 )
 
 if (OPENDHT_DEBUG)
-	set(CMAKE_BUILD_TYPE Debug)
+    set(CMAKE_BUILD_TYPE Debug)
 else ()
-	set(CMAKE_BUILD_TYPE Release)
+    set(CMAKE_BUILD_TYPE Release)
 endif ()
 
 if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
-	set(CMAKE_INSTALL_LIBDIR lib)
+    set(CMAKE_INSTALL_LIBDIR lib)
 endif ()
 
 if (OPENDHT_STATIC)
-	add_library (opendht-static STATIC
-		${opendht_SOURCES}
-		${opendht_HEADERS}
-	)
-	set_target_properties (opendht-static PROPERTIES OUTPUT_NAME "opendht")
-	target_link_libraries(opendht-static gnutls nettle)
-	install (TARGETS opendht-static DESTINATION ${CMAKE_INSTALL_LIBDIR})
+    add_library (opendht-static STATIC
+        ${opendht_SOURCES}
+        ${opendht_HEADERS}
+    )
+    set_target_properties (opendht-static PROPERTIES OUTPUT_NAME "opendht")
+    target_link_libraries(opendht-static gnutls nettle)
+    install (TARGETS opendht-static DESTINATION ${CMAKE_INSTALL_LIBDIR})
 endif ()
 
 if (OPENDHT_SHARED)
-	add_library (opendht SHARED
-		${opendht_SOURCES}
-		${opendht_HEADERS}
-	)
-	set_target_properties (opendht PROPERTIES IMPORT_SUFFIX "_import.lib")
-	#set_target_properties (opendht PROPERTIES SOVERSION 1 VERSION 1.0.0)
-	target_link_libraries(opendht gnutls nettle)
-	install (TARGETS opendht DESTINATION ${CMAKE_INSTALL_LIBDIR})
+    add_library (opendht SHARED
+        ${opendht_SOURCES}
+        ${opendht_HEADERS}
+    )
+    set_target_properties (opendht PROPERTIES IMPORT_SUFFIX "_import.lib")
+    #set_target_properties (opendht PROPERTIES SOVERSION 1 VERSION 1.0.0)
+    target_link_libraries(opendht gnutls nettle)
+    install (TARGETS opendht DESTINATION ${CMAKE_INSTALL_LIBDIR})
 endif ()
 
 if (OPENDHT_TOOLS)
-	add_subdirectory(tools)
+    add_subdirectory(tools)
 endif ()
 
 if (OPENDHT_PYTHON)
-	add_subdirectory(python)
+    add_subdirectory(python)
 endif ()
 
 install (DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX})
diff --git a/include/opendht/log.h b/include/opendht/log.h
index 0838ed6d7c18321f02a097b4f4a700f02c6bdcc4..5a47e870e315c21817817a8fd2ed1acdd44d42f0 100644
--- a/include/opendht/log.h
+++ b/include/opendht/log.h
@@ -32,26 +32,26 @@ namespace log {
  * Terminal colors for logging
  */
 namespace Color {
-	enum Code {
-		FG_RED      = 31,
-		FG_GREEN    = 32,
-		FG_YELLOW   = 33,
-		FG_BLUE     = 34,
-		FG_DEFAULT  = 39,
-		BG_RED      = 41,
-		BG_GREEN    = 42,
-		BG_BLUE     = 44,
-		BG_DEFAULT  = 49
-	};
-	class Modifier {
-		const Code code;
-	public:
-		constexpr Modifier(Code pCode) : code(pCode) {}
-		friend std::ostream&
-		operator<<(std::ostream& os, const Modifier& mod) {
-			return os << "\033[" << mod.code << 'm';
-		}
-	};
+    enum Code {
+        FG_RED      = 31,
+        FG_GREEN    = 32,
+        FG_YELLOW   = 33,
+        FG_BLUE     = 34,
+        FG_DEFAULT  = 39,
+        BG_RED      = 41,
+        BG_GREEN    = 42,
+        BG_BLUE     = 44,
+        BG_DEFAULT  = 49
+    };
+    class Modifier {
+        const Code code;
+    public:
+        constexpr Modifier(Code pCode) : code(pCode) {}
+        friend std::ostream&
+        operator<<(std::ostream& os, const Modifier& mod) {
+            return os << "\033[" << mod.code << 'm';
+        }
+    };
 }
 
 constexpr const Color::Modifier def(Color::FG_DEFAULT);
@@ -63,44 +63,44 @@ constexpr const Color::Modifier yellow(Color::FG_YELLOW);
  */
 void
 printLog(std::ostream& s, char const* m, va_list args) {
-	static constexpr int BUF_SZ = 8192;
-	char buffer[BUF_SZ];
-	int ret = vsnprintf(buffer, sizeof(buffer), m, args);
-	if (ret < 0)
-		return;
-	s.write(buffer, std::min(ret, BUF_SZ));
-	if (ret >= BUF_SZ)
-		s << "[[TRUNCATED]]";
-	s.put('\n');
+    static constexpr int BUF_SZ = 8192;
+    char buffer[BUF_SZ];
+    int ret = vsnprintf(buffer, sizeof(buffer), m, args);
+    if (ret < 0)
+        return;
+    s.write(buffer, std::min(ret, BUF_SZ));
+    if (ret >= BUF_SZ)
+        s << "[[TRUNCATED]]";
+    s.put('\n');
 }
 
 void
 enableLogging(dht::DhtRunner& dht)
 {
-	dht.setLoggers(
-		[](char const* m, va_list args){ std::cerr << red; printLog(std::cerr, m, args); std::cerr << def; },
-		[](char const* m, va_list args){ std::cout << yellow; printLog(std::cout, m, args); std::cout << def; },
-		[](char const* m, va_list args){ printLog(std::cout, m, args); }
-	);
+    dht.setLoggers(
+        [](char const* m, va_list args){ std::cerr << red; printLog(std::cerr, m, args); std::cerr << def; },
+        [](char const* m, va_list args){ std::cout << yellow; printLog(std::cout, m, args); std::cout << def; },
+        [](char const* m, va_list args){ printLog(std::cout, m, args); }
+    );
 }
 
 void
 enableFileLogging(dht::DhtRunner& dht, const std::string& path)
 {
-	auto logfile = std::make_shared<std::fstream>();
-	logfile->open(path, std::ios::out);
+    auto logfile = std::make_shared<std::fstream>();
+    logfile->open(path, std::ios::out);
 
-	dht.setLoggers(
-		[=](char const* m, va_list args){ printLog(*logfile, m, args); },
-		[=](char const* m, va_list args){ printLog(*logfile, m, args); },
-		[=](char const* m, va_list args){ printLog(*logfile, m, args); }
-	);
+    dht.setLoggers(
+        [=](char const* m, va_list args){ printLog(*logfile, m, args); },
+        [=](char const* m, va_list args){ printLog(*logfile, m, args); },
+        [=](char const* m, va_list args){ printLog(*logfile, m, args); }
+    );
 }
 
 void
 disableLogging(dht::DhtRunner& dht)
 {
-	dht.setLoggers(dht::NOLOG, dht::NOLOG, dht::NOLOG);
+    dht.setLoggers(dht::NOLOG, dht::NOLOG, dht::NOLOG);
 }
 
 } /* log */
diff --git a/include/opendht/network_engine.h b/include/opendht/network_engine.h
index 5243ed7ecfb00765acb3651ca74e4d3ba2df3101..0448bfa5beec2917ac606a6496a7e0338c618fae 100644
--- a/include/opendht/network_engine.h
+++ b/include/opendht/network_engine.h
@@ -446,7 +446,7 @@ private:
 
     bool rateLimit();
 
-	void pinged(Node&);
+    void pinged(Node&);
 
     void requestStep(std::shared_ptr<Request> req) {
         if (req->completed or req->cancelled)
@@ -464,7 +464,7 @@ private:
         send((char*)req->msg.data(), req->msg.size(),
                 (req->node->reply_time >= now - UDP_REPLY_TIME) ? 0 : MSG_CONFIRM,
                 (sockaddr*)&req->node->ss, req->node->sslen);
-		pinged(*req->node);
+        pinged(*req->node);
         ++req->attempt_count;
         req->last_try = now;
         std::weak_ptr<Request> wreq = req;
diff --git a/include/opendht/node.h b/include/opendht/node.h
index 7dea83446dda84fb54d6f6237c39bae109228c5d..d1a8ed464ddc8f10e8dfd8da1e1ae1bcaec88a55 100644
--- a/include/opendht/node.h
+++ b/include/opendht/node.h
@@ -35,7 +35,7 @@ struct NodeExport {
 };
 
 struct Node {
-	friend class NetworkEngine;
+    friend class NetworkEngine;
 
     InfoHash id {};
     sockaddr_storage ss;
@@ -78,10 +78,10 @@ struct Node {
       Answer should be true if the message was an aswer to a request we made*/
     void received(time_point now, bool answer);
 
-	/**
-	 * Resets the state of the node so it's not expired anymore.
-	 */
-	void reset() { pinged = 0; }
+    /**
+     * Resets the state of the node so it's not expired anymore.
+     */
+    void reset() { pinged = 0; }
 
     friend std::ostream& operator<< (std::ostream& s, const Node& h);
 
diff --git a/include/opendht/scheduler.h b/include/opendht/scheduler.h
index a79ad1e6c111272d13c2ae6807dc6f1c0171b948..558e3c7000c074e303505cb997688ebbafb14a33 100644
--- a/include/opendht/scheduler.h
+++ b/include/opendht/scheduler.h
@@ -39,7 +39,7 @@ public:
     struct Job {
         bool done;
         bool cancelled;
-		time_point time;
+        time_point time;
         std::function<void()> do_;
     };
 
@@ -52,8 +52,8 @@ public:
      * @return pointer to the newly scheduled job.
      */
     std::shared_ptr<Scheduler::Job> add(time_point time, std::function<void()> job_func) {
-		auto scheduled_time = std::max(time, now); /* This should prevent running an auto rescheduling job forever
-													  before the Scheduler::run method ends. */
+        auto scheduled_time = std::max(time, now); /* This should prevent running an auto rescheduling job forever
+                                                      before the Scheduler::run method ends. */
         auto job = std::make_shared<Job>(Job {false, false, scheduled_time, std::move(job_func)});
         timers.emplace(std::move(scheduled_time), job);
         return job;
@@ -83,12 +83,12 @@ public:
         syncTime();
         while (not timers.empty()) {
             auto timer = timers.begin();
-			/*
-			 * Running jobs scheduled before "now" prevents run+rescheduling
-			 * loops before this method ends. It is garanteed by the fact that a
-			 * job will at least be scheduled for "now" and not before.
-			 */
-			if (not (timer->first < now))
+            /*
+             * Running jobs scheduled before "now" prevents run+rescheduling
+             * loops before this method ends. It is garanteed by the fact that a
+             * job will at least be scheduled for "now" and not before.
+             */
+            if (not (timer->first < now))
                 break;
 
             auto& job = timer->second;
diff --git a/include/opendht/value.h b/include/opendht/value.h
index 4d55984e1f81e5e417a5e3fceee8444709fb5fa8..30ddf55183c8fa7c950ebf3cdb7cbb5e9235bf2f 100644
--- a/include/opendht/value.h
+++ b/include/opendht/value.h
@@ -194,10 +194,10 @@ struct Value
     };
 
     template <typename Derived, typename Base=SerializableBase>
-	class Serializable : public Base
-	{
-	public:
-		using Base::Base;
+    class Serializable : public Base
+    {
+    public:
+        using Base::Base;
 
         virtual const ValueType& getType() const {
             return Derived::TYPE;
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 80fe4b07548c2ace0badaf5ed191c84dc04cec8a..cd175475fe312887cd96cf081eaaf2f5d38ca6ed 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -5,7 +5,7 @@ set(CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
 configure_file(setup.py.in setup.py)
 
 add_custom_target(python ALL
-	COMMAND python3 setup.py build
-	DEPENDS opendht opendht_cpp.pxd opendht.pyx)
+    COMMAND python3 setup.py build
+    DEPENDS opendht opendht_cpp.pxd opendht.pyx)
 
 install(CODE "execute_process(COMMAND python3 setup.py install WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 8cccce266b0f529140d25cb07b50486c124d1c32..b4f21563ac8d9f47f39670df1dd9335ab1542cbb 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -18,7 +18,7 @@ else ()
 endif ()
 
 if (NOT DEFINED CMAKE_INSTALL_BINDIR)
-	set(CMAKE_INSTALL_BINDIR bin)
+    set(CMAKE_INSTALL_BINDIR bin)
 endif ()
 
 install (TARGETS dhtnode dhtscanner dhtchat RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})