new version of the lib, multithread compliant

Hi JaminB,

I've done a complete rewrite of your library (not finished yet) as it was not multithread compliant to use (specially the Variables class path). 

You might be interrested to have a look and I recommand you are not to accept the pull request as some features are missing compare to your code.

I will be happy to have your feedback.

Regards