Generates simple code
Added if, function call