Revamped the source code generation. It is now slightly more flexible
than the previous version. It uses the Builder pattern.