avoid global variables by using modules instead of classes
Merge pull request #159 from jmentz/master

avoid global variables by using module instance variables instead of class instance variables