Made some tweaks as suggested by @gpoul on GitHub.