Eliminate global variables
Merge pull request #1 from Daniel-Hug/master

Eliminate global variables