Validating quantityOfPatches, creating documentation to functions and adjustments on sinalize_patch.js file