Addressed various issues brought up by @mpilquist in PR