Update code with latest from MSDN 7/15/2014

MSDN code 7/15/2014