Made readlink output a more descriptive variable name and eliminated duplicated calls.