Reviewed patches from !10163
Splitting off these two from !10163 (merged) to land while I wait for reviews on the Microsoft code.
Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
Splitting off these two from !10163 (merged) to land while I wait for reviews on the Microsoft code.