Change the way we switch messaging clients in the agent + tiny fixes