Merge pull request #46 from wagnert/master

Refactor and make variables configurable