Some changes based on feedback from discussion on Github.