Return config as object

Separating out from branch that had package stuff in PR #77 .

This one just has the logic to return the generated config as an object, sans package wrangling.