Handle environment variables better