src: minor updates to stats methods.
src: similarity calc normalization notes added and changes to code made.
src: main changes are to max_patch, which has better checks for terminal nodes where creating random patches.