Added ability to nest withConfig

Fixes #447