Code cleanup, more comments & revert a mistake in the previous commit
(we need to kill the whole process group).