Some reworking of clipboard stuff.