factor out global environment variables
delete obsolete comment
Only expand variables if they start a token