Basic paste handling.
Create ids based on pointer, not length, because instance can be removed and next won't have unique id.