Better code generation for extended services