Pathname generation cleanup