Fix up build. Add env var configuration.