Made FOR loops for the arrays easier and more compact.