diff --git a/src/shared/scheduler/TaskScheduler.cpp b/src/shared/scheduler/TaskScheduler.cpp
index 498e7a8dc8dc7810e6533111c3db66a12e2b3ef9..beefa82953d686fcf3814bc836fb235c8fbc5b8d 100644
--- a/src/shared/scheduler/TaskScheduler.cpp
+++ b/src/shared/scheduler/TaskScheduler.cpp
@@ -89,7 +89,7 @@ size_t TaskScheduler::addTask(function_t function, uint32_t period,
     return id;
 }
 
-bool TaskScheduler::removeTask(uint8_t id)
+bool TaskScheduler::removeTask(size_t id)
 {
     Lock<FastMutex> lock(mutex);
 
@@ -138,7 +138,7 @@ vector<TaskStatsResult> TaskScheduler::getTaskStats()
 
     vector<TaskStatsResult> result;
 
-    for (auto& task : (*tasks))
+    for (auto const& task : (*tasks))
     {
         if (task.valid)
         {
diff --git a/src/shared/scheduler/TaskScheduler.h b/src/shared/scheduler/TaskScheduler.h
index bf82b2b7a3c2aa316c89c47c62af18ab566ae412..302629ee8e5e570cb7cec81be297978862eefd7c 100644
--- a/src/shared/scheduler/TaskScheduler.h
+++ b/src/shared/scheduler/TaskScheduler.h
@@ -94,7 +94,8 @@ public:
         RECOVER    ///< Prioritize the number of executions over the period.
     };
 
-    TaskScheduler(miosix::Priority priority = miosix::PRIORITY_MAX - 1);
+    explicit TaskScheduler(miosix::Priority priority = miosix::PRIORITY_MAX -
+                                                       1);
 
     ~TaskScheduler();
 
@@ -109,7 +110,7 @@ public:
      * executed immediately, otherwise after the given period.
      *
      * @param function Function to be called periodically.
-     * @param period Inter call period.
+     * @param period Inter call period [ms].
      * @param policy Task policy, default is SKIP.
      * @param startTick First activation time, useful for synchronizing tasks.
      * @return true if the task was added successfully.
@@ -124,7 +125,7 @@ public:
      * @param id Id of the task to remove.
      * @return true if the task was removed.
      */
-    bool removeTask(uint8_t id);
+    bool removeTask(size_t id);
 
     bool start() override;
 
@@ -142,7 +143,7 @@ private:
     struct Task
     {
         function_t function;
-        uint32_t period;
+        uint32_t period;  // [ms]
         size_t id;
         bool valid;
         Policy policy;