fixed a typo: NumberOfPatchesOpen should have started lower case. added some comments and more tracking functions.