Cherry pick master_tops restore
Restore master_tops functionality and add more documentation.
Fix stray if statement
Merge commit