Make connect_model and deploy a bit more friendly