Merge pull request #3 from GervaisdeM/master

Fixed endless while loop
Merge pull request #4 from GervaisdeM/master

Moved environment variables