Better handling of generated code