First implementation of partial code generation