Add some improvements as suggested by Phil.