added support for nested configs, see issue #2

Not exactly same implementation as described in the issue,
but I also find this implementation having some sense.