Update manager.cc

Almost done.