Integrating review feedback.

Also fixing test to be less timing dependent.