js code cleanup: set env variables