Little more logic to configuration handling
Merge pull request #1 from l1x/demo

Little more logic to configuration handling