nws again

Cherry picked relevant commits from #6.