The way you have it set up the loops are executing every tick, so effectively all the time.
If you want a loop to only happen after something else takes place, you should place it as a sub event of either:
1) A block of conditions you want to be met before the loop executes
2) A trigger condition
In your example try placing the the loops you have as a sub event of the On start of layout trigger.
Doing that will cause them to only run once, in this case, when the layout starts.