Restructure program to not spawn a management process for each command