added edit - clipboard copy/paste support, fixed some popup events