Removed Magic numbers

Removed the magic numbers from loops and moved the file path into a variable.