Added three environment variables.
Fixed some bugs.
Need to incorporate changes in service and documentation.