Refactored hooks code into separate event manager class
Event manager tests
Using new EventManager for entity hooks
Collections trigger entity hooks