Get CPU stats from JobObject. Get memory stats from processes in JobObject. Other cleanup and refactoring.