Refactor generation to support future imports.
Functional client generation.