Changed loop to foreach
Cleared some logs