Changes in response to review feedback from @davecheney