Pusher and js refactor