Created an event dispatcher

Created an event dispatcher to notify observers about changes to the state of the object