Regulatory-Grade Design for Medical Device Software