Cleaned up loop and each to be MUCH faster.