Minor typos fixed.
Minor fixes to assignment and closing of ChildProcess.
Instance counting bug fixed.