Improvements to previous commit.