Clean up uses of forEach