Manufacturing of a medical device