Slight simplification and speed-up.