Hospitals in Lerwick and Fort William, along with ferry fare pledges, were key to getting the spending package over the line.