Refactored code and added Pusher client for live updates