Modify something close to "TaskSensor"

Add comments and change name and position of variables.
close "TaskSensor"