Remove global variables
Add a little refactoring
Merge pull request #27 from ArnaudSpanneut/master

Remove global variables