Make changes suggested by @timgraham.