Updated Copy-Paste mechanism to use selection