Updated code to eliminate path dependencies