Partial implementation of paste.