Refactor env var recommendation code for readability/style