Refactored config usage to avoid global variable pattern

https://github.com/kfgodel/toString/issues/3