Replaced / lists iterations with dotimes / dolist. Changes improve speed.