diff --git a/src/sdeventplus/event.cpp b/src/sdeventplus/event.cpp
index 64dc7ee..946d34c 100644
--- a/src/sdeventplus/event.cpp
+++ b/src/sdeventplus/event.cpp
@@ -56,7 +56,7 @@
 
 int Event::prepare() const
 {
-    int r = sdevent->sd_event_prepare(event.get());
+    int r = sdevent->sd_event_prepare(get());
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_prepare");
@@ -68,7 +68,7 @@
 {
     // An unsigned -1 timeout value means infinity in sd_event
     uint64_t timeout_usec = timeout ? timeout->count() : -1;
-    int r = sdevent->sd_event_wait(event.get(), timeout_usec);
+    int r = sdevent->sd_event_wait(get(), timeout_usec);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_wait");
@@ -78,7 +78,7 @@
 
 int Event::dispatch() const
 {
-    int r = sdevent->sd_event_dispatch(event.get());
+    int r = sdevent->sd_event_dispatch(get());
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_dispatch");
@@ -90,7 +90,7 @@
 {
     // An unsigned -1 timeout value means infinity in sd_event
     uint64_t timeout_usec = timeout ? timeout->count() : -1;
-    int r = sdevent->sd_event_run(event.get(), timeout_usec);
+    int r = sdevent->sd_event_run(get(), timeout_usec);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_run");
@@ -100,7 +100,7 @@
 
 int Event::loop() const
 {
-    int r = sdevent->sd_event_loop(event.get());
+    int r = sdevent->sd_event_loop(get());
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_loop");
@@ -110,7 +110,7 @@
 
 void Event::exit(int code) const
 {
-    int r = sdevent->sd_event_exit(event.get(), code);
+    int r = sdevent->sd_event_exit(get(), code);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_exit");
@@ -120,7 +120,7 @@
 int Event::get_exit_code() const
 {
     int code;
-    int r = sdevent->sd_event_get_exit_code(event.get(), &code);
+    int r = sdevent->sd_event_get_exit_code(get(), &code);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_get_exit_code");
@@ -130,7 +130,7 @@
 
 bool Event::get_watchdog() const
 {
-    int r = sdevent->sd_event_get_watchdog(event.get());
+    int r = sdevent->sd_event_get_watchdog(get());
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_get_watchdog");
@@ -140,7 +140,7 @@
 
 bool Event::set_watchdog(bool b) const
 {
-    int r = sdevent->sd_event_set_watchdog(event.get(), b);
+    int r = sdevent->sd_event_set_watchdog(get(), b);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_set_watchdog");
diff --git a/src/sdeventplus/source/base.cpp b/src/sdeventplus/source/base.cpp
index 9915132..81ea591 100644
--- a/src/sdeventplus/source/base.cpp
+++ b/src/sdeventplus/source/base.cpp
@@ -31,7 +31,7 @@
 const char* Base::get_description() const
 {
     const char* description;
-    int r = event.getSdEvent()->sd_event_source_get_description(source.get(),
+    int r = event.getSdEvent()->sd_event_source_get_description(get(),
                                                                 &description);
     if (r < 0)
     {
@@ -42,8 +42,8 @@
 
 void Base::set_description(const char* description) const
 {
-    int r = event.getSdEvent()->sd_event_source_set_description(source.get(),
-                                                                description);
+    int r =
+        event.getSdEvent()->sd_event_source_set_description(get(), description);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_set_description");
@@ -53,7 +53,7 @@
 void Base::set_prepare(Callback&& callback)
 {
     int r = event.getSdEvent()->sd_event_source_set_prepare(
-        source.get(), callback ? prepareCallback : nullptr);
+        get(), callback ? prepareCallback : nullptr);
     if (r < 0)
     {
         prepare = nullptr;
@@ -69,7 +69,7 @@
 
 bool Base::get_pending() const
 {
-    int r = event.getSdEvent()->sd_event_source_get_pending(source.get());
+    int r = event.getSdEvent()->sd_event_source_get_pending(get());
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_get_pending");
@@ -80,8 +80,7 @@
 int64_t Base::get_priority() const
 {
     int64_t priority;
-    int r = event.getSdEvent()->sd_event_source_get_priority(source.get(),
-                                                             &priority);
+    int r = event.getSdEvent()->sd_event_source_get_priority(get(), &priority);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_get_priority");
@@ -91,8 +90,7 @@
 
 void Base::set_priority(int64_t priority) const
 {
-    int r = event.getSdEvent()->sd_event_source_set_priority(source.get(),
-                                                             priority);
+    int r = event.getSdEvent()->sd_event_source_set_priority(get(), priority);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_set_priority");
@@ -102,8 +100,7 @@
 Enabled Base::get_enabled() const
 {
     int enabled;
-    int r =
-        event.getSdEvent()->sd_event_source_get_enabled(source.get(), &enabled);
+    int r = event.getSdEvent()->sd_event_source_get_enabled(get(), &enabled);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_get_enabled");
@@ -114,7 +111,7 @@
 void Base::set_enabled(Enabled enabled) const
 {
     int r = event.getSdEvent()->sd_event_source_set_enabled(
-        source.get(), static_cast<int>(enabled));
+        get(), static_cast<int>(enabled));
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_set_enabled");
@@ -172,7 +169,7 @@
 
 void Base::set_userdata()
 {
-    event.getSdEvent()->sd_event_source_set_userdata(source.get(), this);
+    event.getSdEvent()->sd_event_source_set_userdata(get(), this);
 }
 
 } // namespace source
diff --git a/src/sdeventplus/source/child.cpp b/src/sdeventplus/source/child.cpp
index b549473..c7b02d9 100644
--- a/src/sdeventplus/source/child.cpp
+++ b/src/sdeventplus/source/child.cpp
@@ -22,8 +22,7 @@
 pid_t Child::get_pid() const
 {
     pid_t pid;
-    int r =
-        event.getSdEvent()->sd_event_source_get_child_pid(source.get(), &pid);
+    int r = event.getSdEvent()->sd_event_source_get_child_pid(get(), &pid);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_get_child_pid");
diff --git a/src/sdeventplus/source/io.cpp b/src/sdeventplus/source/io.cpp
index 49583d0..d3aa83b 100644
--- a/src/sdeventplus/source/io.cpp
+++ b/src/sdeventplus/source/io.cpp
@@ -20,7 +20,7 @@
 
 int IO::get_fd() const
 {
-    int r = event.getSdEvent()->sd_event_source_get_io_fd(source.get());
+    int r = event.getSdEvent()->sd_event_source_get_io_fd(get());
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_get_io_fd");
@@ -30,7 +30,7 @@
 
 void IO::set_fd(int fd) const
 {
-    int r = event.getSdEvent()->sd_event_source_set_io_fd(source.get(), fd);
+    int r = event.getSdEvent()->sd_event_source_set_io_fd(get(), fd);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_set_io_fd");
@@ -40,8 +40,7 @@
 uint32_t IO::get_events() const
 {
     uint32_t events;
-    int r = event.getSdEvent()->sd_event_source_get_io_events(source.get(),
-                                                              &events);
+    int r = event.getSdEvent()->sd_event_source_get_io_events(get(), &events);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_get_io_events");
@@ -51,8 +50,7 @@
 
 void IO::set_events(uint32_t events) const
 {
-    int r =
-        event.getSdEvent()->sd_event_source_set_io_events(source.get(), events);
+    int r = event.getSdEvent()->sd_event_source_set_io_events(get(), events);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_set_io_events");
@@ -62,8 +60,7 @@
 uint32_t IO::get_revents() const
 {
     uint32_t revents;
-    int r = event.getSdEvent()->sd_event_source_get_io_revents(source.get(),
-                                                               &revents);
+    int r = event.getSdEvent()->sd_event_source_get_io_revents(get(), &revents);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_get_io_revents");
diff --git a/src/sdeventplus/source/signal.cpp b/src/sdeventplus/source/signal.cpp
index 98b1a05..b47d78d 100644
--- a/src/sdeventplus/source/signal.cpp
+++ b/src/sdeventplus/source/signal.cpp
@@ -21,7 +21,7 @@
 
 int Signal::get_signal() const
 {
-    int r = event.getSdEvent()->sd_event_source_get_signal(source.get());
+    int r = event.getSdEvent()->sd_event_source_get_signal(get());
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_get_signal");
diff --git a/src/sdeventplus/source/time.cpp b/src/sdeventplus/source/time.cpp
index bbc3295..9d4f9ca 100644
--- a/src/sdeventplus/source/time.cpp
+++ b/src/sdeventplus/source/time.cpp
@@ -29,7 +29,7 @@
 typename Time<Id>::TimePoint Time<Id>::get_time() const
 {
     uint64_t usec;
-    int r = event.getSdEvent()->sd_event_source_get_time(source.get(), &usec);
+    int r = event.getSdEvent()->sd_event_source_get_time(get(), &usec);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_get_time");
@@ -41,7 +41,7 @@
 void Time<Id>::set_time(TimePoint time) const
 {
     int r = event.getSdEvent()->sd_event_source_set_time(
-        source.get(), SdEventDuration(time.time_since_epoch()).count());
+        get(), SdEventDuration(time.time_since_epoch()).count());
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_set_time");
@@ -52,8 +52,7 @@
 typename Time<Id>::Accuracy Time<Id>::get_accuracy() const
 {
     uint64_t usec;
-    int r = event.getSdEvent()->sd_event_source_get_time_accuracy(source.get(),
-                                                                  &usec);
+    int r = event.getSdEvent()->sd_event_source_get_time_accuracy(get(), &usec);
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_get_time_accuracy");
@@ -65,7 +64,7 @@
 void Time<Id>::set_accuracy(Accuracy accuracy) const
 {
     int r = event.getSdEvent()->sd_event_source_set_time_accuracy(
-        source.get(), SdEventDuration(accuracy).count());
+        get(), SdEventDuration(accuracy).count());
     if (r < 0)
     {
         throw SdEventError(-r, "sd_event_source_set_time_accuracy");
