configure by setting environment variables

Please note that this version of the code only runs when the variables are set. See the readme for details.