Removed some redundancy and added in options for ensuring patch generation ignore whitespace changes