Merge upstream

Merge latest upstream.

Part of the split from #3 

r: @wisq @phoet @jduff