Added cut/copy/paste functionality.

Made it function with Karim's undo/redo. Created a performCommand method
to reuse code.