use env module everywhere

Remove the global environment variables holding configuration.
Instead, this allows the server to consistently refer to the same
configuration everywhere.