pull request fix

created lib/ConfigCollector
try clean code
fix backwards compatibility