Added pasteEventHandler, which handles the right click paste.  Some code cleanup, trying for better cross browser empty handling.
Merge branch '1.x' into gh-pages