Changed a for loop to a for -each loop.
May help with speed.