More general work extending the system and on code generation