Refactor environment variables