Centralize environment conditionals (now also more readable)