manager.cpp: added part of the processCommands pseudocode.