[Realtime] Refactor things on realtime.