This is an effort to modularize the generator API.