This is done with parallel arrays. The first time the 'get_qualities' function is called it gets the
qualities and urls and places them into the 'qualities' and
'quality_urls' arrays and returns the 'qualities' array. If the function
has already run it returns the 'qualities' array. It can be forced the
re-find the qualities by clearing the 'qualities' array.
Now the file that profiles are found from is only set once in one place
and the #ifdef statements are inside of the function rather than
redefining the same thing multiple times.