Include improvements suggested by simonwelsh.