Added recent changes from md-addins sharp branch