ENH Make this code location independent