More BAT fixes plus example BAT_DEPLOYMENT_SPEC