Implemented eventListeners in Document and Collaborative Objects

Also refactored some events to use the enum instead of a string.