A Uniform and Automatic Approach to CopyElimination in System Extensions via