Further cleanup of code after the removal of caps_per_proc variable. Code
compiles and runs now, but the output does not match the output from the
original version.