Migrating EventSource to its own class