Fix and standardize explicit quoting and expansion