Added environment variables to make script independent of hardwired paths