Improve clipboard code.