Improved some loops using the 'loop' package.