Implement most of the Google engineer's suggestions.

And update TODO.