updated pubsub. chat now goes through clientAPI.broadcast(). small other changes and fixes.