Copy paste works. Some fixes and improvements