Add copy/paste and some bug fixes