Simple generic code generator