Incorporate sugesstions from sjackman.