Fix typo
Refactor EventStream logic
Optimize imports