Added copy, paste, clear, and average functionality. Added listener for cut event.