Big structural changes.

Big structural changes. Using config object to pass values between
subgenerators.