Update code generation scripts for new JSON mapping format.
Fix namespace issues when using custom handlers or passthrough.