Make changes suggested by @jdfreder