Uses eventSource as reference, @georgehrke check this out.