Unify environment variables processing