Test and improve pasting

Rebased: #72