Work on priority
Fix tests
Created EventDispatcher and tests