diff --git a/src/shared/drivers/dma/DMA.cpp b/src/shared/drivers/dma/DMA.cpp
index a38af66d3880dea77c9e1ac6606451bcca9242e1..ecd2589789d64a374b3d942b4af95b8e99000e49 100644
--- a/src/shared/drivers/dma/DMA.cpp
+++ b/src/shared/drivers/dma/DMA.cpp
@@ -304,9 +304,9 @@ bool DMADriver::tryChannel(DMADefs::DMAStreamId id)
     return streams.count(id) == 0;
 }
 
-DMAStreamGuard DMADriver::acquireStreamBlocking(
-    DMADefs::DMAStreamId id, DMADefs::Channel channel,
-    const std::chrono::nanoseconds timeout)
+DMAStreamGuard DMADriver::acquireStream(DMADefs::DMAStreamId id,
+                                        DMADefs::Channel channel,
+                                        std::chrono::nanoseconds timeout)
 {
     Lock<FastMutex> l(mutex);
 
@@ -339,8 +339,8 @@ DMAStreamGuard DMADriver::acquireStreamBlocking(
     return DMAStreamGuard(&(streams.at(id)));
 }
 
-DMAStreamGuard DMADriver::automaticAcquireStreamBlocking(
-    DMADefs::Peripherals peripheral, const std::chrono::nanoseconds timeout)
+DMAStreamGuard DMADriver::acquireStreamForPeripheral(
+    DMADefs::Peripherals peripheral, std::chrono::nanoseconds timeout)
 {
     const auto availableStreams =
         DMADefs::mapPeripherals.equal_range(peripheral);
@@ -405,14 +405,14 @@ DMADriver::DMADriver()
     ClockUtils::enablePeripheralClock(DMA2);
 
     // Reset interrupts flags by setting the clear bits to 1
-    // TODO: Change this magic number
-    DMA1->HIFCR = 0x0f7d0f7d;  // = 0b 0000 1111 0111 1101 0000 1111 0111 1101
-    DMA1->LIFCR = 0x0f7d0f7d;
-    DMA2->HIFCR = 0x0f7d0f7d;
-    DMA2->LIFCR = 0x0f7d0f7d;
+    constexpr int resetValue = 0x0f7d0f7d;
+    DMA1->HIFCR              = resetValue;
+    DMA1->LIFCR              = resetValue;
+    DMA2->HIFCR              = resetValue;
+    DMA2->LIFCR              = resetValue;
 }
 
-void DMAStream::setup(DMATransaction transaction)
+void DMAStream::setup(DMATransaction& transaction)
 {
     currentSetup = transaction;
 
diff --git a/src/shared/drivers/dma/DMA.h b/src/shared/drivers/dma/DMA.h
index 63ede2588ba6da57a4508bdf241c1267a8179757..1d78927b71c60092239d4eeec2d67eb4b4a7f5ca 100644
--- a/src/shared/drivers/dma/DMA.h
+++ b/src/shared/drivers/dma/DMA.h
@@ -35,15 +35,6 @@
 namespace Boardcore
 {
 
-// TODO: remove and find a better solution for stm32f407
-#ifndef DMA_SxCR_MSIZE_Pos
-#define DMA_SxCR_MSIZE_Pos (13U)
-#endif
-// TODO: remove and find a better solution for stm32f407
-#ifndef DMA_SxCR_PSIZE_Pos
-#define DMA_SxCR_PSIZE_Pos (11U)
-#endif
-
 struct DMATransaction
 {
     enum class Direction : uint16_t
@@ -105,29 +96,27 @@ public:
      * correct channel.
      * @param id The id of the stream to be acquired.
      * @param channel The channel used to initialize the stream.
-     * @param timeout The maximum time that will be waited when in blocking
-     * mode, 0 to disable the timeout and wait forever.
-     * @return The pointer to the allocated stream if successful, nullptr if the
-     * timeout expired.
+     * @param timeout The maximum time that will be waited, defaults to waiting
+     * forever.
+     * @return A stream guard that might be valid or not, depending on the
+     * outcome of the request.
      */
-    DMAStreamGuard acquireStreamBlocking(
+    DMAStreamGuard acquireStream(
         DMADefs::DMAStreamId id, DMADefs::Channel channel,
-        const std::chrono::nanoseconds timeout);
+        std::chrono::nanoseconds timeout = std::chrono::nanoseconds::zero());
 
     /**
      * @brief Try to acquire a stream that is connected to the specified
      * peripheral.
      * @param peripheral The wanted peripheral.
-     * @param timeout The maximum time that will be waited when in blocking
-     * mode, 0 to disable the timeout and wait forever.
-     * @return The pointer to the allocated stream if successful, nullptr if the
-     * timeout expired.
-     *
-     * TODO: change name
+     * @param timeout The maximum time that will be waited, defaults to waiting
+     * forever.
+     * @return A stream guard that might be valid or not, depending on the
+     * outcome of the request.
      */
-    DMAStreamGuard automaticAcquireStreamBlocking(
+    DMAStreamGuard acquireStreamForPeripheral(
         DMADefs::Peripherals peripheral,
-        const std::chrono::nanoseconds timeout);
+        std::chrono::nanoseconds timeout = std::chrono::nanoseconds::zero());
 
     void releaseStream(DMADefs::DMAStreamId id);
 
@@ -153,7 +142,7 @@ public:
     /**
      * @brief Setup the stream with the given configuration.
      */
-    void setup(DMATransaction transaction);
+    void setup(DMATransaction& transaction);
 
     /**
      * @brief Activate the stream. As soon as the stream is enabled, it
@@ -447,7 +436,7 @@ public:
     inline bool isValid() { return pStream != nullptr; }
 
 private:
-    DMAStream* pStream = nullptr;
+    DMAStream* const pStream;
 };
 
 }  // namespace Boardcore
diff --git a/src/shared/drivers/dma/DMADefs.h b/src/shared/drivers/dma/DMADefs.h
index 88797e8abe295b5744dc2c6dc488405a6044f8cf..91426006b19aa57b7db0aa08b88138e3142d34ff 100644
--- a/src/shared/drivers/dma/DMADefs.h
+++ b/src/shared/drivers/dma/DMADefs.h
@@ -30,6 +30,20 @@
 namespace Boardcore
 {
 
+// For some reason these defines are missing
+// in the CMSIS STM32F4xx file
+#ifdef STM32F407xx
+
+#ifndef DMA_SxCR_MSIZE_Pos
+#define DMA_SxCR_MSIZE_Pos (13U)
+#endif
+
+#ifndef DMA_SxCR_PSIZE_Pos
+#define DMA_SxCR_PSIZE_Pos (11U)
+#endif
+
+#endif  // STM32F407xx
+
 namespace DMADefs
 {
 
diff --git a/src/shared/utils/TimedPollingFlag.h b/src/shared/utils/TimedPollingFlag.h
index 4e2dd42d04bff8b98e19eba798b7339266151ffd..44f139767edb63b88131bdfb44dca169e2359434 100644
--- a/src/shared/utils/TimedPollingFlag.h
+++ b/src/shared/utils/TimedPollingFlag.h
@@ -40,12 +40,8 @@ inline bool timedPollingFlag(std::function<bool()> readFlag,
     uint64_t start = miosix::getTime();
 
     while (miosix::getTime() - start < timeout_ns)
-    {
         if (readFlag())
-        {
             return true;
-        }
-    }
 
     return false;
 }
diff --git a/src/tests/drivers/test-dma-mem-to-mem.cpp b/src/tests/drivers/test-dma-mem-to-mem.cpp
index 7807b8810b09418db111c7a12e3d9f40ad833e70..6eef0b9f22b5d4b13861974cb5865c551bf081df 100644
--- a/src/tests/drivers/test-dma-mem-to-mem.cpp
+++ b/src/tests/drivers/test-dma-mem-to-mem.cpp
@@ -24,8 +24,6 @@
 #include <miosix.h>
 #include <util/util.h>
 
-#include <chrono>
-
 using namespace miosix;
 using namespace Boardcore;
 
@@ -33,9 +31,8 @@ void printBuffer(uint8_t* buffer, size_t size);
 
 int main()
 {
-    DMAStreamGuard stream =
-        DMADriver::instance().automaticAcquireStreamBlocking(
-            DMADefs::Peripherals::PE_MEM_ONLY, std::chrono::seconds::zero());
+    DMAStreamGuard stream = DMADriver::instance().acquireStreamForPeripheral(
+        DMADefs::Peripherals::PE_MEM_ONLY);
 
     if (!stream.isValid())
     {
@@ -70,9 +67,7 @@ int main()
     stream->setup(trn);
     stream->enable();
 
-    auto begin = std::chrono::steady_clock::now();
     stream->waitForTransferComplete();
-    auto end = std::chrono::steady_clock::now();
 
     printf("After:\n");
     printf("Buffer 1:\n");
@@ -80,11 +75,6 @@ int main()
     printf("Buffer 2:\n");
     printBuffer(buffer2, sizeof(buffer2));
 
-    const auto elapsedTime =
-        std::chrono::duration_cast<std::chrono::microseconds>(end - begin)
-            .count();
-    printf("Elapsed time: %lld [us]\n", elapsedTime);
-
     return 0;
 }