refactored the paste functionality, linebreaks from code working, also bug when selfpasting removed + some small improvements