Small cleanups of the Master code.

Review: https://reviews.apache.org/r/15114