Implement paste functionality

Based on work by Nick Ashley and Eugene Golendukhin
Update about dialog credits