Cherry pick master_tops restore
Restore master_tops functionality and add more documentation.